lkml.org 
[lkml]   [2014]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: Issue a warning if number of present CPUs > maxcpus and CONFIG_HOTPLUG=n
On Mon, 17 Feb 2014 16:07:04 -0300
Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:

> On Mon, 17 Feb 2014, Petr Tesarik wrote:
> > This results in:
> >
> > total_cpus = 1008 /* this is purely informative, it is *NOT* used
> > to size anything */
> > possible = 48 /* clamped to nr_cpu_ids */
> >
> > A warning message (with or without my patch):
> > 1024 Processors exceeds NR_CPUS limit of 48
> >
> > Informative message:
> > Allowing 16 CPUs, 32 hotplug CPUs
> >
> > No other warning (with or without my patch).
>
> I'd rather no warnings were printed at all (user asked for that nr_cpus,
> there is no reason to warn him about it),
>[...]

Agreed. This needs some cleanup.

This code used to check against NR_CPUS, which is a compile-time
constant, so the warning was printed when the user booted a kernel
incapable of using all available CPUs in the system. And this was a
good thing, because there was no (easy) way to find out this constant
from a given kernel binary.

I can post a clean-up patch that doesn't issue any warnings for user
overrides (but does issue warnings for exceeding hard-coded kernel
limits).

But I'll do it separately and only after I know if the current patch
gets accepted or not. ;-)

Petr Tesarik


\
 
 \ /
  Last update: 2014-02-17 22:10    [W:0.075 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site