mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin J. Bligh" <mbligh@aracnet.com>
To: Davide Libenzi <davidel@xmailserver.org>,
	Nick Piggin <piggin@cyberone.com.au>
Cc: Andrew Morton <akpm@osdl.org>, Con Kolivas <kernel@kolivas.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] Fix find busiest queue 2.6.0-test9
Date: Sun, 09 Nov 2003 07:34:51 -0800	[thread overview]
Message-ID: <121800000.1068392090@[10.10.2.4]> (raw)
In-Reply-To: <Pine.LNX.4.44.0311081631300.2122-100000@bigblue.dev.mdolabs.com>

>> prev_cpu_load[i] is nr_running of cpu i last time this operation was
>> performed. Either it, or the current nr_running is taken, whichever
>> is lower.
>> 
>> I guess its done this way for cache benefits, but it was correct as
>> Ingo intended. For example, with Con's patch you can see
>> rq_src->prev_cpu_load[i] will only ever use the ith position in the array.
> 
> Yes. The prev_cpu_load[] array takes a snapshot of the run queue lengths 
> seen by the current rq (this_rq). The code is ok as is, and the reason is 
> to avoid stealing tasks too fast from remote CPU (cache thing). Time ago I 
> also tried to store an K-average (by varying K) rq length in 
> prev_cpu_load[] instead of a simple min-of-two-values:
> 
> this_rq->prev_cpu_load[i] = (K * this_rq->prev_cpu_load[i] + rq_src->nr_running) / (K + 1);
> 
> I couldn't see any major improvements in my 2SMP (never tried on bigger SMP/NUMA).

I ran it on the 16-way - no difference in performance. If the code is 
correct as was before (and I agree, it seems it was), perhaps it's just
in need of a big fat comment to explain the confusion? ;-)

M.


  reply	other threads:[~2003-11-09 15:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-08 16:49 Con Kolivas
2003-11-08 22:41 ` Nick Piggin
2003-11-08 22:58 ` Andrew Morton
2003-11-08 23:42   ` Nick Piggin
2003-11-09  0:44     ` Davide Libenzi
2003-11-09 15:34       ` Martin J. Bligh [this message]
2003-11-09 15:53         ` Davide Libenzi
2003-11-09 15:58           ` Martin J. Bligh
2003-11-09 16:05             ` Davide Libenzi
2003-11-09 16:07               ` Con Kolivas
2003-11-09 17:10                 ` Martin J. Bligh
2003-11-10  0:59                   ` Nick Piggin
2003-11-10  7:46               ` Ingo Molnar
2003-11-09 15:59           ` Con Kolivas
2003-11-09 16:48             ` Martin J. Bligh
2003-11-09 17:27               ` Davide Libenzi
2003-11-09 20:39                 ` Martin J. Bligh

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='121800000.1068392090@[10.10.2.4]' \
    --to=mbligh@aracnet.com \
    --cc=akpm@osdl.org \
    --cc=davidel@xmailserver.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=piggin@cyberone.com.au \
    /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®