lkml.org 
[lkml]   [2020]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm/slub: make add_full() condition more explicit
From
Date


On 2020/8/20 3:37, Andrew Morton wrote:
> On Tue, 11 Aug 2020 10:02:36 +0800 <wuyun.wu@huawei.com> wrote:
>
>> From: Abel Wu <wuyun.wu@huawei.com>
>>
>> The commit below is incomplete, as it didn't handle the add_full() part.
>> commit a4d3f8916c65 ("slub: remove useless kmem_cache_debug() before remove_full()")
>>
>> This patch checks for SLAB_STORE_USER instead of kmem_cache_debug(),
>> since that should be the only context in which we need the list_lock for
>> add_full().
>>
>
> Does this contradict what the comment tells us?
>
> * This also ensures that the scanning of full
> * slabs from diagnostic functions will not see
> * any frozen slabs.
>
I don't think so. If the flag SLAB_STORE_USER is not set, the slab won't
be added to the full list no matter this patch is applied or not, since
the check inside add_full() will guard for that. Am I missing something
here?
Regards,
Abel

\
 
 \ /
  Last update: 2020-08-20 03:57    [W:0.210 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site