mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: check cpu_online() in nr_running()
Date: Tue, 25 Feb 2003 09:51:55 -0800	[thread overview]
Message-ID: <20030225175155.GB10411@holomorphy.com> (raw)
In-Reply-To: <1046197963.4055.15.camel@irongate.swansea.linux.org.uk>

On Tue, 2003-02-25 at 16:33, William Lee Irwin III wrote:
>>  	for (i = 0; i < NR_CPUS; i++)
>> +		if (!cpu_online(i))
>> +			continue;
>>  		sum += cpu_rq(i)->nr_running;

On Tue, Feb 25, 2003 at 06:32:43PM +0000, Alan Cox wrote:
> I smell donkey poo 8)

I don't really like how this stuff got arranged either.

On Tue, Feb 25, 2003 at 06:32:43PM +0000, Alan Cox wrote:
> If the change is right, which seems reasonable then I think you
> need some { } 's too. Its also a hot path so it may be a lot
> cleaner to keep the jump out of this by just letting
> nr_running be zero for other processors ?

AFAICT its only usages are in /proc/ reporting and loadavg calculation,
which aren't hotpaths per-se, but shouldn't explode in complexity.
Similar things could be said for nr_uninterruptible() and nr_iowait(),
but some kind of unusual constraint is involved wrt. hotplug.

-- wli

      reply	other threads:[~2003-02-25 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-25 16:33 William Lee Irwin III
2003-02-25 18:32 ` Alan Cox
2003-02-25 17:51   ` William Lee Irwin III [this message]

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=20030225175155.GB10411@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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®