linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@shadowen.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Pavel Emelianov <xemul@openvz.org>,
	Hugh Dickins <hugh@veritas.com>,
	Sudhir Kumar <skumar@linux.vnet.ibm.com>,
	YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
	Paul Menage <menage@google.com>,
	lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org,
	taka@valinux.co.jp, linux-mm@kvack.org,
	David Rientjes <rientjes@google.com>
Subject: Re: [PATCH] Move memory controller allocations to their own slabs (v3)
Date: Mon, 17 Mar 2008 11:25:48 +0000	[thread overview]
Message-ID: <20080317112548.GA3835@shadowen.org> (raw)
In-Reply-To: <20080314115645.e78b7f5c.kamezawa.hiroyu@jp.fujitsu.com>

On Fri, Mar 14, 2008 at 11:56:45AM +0900, KAMEZAWA Hiroyuki wrote:
> On Thu, 13 Mar 2008 19:33:07 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> 
> > 
> > 
> > Changelog v3
> > 
> > 1. Remove HWCACHE_ALIGN
> > 
> > Changelog v2
> > 
> > 1. Remove extra slab for mem_cgroup_per_zone
> > 
> > Move the memory controller data structure page_cgroup to its own slab cache.
> > It saves space on the system, allocations are not necessarily pushed to order
> > of 2 and should provide performance benefits. Users who disable the memory
> > controller can also double check that the memory controller is not allocating
> > page_cgroup's.
> > 
> > NOTE: Hugh Dickins brought up the issue of whether we want to mark page_cgroup
> > as __GFP_MOVABLE or __GFP_RECLAIMABLE. I don't think there is an easy
> > answer at the moment. page_cgroup's are associated with user pages,
> > they can be reclaimed once the user page has been reclaimed, so it might
> > make sense to mark them as __GFP_RECLAIMABLE. For now, I am leaving the
> > marking to default values that the slab allocator uses.
> > 
> > Comments?
> > 
> At first, in my understanding,
> - MOVABLE is for migratable pages. (so, not for kernel objects.)
> - RECLAIMABLE is for reclaimable kernel objects. (for slab etc..)

Yes, MOVABLE is for things which are very easily moved out, whether that
is migrated to another page, or paged out to swap, or trivially freed as
it can be re-read from somewhere such as text from a binary; generally
this is things on the LRU.

RECLAIMABLE, is things which are harder to get rid of, but for which
there is some hope of evicting their contents; as you say things like
those slab caches with shrinkers.

> All reclaimable objects are not necessary to be always reclaimable but
> some amount of RECLAIMABLE objects (not all) should be recraimable easily.
> For example, some of dentry-cache, inode-cache is reclaimable because *unused*
> objects are cached.
> 
> When it comes to page_cgroup, *all* objects has dependency to pages which are
> assigned to.  And user pages are reclaimable.
> There is a similar object....the radix tree. radix-tree's node is allocated as
> RECLAIMABLE object.
> 
> So I think it makes sense to changing page_cgroup to be reclaimable.

That sounds correct to me.

> But final decision should be done by how fragmentation avoidance works.
> It's good to test "how many hugepages can be allocated dynamically" when we
> make page_cgroup to be GFP_RECAIMABLE 

-apw

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

      parent reply	other threads:[~2008-03-17 11:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 14:03 [PATCH] Move memory controller allocations to their own slabs (v3) Balbir Singh
2008-03-14  2:56 ` KAMEZAWA Hiroyuki
2008-03-14 11:16   ` Hugh Dickins
2008-03-17 11:25   ` Andy Whitcroft [this message]

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=20080317112548.GA3835@shadowen.org \
    --to=apw@shadowen.org \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=hugh@veritas.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    --cc=rientjes@google.com \
    --cc=skumar@linux.vnet.ibm.com \
    --cc=taka@valinux.co.jp \
    --cc=xemul@openvz.org \
    --cc=yamamoto@valinux.co.jp \
    /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).