Print this page
9525 kmem_dump_size is a corrupting influence

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2018 Joyent, Inc.
  */
 
 #ifndef _SYS_KMEM_IMPL_H
 #define _SYS_KMEM_IMPL_H
 

@@ -326,10 +327,16 @@
         void            *kmd_from_buf;          /* object to move */
         void            *kmd_to_buf;            /* move destination */
         kthread_t       *kmd_thread;            /* thread calling move */
 } kmem_defrag_t;
 
+typedef struct kmem_dump {
+        void            *kd_freelist;           /* heap during crash dump */
+        uint_t          kd_alloc_fails;         /* # of allocation failures */
+        uint_t          kd_unsafe;              /* cache was used, but unsafe */
+} kmem_dump_t;
+
 #define KMEM_CACHE_NAMELEN      31
 
 struct kmem_cache {
         /*
          * Statistics

@@ -396,12 +403,11 @@
          */
         kmutex_t        cache_depot_lock;       /* protects depot */
         kmem_magtype_t  *cache_magtype;         /* magazine type */
         kmem_maglist_t  cache_full;             /* full magazines */
         kmem_maglist_t  cache_empty;            /* empty magazines */
-        void            *cache_dumpfreelist;    /* heap during crash dump */
-        void            *cache_dumplog;         /* log entry during dump */
+        kmem_dump_t     cache_dump;             /* used during crash dump */
 
         /*
          * Per-CPU layer
          */
         kmem_cpu_cache_t cache_cpu[1];          /* max_ncpus actual elements */