All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@huawei.com>
To: Christoph Lameter <cl@linux.com>
Cc: Jiang Liu <liuj97@gmail.com>, Pekka Enberg <penberg@kernel.org>,
	Matt Mackall <mpm@selenic.com>, Mel Gorman <mgorman@suse.de>,
	Yinghai Lu <yinghai@kernel.org>, Tony Luck <tony.luck@intel.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	David Rientjes <rientjes@google.com>,
	Minchan Kim <minchan@kernel.org>,
	Keping Chen <chenkeping@huawei.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 2/4] mm: make consistent use of PG_slab flag
Date: Fri, 6 Jul 2012 16:30:20 +0800	[thread overview]
Message-ID: <4FF6A21C.9010509@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1207051236310.8670@router.home>

On 2012-7-6 1:37, Christoph Lameter wrote:
>> Hi Chris,
>> 	I think there's a little difference with SLUB and SLOB for compound page.
>> For SLOB, it relies on the page allocator to allocate compound page to fulfill
>> request bigger than one page. For SLUB, it relies on the page allocator if the
>> request is bigger than two pages. So SLUB may allocate a 2-pages compound page
>> to host SLUB managed objects.
>> 	My proposal may be summarized as below:
>> 	1) PG_slab flag marks a memory object is allocated from slab allocator.
>> 	2) PG_slabobject marks a (compound) page hosts SLUB/SLOB managed objects.
>> 	3) Only set PG_slab/PG_slabobject on the head page of compound pages.
>> 	4) For SLAB, PG_slabobject is redundant and so not used.
>>
>> 	A summary of proposed usage of PG_slab(S) and PG_slabobject(O) with
>> SLAB/SLUB/SLOB allocators as below:
>> pagesize	SLAB			SLUB			SLOB
>> 1page		S			S,O			S,O
>> 2page		S			S,O			S
>>> =4page		S			S			S
> 
> There is no point of recognizing such objects because those will be
> kmalloc objects and they can only be freed in a subsystem specific way.
> There is no standard way to even figure out which subsystem allocated
> them. So for all practical purposes those are unrecoverable.

Hi Chris,
	This patch is not for hotplug, but is to fix some issues in current
kernel, such as:
	1) make show_mem() on ARM and unicore32 report consistent information
no matter which slab allocator is used.
	2) make /proc/kpagecount and /proc/kpageflags return accurate information.
	3) Get rid of risks in mm/memory_failure.c and arch/ia64/kernel/mca_drv.c
	Thanks!


WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <jiang.liu@huawei.com>
To: Christoph Lameter <cl@linux.com>
Cc: Jiang Liu <liuj97@gmail.com>, Pekka Enberg <penberg@kernel.org>,
	Matt Mackall <mpm@selenic.com>, Mel Gorman <mgorman@suse.de>,
	Yinghai Lu <yinghai@kernel.org>, Tony Luck <tony.luck@intel.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	David Rientjes <rientjes@google.com>,
	Minchan Kim <minchan@kernel.org>,
	Keping Chen <chenkeping@huawei.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 2/4] mm: make consistent use of PG_slab flag
Date: Fri, 6 Jul 2012 16:30:20 +0800	[thread overview]
Message-ID: <4FF6A21C.9010509@huawei.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1207051236310.8670@router.home>

On 2012-7-6 1:37, Christoph Lameter wrote:
>> Hi Chris,
>> 	I think there's a little difference with SLUB and SLOB for compound page.
>> For SLOB, it relies on the page allocator to allocate compound page to fulfill
>> request bigger than one page. For SLUB, it relies on the page allocator if the
>> request is bigger than two pages. So SLUB may allocate a 2-pages compound page
>> to host SLUB managed objects.
>> 	My proposal may be summarized as below:
>> 	1) PG_slab flag marks a memory object is allocated from slab allocator.
>> 	2) PG_slabobject marks a (compound) page hosts SLUB/SLOB managed objects.
>> 	3) Only set PG_slab/PG_slabobject on the head page of compound pages.
>> 	4) For SLAB, PG_slabobject is redundant and so not used.
>>
>> 	A summary of proposed usage of PG_slab(S) and PG_slabobject(O) with
>> SLAB/SLUB/SLOB allocators as below:
>> pagesize	SLAB			SLUB			SLOB
>> 1page		S			S,O			S,O
>> 2page		S			S,O			S
>>> =4page		S			S			S
> 
> There is no point of recognizing such objects because those will be
> kmalloc objects and they can only be freed in a subsystem specific way.
> There is no standard way to even figure out which subsystem allocated
> them. So for all practical purposes those are unrecoverable.

Hi Chris,
	This patch is not for hotplug, but is to fix some issues in current
kernel, such as:
	1) make show_mem() on ARM and unicore32 report consistent information
no matter which slab allocator is used.
	2) make /proc/kpagecount and /proc/kpageflags return accurate information.
	3) Get rid of risks in mm/memory_failure.c and arch/ia64/kernel/mca_drv.c
	Thanks!

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

  reply	other threads:[~2012-07-06  9:20 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03  3:57 [RFC PATCH 1/4] mm: introduce a safer interface to check whether a page is managed by SLxB Jiang Liu
2012-07-03  3:57 ` Jiang Liu
2012-07-03  3:57 ` [RFC PATCH 2/4] mm: make consistent use of PG_slab flag Jiang Liu
2012-07-03  3:57   ` Jiang Liu
2012-07-05 14:47   ` Christoph Lameter
2012-07-05 14:47     ` Christoph Lameter
2012-07-05 16:15     ` Jiang Liu
2012-07-05 16:15       ` Jiang Liu
2012-07-05 17:37       ` Christoph Lameter
2012-07-05 17:37         ` Christoph Lameter
2012-07-06  8:30         ` Jiang Liu [this message]
2012-07-06  8:30           ` Jiang Liu
2012-07-06 13:53           ` Christoph Lameter
2012-07-06 13:53             ` Christoph Lameter
2012-07-03  3:57 ` [RFC PATCH 3/4] SLAB: minor code cleanup Jiang Liu
2012-07-03  3:57   ` Jiang Liu
2012-07-03 10:02   ` Cong Wang
2012-07-03  3:57 ` [RFC PATCH 4/4] mm: change slob's struct page definition to accomodate struct page changes Jiang Liu
2012-07-03  3:57   ` Jiang Liu
2012-07-03 10:22   ` Cong Wang
2012-07-03  9:56 ` [RFC PATCH 1/4] mm: introduce a safer interface to check whether a page is managed by SLxB Cong Wang
2012-07-05 14:45 ` Christoph Lameter
2012-07-05 14:45   ` Christoph Lameter
2012-07-05 15:55   ` Jiang Liu
2012-07-05 15:55     ` Jiang Liu
2012-07-05 17:36     ` Christoph Lameter
2012-07-05 17:36       ` Christoph Lameter
2012-07-06  7:29       ` Jiang Liu
2012-07-06  7:29         ` Jiang Liu
2012-07-06 13:50         ` Christoph Lameter
2012-07-06 13:50           ` Christoph Lameter
2012-07-06 15:36           ` Jiang Liu
2012-07-06 15:36             ` Jiang Liu
2012-09-04  9:18 ` Wen Congyang
2012-09-04  9:18   ` Wen Congyang
2012-09-04 12:13   ` Jiang Liu
2012-09-04 12:13     ` Jiang Liu

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=4FF6A21C.9010509@huawei.com \
    --to=jiang.liu@huawei.com \
    --cc=chenkeping@huawei.com \
    --cc=cl@linux.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liuj97@gmail.com \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=mpm@selenic.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=tony.luck@intel.com \
    --cc=yinghai@kernel.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.