Re: [PATCH] Remove softlockup from invalidate_mapping_pages.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 20 2006, Neil Brown wrote:
> On Thursday April 20, [email protected] 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux