linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Nikita Danilov <nikita@clusterfs.com>
Cc: linux-mm@kvack.org
Subject: Re: [PATCH]: VM 5/8 async-writepage
Date: Mon, 25 Apr 2005 20:57:06 -0700	[thread overview]
Message-ID: <20050425205706.55fe9833.akpm@osdl.org> (raw)
In-Reply-To: <16994.40662.865338.484778@gargle.gargle.HOWL>

Nikita Danilov <nikita@clusterfs.com> wrote:
>
>  Perform some calls to the ->writepage() asynchronously.
> 
>  VM scanner starts pageout for dirty pages found at tail of the inactive list
>  during scan. It is supposed (or at least desired) that under normal conditions
>  amount of such write back is small.
> 
>  Even if few pages are paged out by scanner, they still stall "direct reclaim"
>  path (__alloc_pages()->try_to_free_pages()->...->shrink_list()->writepage()),
>  and to decrease allocation latency it makes sense to perform pageout
>  asynchronously.
> 
>  Current design is very simple: at the boot-up fixed number of pageout threads
>  is started. If shrink_list() decides that page is eligible for the
>  asynchronous pageout, it is placed into shared queue and later processed by
>  one of pageout threads.
> 
>  Most interesting part of this patch is async_writepage() that decides when
>  page should be paged out asynchronously.

I don't understand this at all.  ->writepage() is _already_ asynchronous. 
It will only block under rare circumstances such as needing to perform a
metadata read or encountering disk queue congestion.

In a way, kswapd already does what these new threads are supposed to do
anyway.  If you were to do your PG_skipped trick with direct-reclaim
threads and not with kswapd then you'd get a smiliar effect to this patch,
no?

Anyway, I'll cautiously take a pass on this patch.
--
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>

  parent reply	other threads:[~2005-04-26  3:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17 17:37 Nikita Danilov
2005-04-18  1:10 ` Nick Piggin
2005-04-26  3:57 ` Andrew Morton [this message]
2005-04-26  8:22   ` Nikita Danilov
2005-04-26  8:36     ` Andrew Morton
2005-04-26 10:05       ` Nikita Danilov
2005-04-26 10:22         ` Nick Piggin

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=20050425205706.55fe9833.akpm@osdl.org \
    --to=akpm@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox