All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Con Kolivas <kernel@kolivas.org>
Cc: Chuck Ebbert <cebbert@redhat.com>,
	michael chang <thenewme91@gmail.com>,
	ck mailing list <ck@vds.kolivas.org>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [ck] Re: 2.6.20-ck1
Date: Sat, 17 Feb 2007 15:47:46 -0800	[thread overview]
Message-ID: <20070217154746.7ff10870.akpm@linux-foundation.org> (raw)
In-Reply-To: <200702180800.07393.kernel@kolivas.org>

On Sun, 18 Feb 2007 08:00:06 +1100 Con Kolivas <kernel@kolivas.org> wrote:

> On Sunday 18 February 2007 05:45, Chuck Ebbert wrote:
> ...
> > But the one I like, mm-filesize_dependant_lru_cache_add.patch,
> > has an on-off switch.
> >
>
> ...
>
> Do you still want this patch for mainline?... 

Don't think so.  The problems I see are:

- It's a system-wide knob.  In many situations this will do the wrong
  thing.  Controlling pagecache should be per-process.

- Its heuristics for working out when to invalidate the pagecache will be
  too much for some situations and too little for others.

- Whatever we do, there will be some applications in some situations
  which are hurt badly by changes like this: they'll do heaps of extra IO.


Generally, the penalties for getting this stuff wrong are very very high:
orders of magnitude slowdowns in the right situations.  Which I suspect
will make any system-wide knob ultimately unsuccessful.

The ideal way of getting this *right* is to change every application in the
world to get smart about using sync_page_range() and/or posix_fadvise(),
then to add a set of command-line options to each application in the world
so the user can control its pagecache handling.

Obviously that isn't practical.  But what _could_ be done is to put these
pagecache smarts into glibc's read() and write() code.  So the user can do:

	MAX_PAGECACHE=4M MAX_DIRTY_PAGECACHE=2M rsync foo bar

This will provide pagecache control for pretty much every application.  It
has limitations (fork+exec behaviour??) but will be useful.


A kernel-based solution might use new rlimits, but would not be as flexible
or successful as a libc-based one, I suspect.


  parent reply	other threads:[~2007-02-17 23:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-16 10:10 2.6.20-ck1 Con Kolivas
2007-02-16 15:47 ` 2.6.20-ck1 Malte Schröder
2007-02-16 21:35 ` 2.6.20-ck1 Edouard Gomez
2007-02-16 21:45   ` 2.6.20-ck1 Edouard Gomez
2007-02-17  0:53 ` 2.6.20-ck1 Chuck Ebbert
2007-02-17  1:13   ` 2.6.20-ck1 Con Kolivas
2007-02-17  2:15     ` [ck] 2.6.20-ck1 michael chang
2007-02-17  3:17       ` Con Kolivas
2007-02-17 17:28         ` michael chang
2007-02-17 18:45         ` Chuck Ebbert
2007-02-17 21:00           ` Con Kolivas
2007-02-17 21:50             ` michael chang
2007-02-17 23:47             ` Andrew Morton [this message]
2007-02-18  0:39               ` 2.6.20-ck1 Con Kolivas
2007-02-18  0:41               ` [ck] 2.6.20-ck1 Radoslaw Szkodzinski
2007-02-18  0:45                 ` 2.6.20-ck1 Con Kolivas
2007-02-17 11:15 ` 2.6.20-ck1 Hugo Vanwoerkom
2007-02-18  2:14 ` 2.6.20-ck1 mdew .
2007-02-18  2:38   ` 2.6.20-ck1 Con Kolivas
2007-02-18  6:05     ` [ck] 2.6.20-ck1 Con Kolivas
2007-02-18  6:15     ` Rodney Gordon II
2007-02-18  6:20       ` Rodney Gordon II
2007-02-18 16:54     ` 2.6.20-ck1 Ryan M.
2007-02-18 19:00     ` [ck] 2.6.20-ck1 Ash Milsted
2007-02-24 12:12 ` 2.6.20-ck1 Fabio Comolli
2007-02-25  4:34 ` 2.6.20-ck1 Gene Heskett
2007-02-25 10:32   ` 2.6.20-ck1 Con Kolivas
2007-02-25 16:33     ` 2.6.20-ck1 Gene Heskett

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=20070217154746.7ff10870.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cebbert@redhat.com \
    --cc=ck@vds.kolivas.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thenewme91@gmail.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.