All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>,
	Andrew Morton <AKPM@Osdl.ORG>,
	Linux MM Mailing List <linux-mm@kvack.org>
Subject: Re: [PATCH]: 4/4 cluster page-out in VM scanner
Date: Sun, 21 Nov 2004 09:12:08 -0800	[thread overview]
Message-ID: <41A0CC68.8000405@namesys.com> (raw)
In-Reply-To: <16800.47066.827146.370838@gargle.gargle.HOWL>

How well does this integrate with reiser4.;-)

Hans

Nikita Danilov wrote:

>Implement pageout clustering at the VM level.
>
>With this patch VM scanner calls pageout_cluster() instead of
>->writepage(). pageout_cluster() tries to find a group of dirty pages around
>target page, called "pivot" page of the cluster. If group of suitable size is
>found, ->writepages() is called for it, otherwise, page_cluster() falls back
>to ->writepage().
>
>This is supposed to help in work-loads with significant page-out of
>file-system pages from tail of the inactive list (for example, heavy dirtying
>through mmap), because file system usually writes multiple pages more
>efficiently. Should also be advantageous for file-systems doing delayed
>allocation, as in this case they will allocate whole extents at once.
>
>Few points:
>
> - swap-cache pages are not clustered (although they can be, but by
>   page->private rather than page->index)
>
> - currently, kswapd clusters all the time, and direct reclaim only when
>   device queue is not congested. Probably direct reclaim shouldn't cluster at
>   all.
>
> - this patch adds new fields to struct writeback_control and expects
>   ->writepages() to interpret them. This is needed, because pageout_cluster()
>   calls ->writepages() with pivot page already locked, so that ->writepages()
>   is allowed to only trylock other pages in the cluster.
>
>   Besides, rather rough plumbing (wbc->pivot_ret field) is added to check
>   whether ->writepages() failed to write pivot page for any reason (in latter
>   case page_cluster() falls back to ->writepage()).
>
>   Only mpage_writepages() was updated to honor these new fields, but
>   all in-tree ->writepages() implementations seem to call
>   mpage_writepages(). (Except reiser4, of course, for which I'll send a
>   (trivial) patch, if necessary).
>
>Numbers that talk:
>
>Averaged number of microseconds it takes to dirty 1GB of
>16-times-larger-than-RAM ext3 file mmaped in 1GB chunks:
>
>without-patch:   average:    74188417.156250
>               deviation:    10538258.613280
>
>   with-patch:   average:    69449001.583333
>               deviation:    12621756.615280
>
>(Patch is for 2.6.10-rc2)
>
>  
>


WARNING: multiple messages have this Message-ID (diff)
From: Hans Reiser <reiser@namesys.com>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>,
	Andrew Morton <AKPM@Osdl.ORG>,
	Linux MM Mailing List <linux-mm@kvack.org>
Subject: Re: [PATCH]: 4/4 cluster page-out in VM scanner
Date: Sun, 21 Nov 2004 09:12:08 -0800	[thread overview]
Message-ID: <41A0CC68.8000405@namesys.com> (raw)
In-Reply-To: <16800.47066.827146.370838@gargle.gargle.HOWL>

How well does this integrate with reiser4.;-)

Hans

Nikita Danilov wrote:

>Implement pageout clustering at the VM level.
>
>With this patch VM scanner calls pageout_cluster() instead of
>->writepage(). pageout_cluster() tries to find a group of dirty pages around
>target page, called "pivot" page of the cluster. If group of suitable size is
>found, ->writepages() is called for it, otherwise, page_cluster() falls back
>to ->writepage().
>
>This is supposed to help in work-loads with significant page-out of
>file-system pages from tail of the inactive list (for example, heavy dirtying
>through mmap), because file system usually writes multiple pages more
>efficiently. Should also be advantageous for file-systems doing delayed
>allocation, as in this case they will allocate whole extents at once.
>
>Few points:
>
> - swap-cache pages are not clustered (although they can be, but by
>   page->private rather than page->index)
>
> - currently, kswapd clusters all the time, and direct reclaim only when
>   device queue is not congested. Probably direct reclaim shouldn't cluster at
>   all.
>
> - this patch adds new fields to struct writeback_control and expects
>   ->writepages() to interpret them. This is needed, because pageout_cluster()
>   calls ->writepages() with pivot page already locked, so that ->writepages()
>   is allowed to only trylock other pages in the cluster.
>
>   Besides, rather rough plumbing (wbc->pivot_ret field) is added to check
>   whether ->writepages() failed to write pivot page for any reason (in latter
>   case page_cluster() falls back to ->writepage()).
>
>   Only mpage_writepages() was updated to honor these new fields, but
>   all in-tree ->writepages() implementations seem to call
>   mpage_writepages(). (Except reiser4, of course, for which I'll send a
>   (trivial) patch, if necessary).
>
>Numbers that talk:
>
>Averaged number of microseconds it takes to dirty 1GB of
>16-times-larger-than-RAM ext3 file mmaped in 1GB chunks:
>
>without-patch:   average:    74188417.156250
>               deviation:    10538258.613280
>
>   with-patch:   average:    69449001.583333
>               deviation:    12621756.615280
>
>(Patch is for 2.6.10-rc2)
>
>  
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  reply	other threads:[~2004-11-21 17:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-21 15:44 [PATCH]: 4/4 cluster page-out in VM scanner Nikita Danilov
2004-11-21 15:44 ` Nikita Danilov
2004-11-21 17:12 ` Hans Reiser [this message]
2004-11-21 17:12   ` Hans Reiser

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=41A0CC68.8000405@namesys.com \
    --to=reiser@namesys.com \
    --cc=AKPM@Osdl.ORG \
    --cc=Linux-Kernel@Vger.Kernel.ORG \
    --cc=linux-mm@kvack.org \
    --cc=nikita@clusterfs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.