Searched refs:vmpr (Results 1 - 3 of 3) sorted by relevance
/linux-4.4.14/mm/ |
H A D | vmpressure.c | 78 static struct vmpressure *vmpressure_parent(struct vmpressure *vmpr) vmpressure_parent() argument 80 struct cgroup_subsys_state *css = vmpressure_to_css(vmpr); vmpressure_parent() 139 static bool vmpressure_event(struct vmpressure *vmpr, vmpressure_event() argument 148 mutex_lock(&vmpr->events_lock); vmpressure_event() 150 list_for_each_entry(ev, &vmpr->events, node) { vmpressure_event() 157 mutex_unlock(&vmpr->events_lock); vmpressure_event() 164 struct vmpressure *vmpr = work_to_vmpressure(work); vmpressure_work_fn() local 168 spin_lock(&vmpr->sr_lock); vmpressure_work_fn() 175 * vmpr->reclaimed is in sync. vmpressure_work_fn() 177 scanned = vmpr->scanned; vmpressure_work_fn() 179 spin_unlock(&vmpr->sr_lock); vmpressure_work_fn() 183 reclaimed = vmpr->reclaimed; vmpressure_work_fn() 184 vmpr->scanned = 0; vmpressure_work_fn() 185 vmpr->reclaimed = 0; vmpressure_work_fn() 186 spin_unlock(&vmpr->sr_lock); vmpressure_work_fn() 189 if (vmpressure_event(vmpr, scanned, reclaimed)) vmpressure_work_fn() 195 } while ((vmpr = vmpressure_parent(vmpr))); vmpressure_work_fn() 214 struct vmpressure *vmpr = memcg_to_vmpressure(memcg); vmpressure() local 241 spin_lock(&vmpr->sr_lock); vmpressure() 242 vmpr->scanned += scanned; vmpressure() 243 vmpr->reclaimed += reclaimed; vmpressure() 244 scanned = vmpr->scanned; vmpressure() 245 spin_unlock(&vmpr->sr_lock); vmpressure() 249 schedule_work(&vmpr->work); vmpressure() 299 struct vmpressure *vmpr = memcg_to_vmpressure(memcg); vmpressure_register_event() local 318 mutex_lock(&vmpr->events_lock); vmpressure_register_event() 319 list_add(&ev->node, &vmpr->events); vmpressure_register_event() 320 mutex_unlock(&vmpr->events_lock); vmpressure_register_event() 339 struct vmpressure *vmpr = memcg_to_vmpressure(memcg); vmpressure_unregister_event() local 342 mutex_lock(&vmpr->events_lock); vmpressure_unregister_event() 343 list_for_each_entry(ev, &vmpr->events, node) { vmpressure_unregister_event() 350 mutex_unlock(&vmpr->events_lock); vmpressure_unregister_event() 355 * @vmpr: Structure to be initialized 360 void vmpressure_init(struct vmpressure *vmpr) vmpressure_init() argument 362 spin_lock_init(&vmpr->sr_lock); vmpressure_init() 363 mutex_init(&vmpr->events_lock); vmpressure_init() 364 INIT_LIST_HEAD(&vmpr->events); vmpressure_init() 365 INIT_WORK(&vmpr->work, vmpressure_work_fn); vmpressure_init() 370 * @vmpr: Structure to be cleaned up 375 void vmpressure_cleanup(struct vmpressure *vmpr) vmpressure_cleanup() argument 381 flush_work(&vmpr->work); vmpressure_cleanup()
|
H A D | memcontrol.c | 257 struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr) vmpressure_to_css() argument 259 return &container_of(vmpr, struct mem_cgroup, vmpressure)->css; vmpressure_to_css()
|
/linux-4.4.14/include/linux/ |
H A D | vmpressure.h | 33 extern void vmpressure_init(struct vmpressure *vmpr); 34 extern void vmpressure_cleanup(struct vmpressure *vmpr); 36 extern struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr);
|
Completed in 86 milliseconds