All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, torvalds@osdl.org
Subject: Re: [PATCH] splice SPLICE_F_MOVE support
Date: Fri, 31 Mar 2006 21:53:30 +0200	[thread overview]
Message-ID: <20060331195330.GG14022@suse.de> (raw)
In-Reply-To: <442CED15.7000303@yahoo.com.au>

On Fri, Mar 31 2006, Nick Piggin wrote:
> Jens Axboe wrote:
> >Hi,
> >
> >This applies on top of the splice #3 just posted, adding support for
> >moving of pages. The caller can use the SPLICE_F_MOVE flag to the splice
> >syscall to ask the kernel to try and move pages, if needed.
> >
> >Disclaimer: this works for me, but may have vm issues that I missed.
> >CC'ing Nick :-)
> >
> 
> Like Andrew said, you can't check PageLRU without holding zone->lru_lock.
> The page release code can get away with it only because the page refcount
> is 0 at that point. Also, you can't reliably remove pages from the LRU
> unless the refcount is 0. Ever.
> 
> The following (untested) is something like what I had in mind, and should
> get stealing closer to working. I've only given it a quick review so far
> (btw. why do you only unlock the page if it hasn't been stolen?)

The current branch does not :)

> With this patch, the ->steal will indicate if the page had been on the
> LRU or not. If not, then add it; if yes, then do nothing.
> 
> There is no caller of ->steal yet that wants the page off the LRU (is
> there?). That's a bit harder.

Thanks Nick, but would you care to rebase it off the 'splice' branch?
There's already some changes in this area (notably, getting rid of
->stolen).

git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git splice

-- 
Jens Axboe


  reply	other threads:[~2006-03-31 19:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30 13:15 [PATCH] splice support #3 Jens Axboe
2006-03-30 13:19 ` [PATCH] splice SPLICE_F_MOVE support Jens Axboe
2006-03-31  8:49   ` Nick Piggin
2006-03-31 19:53     ` Jens Axboe [this message]
2006-03-30 14:25 ` [PATCH] splice support #3 Christoph Hellwig
2006-03-30 14:37   ` Jens Axboe

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=20060331195330.GG14022@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=torvalds@osdl.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.