On 2/23/22 04:37, Hyeonggon Yoo wrote: > On Tue, Feb 22, 2022 at 03:48:16PM -0800, David Rientjes wrote: >> On Mon, 21 Feb 2022, Hyeonggon Yoo wrote: >> >> > SLUB sets number of minimum partial slabs for node (min_partial) using >> > set_min_partial(). SLUB holds at least min_partial slabs even if they're empty >> > to avoid excessive use of page allocator. >> > >> > set_min_partial() limits value of min_partial between MIN_PARTIAL and >> > MAX_PARTIAL. As set_min_partial() can be called by min_partial_store() >> > too, Only limit value of min_partial in kmem_cache_open() so that it >> > can be changed to value that a user wants. >> > >> > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx> >> >> I think this makes sense and there is no reason to limit the bounds that >> may be set at runtime with undocumented behavior. Right. > Thank you for comment. > >> >> However, since set_min_partial() is only setting the value in the >> kmem_cache, could we remove the helper function entirely and fold it into >> its two callers? > > Right. We don't need to separate this as function. I'll update this > in next version. Thanks! Agreed, thanks!