mm, slub: refactor free debug processing
Since commit c7323a5a ("mm/slub: restrict sysfs validation to debug caches and make it safe"), caches with debugging enabled use the free_debug_processing() function to do both freeing checks and actual freeing to partial list under list_lock, bypassing the fast paths. We will want to use the same path for CONFIG_SLUB_TINY, but without the debugging checks, so refactor the code so that free_debug_processing() does only the checks, while the freeing is handled by a new function free_to_partial_list(). For consistency, change return parameter alloc_debug_processing() from int to bool and correct the !SLUB_DEBUG variant to return true and not false. This didn't matter until now, but will in the following changes. Signed-off-by:Vlastimil Babka <vbabka@suse.cz> Acked-by:
Mike Rapoport <rppt@linux.ibm.com> Reviewed-by:
Christoph Lameter <cl@linux.com> Reviewed-by:
Hyeonggon Yoo <42.hyeyoo@gmail.com>
Showing
Please register or sign in to comment