Print this page
OS-4162 system appears (mostly) hung on kmem_move taskq

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/kmem.c
          +++ new/usr/src/uts/common/os/kmem.c
↓ open down ↓ 4142 lines elided ↑ open up ↑
4143 4143           * Remove the cache from the global cache list so that no one else
4144 4144           * can schedule tasks on its behalf, wait for any pending tasks to
4145 4145           * complete, purge the cache, and then destroy it.
4146 4146           */
4147 4147          mutex_enter(&kmem_cache_lock);
4148 4148          list_remove(&kmem_caches, cp);
4149 4149          mutex_exit(&kmem_cache_lock);
4150 4150  
4151 4151          if (kmem_taskq != NULL)
4152 4152                  taskq_wait(kmem_taskq);
4153      -        if (kmem_move_taskq != NULL)
     4153 +
     4154 +        if (kmem_move_taskq != NULL && cp->cache_defrag != NULL)
4154 4155                  taskq_wait(kmem_move_taskq);
4155 4156  
4156 4157          kmem_cache_magazine_purge(cp);
4157 4158  
4158 4159          mutex_enter(&cp->cache_lock);
4159 4160          if (cp->cache_buftotal != 0)
4160 4161                  cmn_err(CE_WARN, "kmem_cache_destroy: '%s' (%p) not empty",
4161 4162                      cp->cache_name, (void *)cp);
4162 4163          if (cp->cache_defrag != NULL) {
4163 4164                  avl_destroy(&cp->cache_defrag->kmd_moves_pending);
↓ open down ↓ 1448 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX