lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <494962AF.20003@sgi.com>
Date:	Wed, 17 Dec 2008 12:35:59 -0800
From:	Mike Travis <travis@....com>
To:	Greg KH <gregkh@...e.de>
CC:	Rusty Russell <rusty@...tcorp.com.au>,
	Ingo Molnar <mingo@...hat.com>, Jack Steiner <steiner@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] cpumask: add sysfs displays for configured and	disabled
 cpu maps

Greg KH wrote:
> On Wed, Dec 17, 2008 at 10:23:52PM +1030, Rusty Russell wrote:
>> On Tuesday 16 December 2008 14:56:48 Mike Travis wrote:
>>> Impact: add new functionality.
>>>
>>> Add sysfs files "kernel_max" and "offline" to display the max CPU index
>>> allowed (NR_CPUS-1), and the map of cpus that are offline. 
>> I've applied this to the cpumask series, but Greg is sysfs maestro, so
>> I'll await his ack (I've quoted whole thing for easy reading).
> 
> All new sysfs files should have corrisponding Documentation/ABI files
> added as well, containing all of the information in the body of this
> email so that others can find it in the future in an easy manner.
> 
> Mike, can you make this change please?

Yes, I will.
> 
>>> Cpus can be offlined via HOTPLUG, disabled by the BIOS ACPI tables, or
>>> if they exceed the number of cpus allowed by the NR_CPUS config option,
>>> or the "maxcpus=NUM" kernel start parameter.
>>>
>>> The "possible_cpus=NUM" parameter can also extend the number of possible
>>> cpus allowed, in which case the cpus not present at startup will be
>>> in the offline state.  (These cpus can be HOTPLUGGED ON after system
>>> startup [pending a follow-on patch to provide the capability via the
>>> /sys/devices/sys/cpu/cpuN/online mechanism to bring them online.])
>>>
>>> By design, the "offlined cpus > possible cpus" display will always
>>> use the following formats:
>>>
>>>   * all possible cpus online:   "x$"    or "x-y$" 
>>>   * some possible cpus offline: ".*,x$" or ".*,x-y$"
> 
> Care to provide an example of what these sysfs files will actually hold?
> It seems like you are craming more information than needed into a single
> sysfs file.

Well, it's somewhat of a cop out as well :*).  The cpus within 0 <= cpu < nr_cpu_ids
are printed with a cpulist_scnprintf.  This is printed for all architectures
and shows primarily cpus that either have been offlined via CPU HOTPLUG or
made possible by extending the number of "possible" cpus via a kernel start
parameter.

Those cpus that may actually be present in the system but their index exceeds
NR_CPUS/maxcpus are printed following the above and are appended to the list. 
If the list is non-empty, a comma is inserted first.  This keeps it all within
the syntax needed by cpulist_parse().  This is only done for x86 right now.

I'll put this info in the doc file.
> 
> Oh, and state why this is really needed, as I thought we already showed
> this kind of information today in the existing sysfs files, but I'm
> probably wrong :)

Almost, but not quite.  You can mine the syslog file to find if there's a
warning message but otherwise, "extra" cpus are silently ignored.

> 
> thanks,
> 
> greg k-h

Thanks!
Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ