linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Neil Brown <neilb@suse.de>,
	linux-kernel@vger.kernel.org, sgunderson@bigfoot.com
Subject: Re: [PATCH] Remove softlockup from invalidate_mapping_pages.
Date: Thu, 20 Apr 2006 12:52:09 +0200	[thread overview]
Message-ID: <20060420105209.GC13279@suse.de> (raw)
In-Reply-To: <20060420025211.784222d5.akpm@osdl.org>

On Thu, Apr 20 2006, Andrew Morton wrote:
> >  Does Jens know that?
> > __generic_file_splice_read seems to violate this principle!
> 
> It looks OK from a quick read (but the code duplication is saddening)

Yes, it saddens me too. There really are a bunch of cases to check for
on each page that is shared with do_generic_mapping_read(), I'll see if
I can do something about that.

> > So when I have a cleared head and a bit more time I'll see if I can
> > come up with a better patch which only looks at ->index under
> > ->tree_lock.
> 
> tree_lock will stabilise ->index, yes.
> 
> But I think we'd be OK assuming that ->index is stable.  Although that may
> break if splice() is concurrently pulling the page out of pagecache and
> stuffing it into a pipe.  

Putting the page in the pipe is a simple reference operations. However,
we can migrate a page from a pipe into the page cache in another address
space. If we do that, we will lock the page first though. And the actual
->index change is inside the tree_lock, outside of splice itself.

So with splice migrating pages, ->index and ->mapping can and will
change but only with the page locked.

-- 
Jens Axboe


  reply	other threads:[~2006-04-20 10:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060420160549.7637.patches@notabene>
2006-04-20  6:29 ` [PATCH] Remove softlockup from invalidate_mapping_pages NeilBrown
2006-04-20  7:38   ` Andrew Morton
2006-04-20  9:24     ` Neil Brown
2006-04-20  9:30       ` Jens Axboe
2006-04-20  9:50         ` Neil Brown
2006-04-20  9:59           ` Jens Axboe
2006-04-20 10:26             ` Neil Brown
2006-04-20  9:52       ` Andrew Morton
2006-04-20 10:52         ` Jens Axboe [this message]
2006-04-26 20:48     ` Steinar H. Gunderson
2006-04-26 20:58       ` Andrew Morton
2006-04-26 21:26         ` Steinar H. Gunderson
2006-05-01 16:07           ` Steinar H. Gunderson
2006-05-13 13:49         ` [PATCH] Remove softlockup from invalidate_mapping_pages. (might be dm related) Steinar H. Gunderson
2006-05-13 14:33           ` Andrew Morton
2006-05-13 14:43             ` Steinar H. Gunderson
2006-05-13 14:51               ` Andrew Morton
2006-05-13 15:00                 ` Steinar H. Gunderson
2006-05-13 15:24                   ` Andrew Morton
2006-05-13 15:32                     ` Steinar H. Gunderson
2006-05-13 15:43                       ` Andrew Morton
2006-05-13 17:14                         ` Steinar H. Gunderson
2006-05-13 23:28                           ` Steinar H. Gunderson
2006-05-13 22:37                         ` [dm-devel] " Alasdair G Kergon

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=20060420105209.GC13279@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=sgunderson@bigfoot.com \
    /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).