All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xishi Qiu <qiuxishi@huawei.com>
To: LKML <linux-kernel@vger.kernel.org>, Linux MM <linux-mm@kvack.org>
Subject: a question about slub in function __slab_free()
Date: Wed, 2 Mar 2016 20:26:59 +0800	[thread overview]
Message-ID: <56D6DC13.8060008@huawei.com> (raw)

___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"?

Thanks,
Xishi Qiu

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Xishi Qiu <qiuxishi@huawei.com>
To: LKML <linux-kernel@vger.kernel.org>, Linux MM <linux-mm@kvack.org>
Subject: a question about slub in function __slab_free()
Date: Wed, 2 Mar 2016 20:26:59 +0800	[thread overview]
Message-ID: <56D6DC13.8060008@huawei.com> (raw)

___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"?

Thanks,
Xishi Qiu

             reply	other threads:[~2016-03-02 12:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 12:26 Xishi Qiu [this message]
2016-03-02 12:26 ` a question about slub in function __slab_free() Xishi Qiu
2016-03-02 14:38 ` Joonsoo Kim
2016-03-02 14:38   ` Joonsoo Kim
2016-03-03  1:26   ` Xishi Qiu
2016-03-03  1:26     ` Xishi Qiu
2016-03-02 15:12 ` Jianyu Zhan
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=56D6DC13.8060008@huawei.com \
    --to=qiuxishi@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.