Re: mmap over nfs leads to excessive system load

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

 



Trond Myklebust <[email protected]> wrote:
>
> On Wed, 2005-11-16 at 07:01 -0800, Kenny Simpson wrote:
> > --- Trond Myklebust <[email protected]> wrote:
> > > Anyhow, does the following patch help?
> > 
> > Unfortunately, not:
> > 
> > samples  %        symbol name
> > 545009   15.2546  find_get_pages_tag
> 
> Argh... I totally missed the point there with the last patch. We should
> be resyncing the page tag with the value of the PG_dirty flag...
> 
> OK, please back out the patch that I sent you, and try this one instead.
> 
> ...
> diff --git a/fs/nfs/write.c b/fs/nfs/write.c
> index 8f71e76..61ec355 100644
> --- a/fs/nfs/write.c
> +++ b/fs/nfs/write.c
> @@ -213,6 +213,7 @@ static int nfs_writepage_sync(struct nfs
>  	} while (count);
>  	/* Update file length */
>  	nfs_grow_file(page, offset, written);
> +	clear_page_dirty_tag(page);
>  	/* Set the PG_uptodate flag? */
>  	nfs_mark_uptodate(page, offset, written);
>
> ....  
> +int clear_page_dirty_tag(struct page *page)
> +{
> +	struct address_space *mapping = page_mapping(page);
> +
> +	if (mapping) {
> +		unsigned long flags;
> +
> +		write_lock_irqsave(&mapping->tree_lock, flags);
> +		if (!PageDirty(page))
> +			radix_tree_tag_clear(&mapping->page_tree,
> +						page_index(page),
> +						PAGECACHE_TAG_DIRTY);
> +		write_unlock_irqrestore(&mapping->tree_lock, flags);
> +	}
> +}

That will fix it, but the PageWriteback accounting is still wrong.

Is it not possible to use set_page_writeback()/end_page_writeback()?

Are these pages marked "unstable" at this time?
-
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