lkml.org 
[lkml]   [2006]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Remove softlockup from invalidate_mapping_pages.
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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-20 12:55    [W:0.897 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site