All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Williams <pwil3058@bigpond.net.au>
To: Con Kolivas <kernel@kolivas.org>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, ck@vds.kolivas.org
Subject: Re: [PATCH] mm: Implement swap prefetching tweaks
Date: Sat, 11 Mar 2006 16:34:27 +1100	[thread overview]
Message-ID: <44126163.7000106@bigpond.net.au> (raw)
In-Reply-To: <200603111534.53220.kernel@kolivas.org>

Con Kolivas wrote:
> On Saturday 11 March 2006 15:28, Peter Williams wrote:
> 
>>Con Kolivas wrote:
>>
>>>Because despite what anyone seems to want to believe, reading from disk
>>>hurts. Why it hurts so much I'm not really sure, but it's not a SCSI vs
>>>IDE with or without DMA issue. It's not about tweaking parameters. It
>>>doesn't seem to be only about cpu cycles. This is not a mistuned system
>>>that it happens on. It just plain hurts if we do lots of disk i/o,
>>>perhaps it's saturating the bus or something. Whatever it is, as much as
>>>I'd _like_ swap prefetch to just keep working quietly at ultra ultra low
>>>priority, the disk reads that swap prefetch does are not innocuous so I
>>>really do want them to only be done when nothing else wants cpu.
> 
> 
> I didn't make it clear here the things affected are not even doing any I/O of 
> their own. It's not about I/O resource allocation. However they are using 
> 100% cpu and probably doing a lot of gpu bus traffic.
> 
> 
>>Would you like to try a prototype version of the soft caps patch I'm
>>working on to see if it will help?
> 
> 
> What happens if it's using .01% cpu and spends most of its time in 
> uninterruptible sleep?

Probably not much as I have to let tasks with a soft cap of zero get 
some CPU to avoid problems with them holding resource other tasks may 
need and 0.01% is probably as low as I can keep it anyway.

Just to clarify.  At the moment, what I do to a task with a zero soft 
cap is give them a priority one above MAX_PRIO (i.e. 2 higher than any 
other task can have) and make sure they always go on the expired array 
at the end of their time slice.  They also get a load weight of zero to 
prevent them getting a CPU to themselves.  This means that any task that 
becomes runnable on their CPU should preempt them and if they're the 
only task on their CPU it will look idle and waking tasks may be moved 
there if the other CPUs are idle.  This may be enough to stop them 
interfering with your game's tasks.

I'm currently letting them have a time slice determined by their nice in 
an attempt to reduce context switching but this may change as it 
probably allows them to get CPU access when there are non background 
tasks on the expired array.  I'm still thinking about how to prevent 
this and keep context switching low.

Tasks with non zero soft caps go through a different process and (as far 
as possible) tasks without soft caps avoid the capping code.

Peter
PS This is still work in progress.
-- 
Peter Williams                                   pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce

  reply	other threads:[~2006-03-11  5:34 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 [this message]
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
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=44126163.7000106@bigpond.net.au \
    --to=pwil3058@bigpond.net.au \
    --cc=akpm@osdl.org \
    --cc=ck@vds.kolivas.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.