mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: davidsen@tmr.com (bill davidsen)
To: linux-kernel@vger.kernel.org
Subject: Re: [patch] scheduler cache affinity improvement for 2.4 kernels
Date: Mon, 19 Nov 2001 13:34:32 -0500	[thread overview]
Message-ID: <200111191834.fAJIYWK30800@deathstar.prodigy.com> (raw)
In-Reply-To: <20011108170740.B14468@mikef-linux.matchmail.com>
In-Reply-To: <20011108153749.A14468@mikef-linux.matchmail.com> <Pine.LNX.4.40.0111081632400.1501-100000@blue1.dev.mcafeelabs.com>

In article <20011108170740.B14468@mikef-linux.matchmail.com> mfedyk@matchmail.com wrote:

| Running one niced copy of cpuhog on a 2x366 mhz celeron box did pretty well.
| Instead of switching several times in one second, it only switched a few
| times per minute.
| 
| I was also able to merge it with just about everything else I was testing
| (ext3, freeswan, elevator updates, -ac) except for the preempt patch.  Well, I
| was able to manually merge it, but the cpu afinity broke.  (it wouldn't use
| the second processor for anything except for interrupt processing...)

  The problem with processor affinity is that for some *typical* loads
the things which make things better for one load make it worse for
another. If you wait longer for the "right" processor to be available
then you increase the chances that the cache is mostly filled with what
the CPU was doing in other processes, and affinity has done nothing but
delay the scheduling of the process, since the cache is going to be of
small use anyway.

  The item of interest for making decisions about affinity would be
number of cache misses (and obviously cache changes to satisfy them).
This would allow a better estimate of how much of the cache is still
useful if affinity is preserved. Given the number of processor types on
which Linux runs this is not something likely to be included on all of
them, and is related to cache size as well. So the things being done in
the scheduler are not really measuring "how much of the cache is still
useful to process X," which would be the best predictor of the value of
affinity. I apologise to those who find this an old thought, not
everyone on this list has noted this, I believe.

  I'm not surprised that you find the preempt doesn't work, it is
somewhat counter to the process of affinity. Given the choice of better
performance for cpu hogs or more responsive preformance and in some
cases much higher network performance, I will take preempt. But it would
be nice to have a choice at runtime or in /proc/sys so that systems
could be tuned to optimize the characteristics most needed.

-- 
bill davidsen <davidsen@tmr.com>
  His first management concern is not solving the problem, but covering
his ass. If he lived in the middle ages he'd wear his codpiece backward.

  parent reply	other threads:[~2001-11-19 18:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-08 14:30 Ingo Molnar
2001-11-08 15:22 ` M. Edward Borasky
2001-11-08 16:33   ` Ingo Molnar
2001-11-08 17:15 ` Davide Libenzi
2001-11-08 18:27   ` Ingo Molnar
2001-11-08 18:03     ` Davide Libenzi
2001-11-08 19:40       ` Ingo Molnar
2001-11-08 19:13         ` Davide Libenzi
2001-11-08 23:37           ` Mike Fedyk
2001-11-09  0:37             ` Davide Libenzi
2001-11-09  1:07               ` Mike Fedyk
2001-11-09  1:29                 ` Davide Libenzi
2001-11-09  1:34                   ` Mike Fedyk
2001-11-09  2:09                     ` Davide Libenzi
2001-11-09  2:08                       ` Mike Fedyk
2001-11-19 18:34               ` bill davidsen [this message]
2001-11-09  8:28             ` Ingo Molnar
2001-11-09  8:05               ` Mike Fedyk
2001-11-11 21:18               ` Davide Libenzi
2001-11-11 22:31                 ` Davide Libenzi
2001-11-08 23:46 ` Andrea Arcangeli
2001-11-09  0:31 ` Davide Libenzi
2001-11-14  4:56 ` Mike Kravetz
2001-11-14 18:08   ` Davide Libenzi

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=200111191834.fAJIYWK30800@deathstar.prodigy.com \
    --to=davidsen@tmr.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®