All of lore.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Mike Galbraith <efault@gmx.de>
Cc: Lee Revell <rlrevell@joe-job.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, ck@vds.kolivas.org
Subject: Re: [PATCH] mm: Implement swap prefetching tweaks
Date: Sun, 12 Mar 2006 19:36:02 +1100	[thread overview]
Message-ID: <200603121936.02899.kernel@kolivas.org> (raw)
In-Reply-To: <1142141256.8021.18.camel@homer>

On Sunday 12 March 2006 16:27, Mike Galbraith wrote:
> On Sat, 2006-03-11 at 23:54 -0500, Lee Revell wrote:
> > echo 64 > /sys/block/hd*/queue/max_sectors_kb
> >
> > There is basically a straight linear relation between whatever you set
> > this to and the maximum scheduling latency you see.  It was developed to
> > solve the exact problem you are describing.
>
> Ah, a very useful bit of information, thanks.
>
> It won't help Con though, because he'll be dealing with every possible
> configuration.  I think he's going to have to either submit, wait,
> bandwidth limiting sleep, repeat or something clever that does that.
> Even with bandwidth restriction though, seek still bites mightily, so I
> suspect he's stuck with little trickles of IO started when we'd
> otherwise be idle.  We'll see I suppose.

What I'm doing with that last patch works fine - don't prefetch if anything 
else is running. Prefetching is not a performance critical function and we 
cannot know what tasks are scheduling latency sensitive. With that latest 
patch the most expensive thing is doing nr_running(). Assuming anything is 
running, it only needs to do that once every 5 seconds - and only after 
something is in swap. Furthermore it doesn't do it if swap prefetch is 
disabled with the tunable. I don't think this is an expensive operation in 
that context and certainly avoids any problems with it. 

I could hack in a weighted load variant of it so that prefetch does run when 
only nice 19 tasks are running on top of it so that perhaps low priority 
compiles, distributed computing clients et al don't prevent prefetching from 
happening - I could do this on top of the current patch. I'd like to see that 
last patch go in. Does anyone have another alternative? 

Cheers,
Con

  reply	other threads:[~2006-03-12  8:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-10  9:54 [PATCH] mm: Implement swap prefetching tweaks Con Kolivas
2006-03-10 22:35 ` Andrew Morton
2006-03-10 23:11   ` Peter Williams
2006-03-11  4:18     ` Con Kolivas
2006-03-11  4:28       ` Peter Williams
2006-03-11  4:34         ` Con Kolivas
2006-03-11  5:34           ` Peter Williams
2006-03-11  5:04       ` [ck] " Radoslaw Szkodzinski
2006-03-11  5:21         ` Con Kolivas
2006-03-11  5:46       ` Peter Williams
2006-03-11  3:50   ` Con Kolivas
2006-03-11  5:33     ` Mike Galbraith
2006-03-11  5:50       ` Con Kolivas
2006-03-11  5:58         ` Con Kolivas
2006-03-11  6:11           ` Mike Galbraith
2006-03-11  6:00         ` Mike Galbraith
2006-03-11  6:05           ` Mike Galbraith
2006-03-11  7:20             ` Con Kolivas
2006-03-11  7:44               ` Mike Galbraith
2006-03-11  8:16                 ` Nick Piggin
2006-03-11  8:22                   ` Mike Galbraith
2006-03-11  7:24           ` Con Kolivas
2006-03-11  7:51             ` Mike Galbraith
2006-03-11  8:15               ` Con Kolivas
2006-03-12  4:54               ` Lee Revell
2006-03-12  5:27                 ` Mike Galbraith
2006-03-12  8:36                   ` Con Kolivas [this message]
2006-03-14  6:40                 ` Mike Galbraith
2006-03-14  6:50                   ` Lee Revell
2006-03-14  7:06                     ` Mike Galbraith
2006-03-14  8:44                       ` Mike Galbraith
2006-03-14  8:05                     ` [ck] " Jens Axboe

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=200603121936.02899.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=akpm@osdl.org \
    --cc=ck@vds.kolivas.org \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.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.