mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: mingo@elte.hu
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@transmeta.com>
Subject: Re: Problems with O(1) scheduler on non-x86 arch's
Date: Thu, 17 Jan 2002 09:57:29 -0500	[thread overview]
Message-ID: <200201171457.g0HEvTB02011@localhost.localdomain> (raw)
In-Reply-To: Message from Ingo Molnar <mingo@elte.hu>  of "Thu, 17 Jan 2002 10:50:58 +0100." <Pine.LNX.4.33.0201171046480.2000-100000@localhost.localdomain>

mingo@elte.hu said:
> in the long term i think the correct approach would be to always store
> the logical CPU number in p->cpu. Architectures that have some strange
> physical numbering can always do a mapping themselves. This way we
> could remove tons of cpu-id conversions from the generic code. And we
> are always going to have these problems, now that the x86 SMP boot
> code renumbers physical CPU ids to match the logical order. 

I can see for something like the x86, where the apic id bears no relationship 
to where the CPU is and there's no support for hot CPU removal, this approach 
may be the correct one.  For Voyager, each CPU has an activity light. So, from 
the physical CPU number, I can tell what the processor is doing, thus it does 
make more sense for me to keep a physical number in p->cpu rather than using 
the logical one.  The voyager architecture is less constrained about ASMP as 
well (I currently run an 8 way box with 4x66MHz and 4x33MHz CPUs).  If I'm to 
use the process or interrupt affinity features, I really need to know 
physically which CPU I want.

Think about the problems logical numbering will cause for hot processor 
removal or failure (if we get around to implementing the feature).  If p->cpu 
is physical, all I have to do is remove the mapping and decrement 
smp_num_cpus, quiesce the processor and redistribute the run queue.  In a 
logically mapped system, I'm going to have to renumber p->cpu in at least one 
other CPUs runqueue as well since the logical mapping code assumes no gaps in 
the 0...smp_num_cpus-1 sequence.

> i've checked the architectures, and besides your architecture it
> appears that only Alpha does a non-identity ID conversion. So it would
> be much cleaner for the generic kernel if we stored the logical CPU id
> in p->cpu, and all SMP interfaces towards lowlevel SMP code used the
> logical CPU ID. 

Actually, the parisc SMP code (on cvs.parisc-linux.org) uses physical 
numbering and it looks to me like the sparc SMP code does as well.

James



  reply	other threads:[~2002-01-17 14:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-17  2:29 James Bottomley
2002-01-17  9:50 ` Ingo Molnar
2002-01-17 14:57   ` James Bottomley [this message]
2002-01-18  2:23 ` Rusty Russell

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=200201171457.g0HEvTB02011@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.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 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®