* Are we properly prepared to handle 3 Socket setups?
@ 2007-08-12 1:08 Jesper Juhl
2007-08-12 1:27 ` Rene Herman
2007-08-12 11:46 ` Andi Kleen
0 siblings, 2 replies; 12+ messages in thread
From: Jesper Juhl @ 2007-08-12 1:08 UTC (permalink / raw)
To: Linux Kernel Mailing List
Hi,
This may be a little off topic, but I think it's interresting enough
to warrent a single mail.
I just saw a news article (http://www.theinquirer.net/?article=41610)
about a 3 Socket Opteron motherboard and couldn't help but wonder if
we are prepared to deal with such a beast, so I thought I'd inform
everyone :-)
I'm guessing equipping such a board with 3 single core CPU's could
show up some interresting corner cases in schedular code and
elsewhere, I'll bet we have some assumptions somewhere about
nr_of_cpus being an even number... In any case it would be an
interresting box to test on, so for those of you employed by big
business with the cash to purchase a test box, it would at least be an
interresting one to add to the mix :)
Anyway, just wanted to give everyone a heads-up, bye bye...
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 1:08 Are we properly prepared to handle 3 Socket setups? Jesper Juhl
@ 2007-08-12 1:27 ` Rene Herman
2007-08-12 1:52 ` Jesper Juhl
2007-08-12 8:41 ` Willy Tarreau
2007-08-12 11:46 ` Andi Kleen
1 sibling, 2 replies; 12+ messages in thread
From: Rene Herman @ 2007-08-12 1:27 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Linux Kernel Mailing List
On 08/12/2007 03:08 AM, Jesper Juhl wrote:
> This may be a little off topic, but I think it's interresting enough
> to warrent a single mail.
>
> I just saw a news article (http://www.theinquirer.net/?article=41610)
> about a 3 Socket Opteron motherboard and couldn't help but wonder if
> we are prepared to deal with such a beast, so I thought I'd inform
> everyone :-)
>
> I'm guessing equipping such a board with 3 single core CPU's could
> show up some interresting corner cases in schedular code and
> elsewhere, I'll bet we have some assumptions somewhere about
> nr_of_cpus being an even number...
I would hope the N=1 case will have flushed out enough of those... :-|
Rene.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 1:27 ` Rene Herman
@ 2007-08-12 1:52 ` Jesper Juhl
2007-08-12 3:17 ` Rene Herman
2007-08-12 7:24 ` Paul Mundt
2007-08-12 8:41 ` Willy Tarreau
1 sibling, 2 replies; 12+ messages in thread
From: Jesper Juhl @ 2007-08-12 1:52 UTC (permalink / raw)
To: Rene Herman; +Cc: Linux Kernel Mailing List
On 12/08/07, Rene Herman <rene.herman@gmail.com> wrote:
> On 08/12/2007 03:08 AM, Jesper Juhl wrote:
>
> > This may be a little off topic, but I think it's interresting enough
> > to warrent a single mail.
> >
> > I just saw a news article (http://www.theinquirer.net/?article=41610)
> > about a 3 Socket Opteron motherboard and couldn't help but wonder if
> > we are prepared to deal with such a beast, so I thought I'd inform
> > everyone :-)
> >
> > I'm guessing equipping such a board with 3 single core CPU's could
> > show up some interresting corner cases in schedular code and
> > elsewhere, I'll bet we have some assumptions somewhere about
> > nr_of_cpus being an even number...
>
> I would hope the N=1 case will have flushed out enough of those... :-|
>
Hehe, true, but I was thinking more of nr_of_cpus is an odd number > 1. :-)
Just thinking of having to divide things by 3 makes me worry ;-) ...
--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 1:52 ` Jesper Juhl
@ 2007-08-12 3:17 ` Rene Herman
2007-08-12 3:29 ` Roland Dreier
2007-08-12 8:35 ` Andrew Morton
2007-08-12 7:24 ` Paul Mundt
1 sibling, 2 replies; 12+ messages in thread
From: Rene Herman @ 2007-08-12 3:17 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Linux Kernel Mailing List, Andrew Morton, Ingo Molnar
On 08/12/2007 03:52 AM, Jesper Juhl wrote:
> On 12/08/07, Rene Herman <rene.herman@gmail.com> wrote:
>> On 08/12/2007 03:08 AM, Jesper Juhl wrote:
>>
>>> This may be a little off topic, but I think it's interresting enough
>>> to warrent a single mail.
>>>
>>> I just saw a news article (http://www.theinquirer.net/?article=41610)
>>> about a 3 Socket Opteron motherboard and couldn't help but wonder if
>>> we are prepared to deal with such a beast, so I thought I'd inform
>>> everyone :-)
>>>
>>> I'm guessing equipping such a board with 3 single core CPU's could
>>> show up some interresting corner cases in schedular code and
>>> elsewhere, I'll bet we have some assumptions somewhere about
>>> nr_of_cpus being an even number...
>> I would hope the N=1 case will have flushed out enough of those... :-|
>>
> Hehe, true, but I was thinking more of nr_of_cpus is an odd number > 1. :-)
> Just thinking of having to divide things by 3 makes me worry ;-) ...
It's not a hugely strange worry no. Grepping around (for num_online_cpus for
example) didn't throw up any glaring bugs I believe.
A possible problem in mm/vmstat.c:calculate_threshold() where 3 CPUs would
be treated as 2 through an fls(). No idea about that code and if that would
be a problem.
The line just below where it does that _does_ seem to have a problem:
/*
* Maximum threshold is 125
*/
threshold = min(125, threshold);
as either the comment or the code is wrong and it seems it's the code. Added
Andrew Morton to the CC for that.
CFS (v19.1) has an ilog2 on num_online_cpus() in
kernel/sched.c:sched_init_granularity() but this seems not a problem. Added
Ingo Molnar.
Rene.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 3:17 ` Rene Herman
@ 2007-08-12 3:29 ` Roland Dreier
2007-08-12 3:36 ` Rene Herman
2007-08-12 8:35 ` Andrew Morton
1 sibling, 1 reply; 12+ messages in thread
From: Roland Dreier @ 2007-08-12 3:29 UTC (permalink / raw)
To: Rene Herman
Cc: Jesper Juhl, Linux Kernel Mailing List, Andrew Morton,
Ingo Molnar
> /*
> * Maximum threshold is 125
> */
> threshold = min(125, threshold);
>
> as either the comment or the code is wrong and it seems it's the
> code.
What's the problem? That line sets threshold to the smaller of the
current value or 125, which is exactly what one would want to do if
the maximum value is 125. Just do a couple of examples: eg if threshold
is 100 going into that line, then the value is left alone; if
threshold is 150 then it gets set to 125; and that seems exactly correct.
- R.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 3:29 ` Roland Dreier
@ 2007-08-12 3:36 ` Rene Herman
0 siblings, 0 replies; 12+ messages in thread
From: Rene Herman @ 2007-08-12 3:36 UTC (permalink / raw)
To: Roland Dreier
Cc: Jesper Juhl, Linux Kernel Mailing List, Andrew Morton,
Ingo Molnar
On 08/12/2007 05:29 AM, Roland Dreier wrote:
> > /*
> > * Maximum threshold is 125
> > */
> > threshold = min(125, threshold);
> >
> > as either the comment or the code is wrong and it seems it's the
> > code.
>
> What's the problem? That line sets threshold to the smaller of the
> current value or 125, which is exactly what one would want to do if
> the maximum value is 125. Just do a couple of examples: eg if threshold
> is 100 going into that line, then the value is left alone; if
> threshold is 150 then it gets set to 125; and that seems exactly correct.
Crap, need bed, sorry (the fls/ilog2 things still stand -- quite possibly
both not a problem either).
Rene.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 1:52 ` Jesper Juhl
2007-08-12 3:17 ` Rene Herman
@ 2007-08-12 7:24 ` Paul Mundt
1 sibling, 0 replies; 12+ messages in thread
From: Paul Mundt @ 2007-08-12 7:24 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Rene Herman, Linux Kernel Mailing List
On Sun, Aug 12, 2007 at 03:52:48AM +0200, Jesper Juhl wrote:
> On 12/08/07, Rene Herman <rene.herman@gmail.com> wrote:
> > On 08/12/2007 03:08 AM, Jesper Juhl wrote:
> >
> > > This may be a little off topic, but I think it's interresting enough
> > > to warrent a single mail.
> > >
> > > I just saw a news article (http://www.theinquirer.net/?article=41610)
> > > about a 3 Socket Opteron motherboard and couldn't help but wonder if
> > > we are prepared to deal with such a beast, so I thought I'd inform
> > > everyone :-)
> > >
> > > I'm guessing equipping such a board with 3 single core CPU's could
> > > show up some interresting corner cases in schedular code and
> > > elsewhere, I'll bet we have some assumptions somewhere about
> > > nr_of_cpus being an even number...
> >
> > I would hope the N=1 case will have flushed out enough of those... :-|
> >
> Hehe, true, but I was thinking more of nr_of_cpus is an odd number > 1. :-)
> Just thinking of having to divide things by 3 makes me worry ;-) ...
>
These sorts of cases happen frequently enough today as it is in an
operational capacity, CPU hotplug will have the sytem in such states
already on systems with an even number. This is generally why things like
the online map and corresponding cpumasks are what counts, while the
total number of possible CPUs can be a drastically different number.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 3:17 ` Rene Herman
2007-08-12 3:29 ` Roland Dreier
@ 2007-08-12 8:35 ` Andrew Morton
2007-08-12 20:00 ` Rene Herman
1 sibling, 1 reply; 12+ messages in thread
From: Andrew Morton @ 2007-08-12 8:35 UTC (permalink / raw)
To: Rene Herman
Cc: Jesper Juhl, Linux Kernel Mailing List, Ingo Molnar,
Christoph Lameter
On Sun, 12 Aug 2007 05:17:10 +0200 Rene Herman <rene.herman@gmail.com> wrote:
> On 08/12/2007 03:52 AM, Jesper Juhl wrote:
>
> > On 12/08/07, Rene Herman <rene.herman@gmail.com> wrote:
> >> On 08/12/2007 03:08 AM, Jesper Juhl wrote:
> >>
> >>> This may be a little off topic, but I think it's interresting enough
> >>> to warrent a single mail.
> >>>
> >>> I just saw a news article (http://www.theinquirer.net/?article=41610)
> >>> about a 3 Socket Opteron motherboard and couldn't help but wonder if
> >>> we are prepared to deal with such a beast, so I thought I'd inform
> >>> everyone :-)
> >>>
> >>> I'm guessing equipping such a board with 3 single core CPU's could
> >>> show up some interresting corner cases in schedular code and
> >>> elsewhere, I'll bet we have some assumptions somewhere about
> >>> nr_of_cpus being an even number...
> >> I would hope the N=1 case will have flushed out enough of those... :-|
> >>
> > Hehe, true, but I was thinking more of nr_of_cpus is an odd number > 1. :-)
> > Just thinking of having to divide things by 3 makes me worry ;-) ...
>
> It's not a hugely strange worry no. Grepping around (for num_online_cpus for
> example) didn't throw up any glaring bugs I believe.
>
> A possible problem in mm/vmstat.c:calculate_threshold() where 3 CPUs would
> be treated as 2 through an fls(). No idea about that code and if that would
> be a problem.
No, that'll be OK.
> The line just below where it does that _does_ seem to have a problem:
>
> /*
> * Maximum threshold is 125
> */
> threshold = min(125, threshold);
>
> as either the comment or the code is wrong and it seems it's the code. Added
> Andrew Morton to the CC for that.
Yes, that's inconsistent. And looking at Christoph's df9ecaba it's unclear
whether the comment is wrong or the code is wrong. The code is wrong, I
expect.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 1:27 ` Rene Herman
2007-08-12 1:52 ` Jesper Juhl
@ 2007-08-12 8:41 ` Willy Tarreau
1 sibling, 0 replies; 12+ messages in thread
From: Willy Tarreau @ 2007-08-12 8:41 UTC (permalink / raw)
To: Rene Herman; +Cc: Jesper Juhl, Linux Kernel Mailing List
On Sun, Aug 12, 2007 at 03:27:58AM +0200, Rene Herman wrote:
> On 08/12/2007 03:08 AM, Jesper Juhl wrote:
>
> >This may be a little off topic, but I think it's interresting enough
> >to warrent a single mail.
> >
> >I just saw a news article (http://www.theinquirer.net/?article=41610)
> >about a 3 Socket Opteron motherboard and couldn't help but wonder if
> >we are prepared to deal with such a beast, so I thought I'd inform
> >everyone :-)
> >
> >I'm guessing equipping such a board with 3 single core CPU's could
> >show up some interresting corner cases in schedular code and
> >elsewhere, I'll bet we have some assumptions somewhere about
> >nr_of_cpus being an even number...
>
> I would hope the N=1 case will have flushed out enough of those... :-|
Well, 1 could be seen as even number in base 2, it's 2^0 and has only
one bit set.
Willy
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 1:08 Are we properly prepared to handle 3 Socket setups? Jesper Juhl
2007-08-12 1:27 ` Rene Herman
@ 2007-08-12 11:46 ` Andi Kleen
1 sibling, 0 replies; 12+ messages in thread
From: Andi Kleen @ 2007-08-12 11:46 UTC (permalink / raw)
To: Jesper Juhl; +Cc: Linux Kernel Mailing List
"Jesper Juhl" <jesper.juhl@gmail.com> writes:
> I just saw a news article (http://www.theinquirer.net/?article=41610)
> about a 3 Socket Opteron motherboard and couldn't help but wonder if
> we are prepared to deal with such a beast, so I thought I'd inform
> everyone :-)
It should work. Non power of two cores per socket used to be problematic
though, but that has been also fixed.
> nr_of_cpus being an even number... In any case it would be an
> interresting box to test on, so for those of you employed by big
> business with the cash to purchase a test box, it would at least be an
> interresting one to add to the mix :)
You can already test it by either using qemu/xen/etc. or by
off lining one of your cores if you have more than 2.
-Andi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 8:35 ` Andrew Morton
@ 2007-08-12 20:00 ` Rene Herman
2007-08-13 20:44 ` Christoph Lameter
0 siblings, 1 reply; 12+ messages in thread
From: Rene Herman @ 2007-08-12 20:00 UTC (permalink / raw)
To: Andrew Morton
Cc: Jesper Juhl, Linux Kernel Mailing List, Ingo Molnar,
Christoph Lameter
On 08/12/2007 10:35 AM, Andrew Morton wrote:
> On Sun, 12 Aug 2007 05:17:10 +0200 Rene Herman <rene.herman@gmail.com> wrote:
>> The line just below where it does that _does_ seem to have a problem:
>>
>> /*
>> * Maximum threshold is 125
>> */
>> threshold = min(125, threshold);
>>
>> as either the comment or the code is wrong and it seems it's the code. Added
>> Andrew Morton to the CC for that.
>
> Yes, that's inconsistent. And looking at Christoph's df9ecaba it's unclear
> whether the comment is wrong or the code is wrong. The code is wrong, I
> expect.
Extremely friendly of you to pretend I wasn't being thick at all but don't
worry, I can take it. Anyways, since Christoph wasn't in CC on that one:
On 08/12/2007 05:29 AM, Roland Dreier wrote:
> What's the problem? That line sets threshold to the smaller of the
> current value or 125, which is exactly what one would want to do if the
> maximum value is 125. Just do a couple of examples: eg if threshold is
> 100 going into that line, then the value is left alone; if threshold is
> 150 then it gets set to 125; and that seems exactly correct.
Rene.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Are we properly prepared to handle 3 Socket setups?
2007-08-12 20:00 ` Rene Herman
@ 2007-08-13 20:44 ` Christoph Lameter
0 siblings, 0 replies; 12+ messages in thread
From: Christoph Lameter @ 2007-08-13 20:44 UTC (permalink / raw)
To: Rene Herman
Cc: Andrew Morton, Jesper Juhl, Linux Kernel Mailing List,
Ingo Molnar
On Sun, 12 Aug 2007, Rene Herman wrote:
> > > /*
> > > * Maximum threshold is 125
> > > */
> > > threshold = min(125, threshold);
> > >
> > > as either the comment or the code is wrong and it seems it's the code.
> > > Added Andrew Morton to the CC for that.
> >
> > Yes, that's inconsistent. And looking at Christoph's df9ecaba it's unclear
> > whether the comment is wrong or the code is wrong. The code is wrong, I
> > expect.
?? What is wrong with the code? We want the threshold to stay below 125?
> On 08/12/2007 05:29 AM, Roland Dreier wrote:
>
> > What's the problem? That line sets threshold to the smaller of the current
> > value or 125, which is exactly what one would want to do if the
> > maximum value is 125. Just do a couple of examples: eg if threshold is
> > 100 going into that line, then the value is left alone; if threshold is
> > 150 then it gets set to 125; and that seems exactly correct.
Exactly.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-08-13 20:44 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-12 1:08 Are we properly prepared to handle 3 Socket setups? Jesper Juhl
2007-08-12 1:27 ` Rene Herman
2007-08-12 1:52 ` Jesper Juhl
2007-08-12 3:17 ` Rene Herman
2007-08-12 3:29 ` Roland Dreier
2007-08-12 3:36 ` Rene Herman
2007-08-12 8:35 ` Andrew Morton
2007-08-12 20:00 ` Rene Herman
2007-08-13 20:44 ` Christoph Lameter
2007-08-12 7:24 ` Paul Mundt
2007-08-12 8:41 ` Willy Tarreau
2007-08-12 11:46 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox