All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [lhcs-devel] Re: [RFC] don't create cpu/online sysfs file
Date: Fri, 04 Jun 2004 23:04:17 +0000	[thread overview]
Message-ID: <1086390257.24915.132.camel@nighthawk> (raw)

On Fri, 2004-06-04 at 15:49, Ashok Raj wrote:
> place a file in /sys/devices/system/cpuinfo, which when one does a cat on
> can display
> 
> cpu0:	online, not offlinable
> cpu1:	online
> cpu2:	offline (meaning present)

This might be a little bit more than is intended for a sysfs file,
especially if the information can be obtained some other way.  Here's
what I was thinking of:

cat /sys/devices/system/cpu/cpuX/online
doesn't exist: online, not offlinable
	    1: online
	    0: offline (meaning present)

If you want to get information like you have above, it's pretty trivial
to write a little script to do it.  

> the reason this cannot be determined at early time, is say if a set of cpu's are
> in a special mode, i.e only those 4 cpu's can retrieve a set of platform registers.
> for error processing. And i can offline each of those, until i run into the last 
> of those 4 cpus. 

Are you saying that you don't know if a CPU can be offlined at the time
that the sysfs files are created?  If so, I bet we could delay the
creation of the kobjects until a more appropriate time.  I don't think
anything in early boot actually needs them.

> I would prefer to not have a macro to preventy its creation, but have a 
> facility to know the offlineable status via a single information file, and 
> let __cpu_disable() determine if offline should fail based on current ability 
> to offline a cpu.
> 
> what do you think?

I just worry that any single information file doesn't fit in well with
the sysfs model.  

-- Dave


             reply	other threads:[~2004-06-04 23:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04 23:04 Dave Hansen [this message]
2004-06-04 23:17 ` [lhcs-devel] Re: [RFC] don't create cpu/online sysfs file Ashok Raj
2004-06-04 23:41 ` Dave Hansen
2004-06-05 14:38 ` Ashok Raj
2004-06-05 19:22 ` Dave Hansen
2004-06-06 20:27 ` Ashok Raj
2004-06-07  5:05 ` Dave Hansen
2004-06-07 14:07 ` Nathan Lynch
2004-06-07 14:08 ` Ashok Raj
2004-06-07 14:14 ` Ashok Raj
2004-06-07 16:41 ` Dave Hansen
2004-06-07 17:22 ` Ashok Raj
2004-06-07 19:25 ` Dave Hansen
2004-06-07 20:48 ` Ashok Raj
2004-06-09  7:10 ` Andrew Morton
2004-06-09 14:27 ` Ashok Raj

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=1086390257.24915.132.camel@nighthawk \
    --to=haveblue@us.ibm.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.