Searched refs:mem_hotplug (Results 1 - 1 of 1) sorted by relevance

/linux-4.1.27/mm/
H A Dmemory_hotplug.c65 } mem_hotplug = { variable in typeref:struct:__anon14060
67 .lock = __MUTEX_INITIALIZER(mem_hotplug.lock),
70 .dep_map = {.name = "mem_hotplug.lock" },
75 #define memhp_lock_acquire_read() lock_map_acquire_read(&mem_hotplug.dep_map)
76 #define memhp_lock_acquire() lock_map_acquire(&mem_hotplug.dep_map)
77 #define memhp_lock_release() lock_map_release(&mem_hotplug.dep_map)
82 if (mem_hotplug.active_writer == current) get_online_mems()
85 mutex_lock(&mem_hotplug.lock); get_online_mems()
86 mem_hotplug.refcount++; get_online_mems()
87 mutex_unlock(&mem_hotplug.lock); get_online_mems()
93 if (mem_hotplug.active_writer == current) put_online_mems()
95 mutex_lock(&mem_hotplug.lock); put_online_mems()
97 if (WARN_ON(!mem_hotplug.refcount)) put_online_mems()
98 mem_hotplug.refcount++; /* try to fix things up */ put_online_mems()
100 if (!--mem_hotplug.refcount && unlikely(mem_hotplug.active_writer)) put_online_mems()
101 wake_up_process(mem_hotplug.active_writer); put_online_mems()
102 mutex_unlock(&mem_hotplug.lock); put_online_mems()
109 mem_hotplug.active_writer = current; mem_hotplug_begin()
113 mutex_lock(&mem_hotplug.lock); mem_hotplug_begin()
114 if (likely(!mem_hotplug.refcount)) mem_hotplug_begin()
117 mutex_unlock(&mem_hotplug.lock); mem_hotplug_begin()
124 mem_hotplug.active_writer = NULL; mem_hotplug_done()
125 mutex_unlock(&mem_hotplug.lock); mem_hotplug_done()

Completed in 95 milliseconds