Re: [PATCH] mm, slub: restrict sysfs validation to debug caches and make it safe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/11/22 08:53, Hyeonggon Yoo wrote:
> 
> I started to wonder...
> 
> Do we need slab_lock() after this patch for debugging caches?
> 
> if SLUB never takes a slab from partial list (unless moving to another list or freeing it),
> and if you must acquire list_lock before accessing (to alloc/free objects) per-node partial list,
> Why do we need it?

Yeah, looks like we shouldn't need it anymore as n->list_lock will cover
everything now. Great observation!

> Of course, it is still needed for ARCHs that does not support
> cmpxchg_double().
> 
> But as code for debugging caches is separated after this patch,
> maybe we can simply drop slab_lock() in:
> 	- alloc_debug_processing()
> 	- free_debug_processing()
> 	- alloc_single_from_{new_slab,partial}()
> 	- validate_slab()

list_slab_objects() too, with some care for the locking in get_map().

> And also relevant comments.

As it's becoming too large, I will split this to more patches. Thanks!






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux