public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: Greg KH <gregkh@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Ingo Molnar <mingo@redhat.com>, Jack Steiner <steiner@sgi.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] cpumask: add sysfs displays for configured and	disabled cpu maps
Date: Wed, 17 Dec 2008 12:35:59 -0800	[thread overview]
Message-ID: <494962AF.20003@sgi.com> (raw)
In-Reply-To: <20081217184011.GB30724@suse.de>

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

  reply	other threads:[~2008-12-17 20:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16  4:26 [PATCH 0/3] x86/cpumask: fixups and additions Mike Travis
2008-12-16  4:26 ` [PATCH 1/3] x86: fix cpu_mask_to_apicid_and to include cpu_online_mask Mike Travis
2008-12-16  4:26 ` [PATCH 2/3] x86: use possible_cpus=NUM to extend the possible cpus allowed Mike Travis
2008-12-16  4:26 ` [PATCH 3/3] cpumask: add sysfs displays for configured and disabled cpu maps Mike Travis
2008-12-17 11:53   ` Rusty Russell
2008-12-17 18:40     ` Greg KH
2008-12-17 20:35       ` Mike Travis [this message]
2008-12-17 22:14       ` [PATCH 1/1]: sysfs: add documentation to cputopology.txt for system cpumasks Mike Travis
2008-12-18  2:58         ` Greg KH
2008-12-19  6:46   ` [PATCH 3/3] cpumask: add sysfs displays for configured and disabled cpu maps Rusty Russell
2008-12-19 16:15     ` Greg KH
     [not found] ` <20081216114459.GA21266@elte.hu>
2008-12-17 23:01   ` [PATCH 0/3] x86/cpumask: fixups and additions Mike Travis

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=494962AF.20003@sgi.com \
    --to=travis@sgi.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=steiner@sgi.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