Re: [PATCH] Remove softlockup from invalidate_mapping_pages.

From: Jens Axboe
Date: Thu Apr 20 2006 - 05:59:39 EST


On Thu, Apr 20 2006, Neil Brown wrote:
> On Thursday April 20, axboe@xxxxxxx wrote:
> > > >
> > > > We're not supposed to look at page->index of an unlocked page.
> > >
> > > We're not? Does Jens know that?
> > > __generic_file_splice_read seems to violate this principle!
> >
> > Hmmm, where?
> >
> 2.6.17-rc1-mm1
> fs/splice.c
>
> static int __generic_file_splice_read(struct file *in, struct inode *pipe,
> size_t len, unsigned int flags)
> {
> ...snip....
> do_page_cache_readahead(mapping, in, index, nr_pages);
>
> /*
> * Get as many pages from the page cache as possible..
> * Start IO on the page cache entries we create (we
> * can assume that any pre-existing ones we find have
> * already had IO started on them).
> */
> i = find_get_pages(mapping, index, nr_pages, pages);
>
> /*
> * common case - we found all pages and they are contiguous,
> * kick them off
> */
> if (i && (pages[i - 1]->index == index + i - 1))
> ^^^^^^^^^^^^^^^^^^^^
> ***There and
> goto splice_them;
>
> /*
> * fill shadow[] with pages at the right locations, so we only
> * have to fill holes
> */
> memset(shadow, 0, nr_pages * sizeof(struct page *));
> for (j = 0; j < i; j++)
> shadow[pages[j]->index - index] = pages[j];
> ^^^^^^^^^^^^^^^^
>
> ***There

That code is ancient :-). See -rc2.

--
Jens Axboe

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