lkml.org 
[lkml]   [2016]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: a question about slub in function __slab_free()
On 2016/3/2 22:38, Joonsoo Kim wrote:

> 2016-03-02 21:26 GMT+09:00 Xishi Qiu <qiuxishi@huawei.com>:
>> ___slab_alloc()
>> deactivate_slab()
>> add_full(s, n, page);
>> The page will be added to full list and the frozen is 0, right?
>>
>> __slab_free()
>> prior = page->freelist; // prior is NULL
>> was_frozen = new.frozen; // was_frozen is 0
>> ...
>> /*
>> * Slab was on no list before and will be
>> * partially empty
>> * We can defer the list move and instead
>> * freeze it.
>> */
>> new.frozen = 1;
>> ...
>>
>> I don't understand why "Slab was on no list before"?
>
> add_full() is defined only for CONFIG_SLUB_DEBUG.
> And, actual add happens if slub_debug=u is enabled.
> In other cases, fully used slab isn't attached on any list.
>
> Thanks.
>

Hi Joonsoo,

You are right, thank you very much!

>



\
 
 \ /
  Last update: 2016-03-03 03:01    [W:0.065 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site