From: Xishi Qiu <qiuxishi@huawei.com>
To: Joonsoo Kim <js1304@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Linux MM <linux-mm@kvack.org>
Subject: Re: a question about slub in function __slab_free()
Date: Thu, 3 Mar 2016 09:26:53 +0800 [thread overview]
Message-ID: <56D792DD.5010202@huawei.com> (raw)
In-Reply-To: <CAAmzW4OV4J_zGh2MSCqE0-x6Z_BopB+ucSVLV6kp53Cw4obkfg@mail.gmail.com>
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!
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-03-03 1:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-02 12:26 a question about slub in function __slab_free() Xishi Qiu
2016-03-02 14:38 ` Joonsoo Kim
2016-03-03 1:26 ` Xishi Qiu [this message]
2016-03-02 15:12 ` Jianyu Zhan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56D792DD.5010202@huawei.com \
--to=qiuxishi@huawei.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).