]> asedeno.scripts.mit.edu Git - linux.git/commit
debugobjects: Use global free list in free_object()
authorYang Shi <yang.shi@linux.alibaba.com>
Mon, 5 Feb 2018 23:18:27 +0000 (07:18 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 13 Feb 2018 09:58:59 +0000 (10:58 +0100)
commit636e1970fd7deaa0d0ee0dfb6ac65fbd690b32d2
tree4cec59377bf77600013af40888433dcb57716722
parent36c4ead6f6dfbbe777d3d7e9cc8702530b71a94f
debugobjects: Use global free list in free_object()

The newly added global free list allows to avoid lengthy pool_list
iterations in free_obj_work() by putting objects either into the pool list
when the fill level of the pool is below the maximum or by putting them on
the global free list immediately.

As the pool is now guaranteed to never exceed the maximum fill level this
allows to remove the batch removal from pool list in free_obj_work().

Split free_object() into two parts, so the actual queueing function can be
reused without invoking schedule_work() on every invocation.

[ tglx: Remove the batch removal from pool list and massage changelog ]

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: longman@redhat.com
Link: https://lkml.kernel.org/r/1517872708-24207-4-git-send-email-yang.shi@linux.alibaba.com
lib/debugobjects.c