All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Neil Brown <neilb@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	netdev@vger.kernel.org, trond.myklebust@fys.uio.no,
	Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH 00/28] Swap over NFS -v16
Date: Fri, 29 Feb 2008 13:18:53 +0100	[thread overview]
Message-ID: <1204287533.6243.105.camel@lappy> (raw)
In-Reply-To: <84144f020802290358t2774f7bwd87efe79e7bd4235@mail.gmail.com>


On Fri, 2008-02-29 at 13:58 +0200, Pekka Enberg wrote:
> Hi Peter,
> 
> On Fri, Feb 29, 2008 at 1:51 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> >  I made page->reserve into PG_emergency and made that bit stick for the
> >  lifetime of that page allocation. I then made kmem_is_emergency() look
> >  up the head page backing that allocation's slab and return
> >  PageEmergency().
> 
> [snip]
> 
> On Fri, Feb 29, 2008 at 1:51 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> >  This is a stricter model than I had before, and has one ramification I'm
> >  not entirely sure I like.
> >
> >  It means the page remains a reserve page throughout its lifetime, which
> >  means the slab remains a reserve slab throughout its lifetime. Therefore
> >  it may never be used for !reserve allocations. Which in turn generates
> >  complexities for the partial list.
> 
> Hmm, so why don't we then clear the PG_emergency flag then 

Clearing PG_emergency would mean kmem_is_emergency() would return false
in kfree_reserve() and fail to un-charge the object.

Previously objects would track their account status themselves (when
needed) and freeing PG_emergency wouldn't be a problem.

> and allocate a new fresh page to the reserves?

Not sure I understand this properly. We would only do this once the page
watermarks are high enough, so the reserves are full again.

> On Fri, Feb 29, 2008 at 1:51 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> >  Does this sound like something I should pursuit? I feel it might
> >  complicate the slab allocators too much..
> 
> I can't answer that question until I see the code ;-). But overall, I
> think it's better to put that code in SLUB rather than trying to work
> around it elsewhere. The fact is, as soon as you have some sort of
> reservation for _objects_, you need help from the SLUB allocator.

Well, I agree with that consolidating it makes sense. And like I said,
it gives pretty code. However, it also puts the burden of this feature
on everyone and might affect performance - still its only the slow path,
but still.



WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Neil Brown <neilb@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	netdev@vger.kernel.org, trond.myklebust@fys.uio.no,
	Christoph Lameter <clameter@sgi.com>
Subject: Re: [PATCH 00/28] Swap over NFS -v16
Date: Fri, 29 Feb 2008 13:18:53 +0100	[thread overview]
Message-ID: <1204287533.6243.105.camel@lappy> (raw)
In-Reply-To: <84144f020802290358t2774f7bwd87efe79e7bd4235@mail.gmail.com>

On Fri, 2008-02-29 at 13:58 +0200, Pekka Enberg wrote:
> Hi Peter,
> 
> On Fri, Feb 29, 2008 at 1:51 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> >  I made page->reserve into PG_emergency and made that bit stick for the
> >  lifetime of that page allocation. I then made kmem_is_emergency() look
> >  up the head page backing that allocation's slab and return
> >  PageEmergency().
> 
> [snip]
> 
> On Fri, Feb 29, 2008 at 1:51 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> >  This is a stricter model than I had before, and has one ramification I'm
> >  not entirely sure I like.
> >
> >  It means the page remains a reserve page throughout its lifetime, which
> >  means the slab remains a reserve slab throughout its lifetime. Therefore
> >  it may never be used for !reserve allocations. Which in turn generates
> >  complexities for the partial list.
> 
> Hmm, so why don't we then clear the PG_emergency flag then 

Clearing PG_emergency would mean kmem_is_emergency() would return false
in kfree_reserve() and fail to un-charge the object.

Previously objects would track their account status themselves (when
needed) and freeing PG_emergency wouldn't be a problem.

> and allocate a new fresh page to the reserves?

Not sure I understand this properly. We would only do this once the page
watermarks are high enough, so the reserves are full again.

> On Fri, Feb 29, 2008 at 1:51 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> >  Does this sound like something I should pursuit? I feel it might
> >  complicate the slab allocators too much..
> 
> I can't answer that question until I see the code ;-). But overall, I
> think it's better to put that code in SLUB rather than trying to work
> around it elsewhere. The fact is, as soon as you have some sort of
> reservation for _objects_, you need help from the SLUB allocator.

Well, I agree with that consolidating it makes sense. And like I said,
it gives pretty code. However, it also puts the burden of this feature
on everyone and might affect performance - still its only the slow path,
but still.


--
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:[~2008-02-29 12:20 UTC|newest]

Thread overview: 146+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 14:46 [PATCH 00/28] Swap over NFS -v16 Peter Zijlstra
2008-02-20 14:46 ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 01/28] mm: gfp_to_alloc_flags() Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 02/28] mm: tag reseve pages Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 03/28] mm: slb: add knowledge of reserve pages Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 04/28] mm: kmem_estimate_pages() Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:05   ` Andrew Morton
2008-02-23  8:05     ` Andrew Morton
2008-02-20 14:46 ` [PATCH 05/28] mm: allow PF_MEMALLOC from softirq context Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:05   ` Andrew Morton
2008-02-23  8:05     ` Andrew Morton
2008-02-20 14:46 ` [PATCH 06/28] mm: serialize access to min_free_kbytes Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 07/28] mm: emergency pool Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:05   ` Andrew Morton
2008-02-23  8:05     ` Andrew Morton
2008-02-20 14:46 ` [PATCH 08/28] mm: system wide ALLOC_NO_WATERMARK Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:05   ` Andrew Morton
2008-02-23  8:05     ` Andrew Morton
2008-02-20 14:46 ` [PATCH 09/28] mm: __GFP_MEMALLOC Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:06   ` Andrew Morton
2008-02-23  8:06     ` Andrew Morton
2008-02-20 14:46 ` [PATCH 10/28] mm: memory reserve management Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:06   ` Andrew Morton
2008-02-23  8:06     ` Andrew Morton
2008-02-20 14:46 ` [PATCH 11/28] selinux: tag avc cache alloc as non-critical Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 12/28] net: wrap sk->sk_backlog_rcv() Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 13/28] net: packet split receive api Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 14/28] net: sk_allocation() - concentrate socket related allocations Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 15/28] netvm: network reserve infrastructure Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:06   ` Andrew Morton
2008-02-23  8:06     ` Andrew Morton
2008-02-24  6:52   ` Mike Snitzer
2008-02-24  6:52     ` Mike Snitzer
2008-02-20 14:46 ` [PATCH 16/28] netvm: INET reserves Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 17/28] netvm: hook skb allocation to reserves Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:06   ` Andrew Morton
2008-02-23  8:06     ` Andrew Morton
2008-02-20 14:46 ` [PATCH 18/28] netvm: filter emergency skbs Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 19/28] netvm: prevent a stream specific deadlock Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 20/28] netfilter: NF_QUEUE vs emergency skbs Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 21/28] netvm: skb processing Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 22/28] mm: add support for non block device backed swap files Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 16:30   ` Randy Dunlap
2008-02-20 16:30     ` Randy Dunlap
2008-02-20 16:46     ` Peter Zijlstra
2008-02-20 16:46       ` Peter Zijlstra
2008-02-26 12:45   ` Miklos Szeredi
2008-02-26 12:45     ` Miklos Szeredi
2008-02-26 12:58     ` Peter Zijlstra
2008-02-26 12:58       ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 23/28] mm: methods for teaching filesystems about PG_swapcache pages Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 24/28] nfs: remove mempools Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 25/28] nfs: teach the NFS client how to treat PG_swapcache pages Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 26/28] nfs: disable data cache revalidation for swapfiles Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 27/28] nfs: enable swap on NFS Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-20 14:46 ` [PATCH 28/28] nfs: fix various memory recursions possible with swap over NFS Peter Zijlstra
2008-02-20 14:46   ` Peter Zijlstra
2008-02-23  8:06 ` [PATCH 00/28] Swap over NFS -v16 Andrew Morton
2008-02-23  8:06   ` Andrew Morton
2008-02-26  6:03   ` Neil Brown
2008-02-26  6:03     ` Neil Brown
2008-02-26 10:50     ` Peter Zijlstra
2008-02-26 10:50       ` Peter Zijlstra
2008-02-26 12:00       ` Peter Zijlstra
2008-02-26 12:00         ` Peter Zijlstra
2008-02-26 15:29       ` Miklos Szeredi
2008-02-26 15:29         ` Miklos Szeredi
2008-02-26 15:41         ` Peter Zijlstra
2008-02-26 15:41           ` Peter Zijlstra
2008-02-26 15:43         ` Peter Zijlstra
2008-02-26 15:43           ` Peter Zijlstra
2008-02-26 15:47           ` Miklos Szeredi
2008-02-26 15:47             ` Miklos Szeredi
2008-02-26 17:56       ` Andrew Morton
2008-02-26 17:56         ` Andrew Morton
2008-02-27  5:51       ` Neil Brown
2008-02-27  5:51         ` Neil Brown
2008-02-27  7:58         ` Peter Zijlstra
2008-02-27  7:58           ` Peter Zijlstra
2008-02-27  8:05           ` Pekka Enberg
2008-02-27  8:05             ` Pekka Enberg
2008-02-27  8:14             ` Peter Zijlstra
2008-02-27  8:14               ` Peter Zijlstra
2008-02-27  8:33               ` Peter Zijlstra
2008-02-27  8:33                 ` Peter Zijlstra
2008-02-27  8:43                 ` Pekka J Enberg
2008-02-27  8:43                   ` Pekka J Enberg
2008-02-29 11:51             ` Peter Zijlstra
2008-02-29 11:51               ` Peter Zijlstra
2008-02-29 11:58               ` Pekka Enberg
2008-02-29 11:58                 ` Pekka Enberg
2008-02-29 12:18                 ` Peter Zijlstra [this message]
2008-02-29 12:18                   ` Peter Zijlstra
2008-02-29 12:29                   ` Pekka Enberg
2008-02-29 12:29                     ` Pekka Enberg
2008-02-29  1:29           ` Neil Brown
2008-02-29  1:29             ` Neil Brown
2008-02-29 10:21             ` Peter Zijlstra
2008-02-29 10:21               ` Peter Zijlstra
2008-03-02 22:18               ` Neil Brown
2008-03-02 22:18                 ` Neil Brown
2008-03-02 23:33                 ` Peter Zijlstra
2008-03-02 23:33                   ` Peter Zijlstra
2008-03-03 23:41                   ` Neil Brown
2008-03-03 23:41                     ` Neil Brown
2008-03-04 10:28                     ` Peter Zijlstra
2008-03-04 10:28                       ` Peter Zijlstra
     [not found]           ` <1837 <1204626509.6241.39.camel@lappy>
2008-03-07  3:33             ` Neil Brown
2008-03-07  3:33               ` Neil Brown
2008-03-07 11:17               ` Peter Zijlstra
2008-03-07 11:17                 ` Peter Zijlstra
2008-03-07 11:55                 ` Peter Zijlstra
2008-03-07 11:55                   ` Peter Zijlstra
2008-03-10  5:15                 ` Neil Brown
2008-03-10  5:15                   ` Neil Brown
2008-03-10  9:17                   ` Peter Zijlstra
2008-03-10  9:17                     ` Peter Zijlstra
2008-03-14  5:22                     ` Neil Brown
2008-03-14  5:22                       ` Neil Brown

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=1204287533.6243.105.camel@lappy \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=torvalds@linux-foundation.org \
    --cc=trond.myklebust@fys.uio.no \
    /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.