Util-Linux package development
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Karel Zak <kzak@redhat.com>
Cc: nacc@linux.vnet.ibm.com, util-linux@vger.kernel.org
Subject: Re: [RFC][PATCH 1/1] lscpu: Print physical cpu information
Date: Wed, 25 Nov 2015 12:09:45 -0800	[thread overview]
Message-ID: <20151125200945.GA16551@us.ibm.com> (raw)
In-Reply-To: <20151125091715.GE4955@ws.net.home>

Karel Zak [kzak@redhat.com] wrote:
| On Tue, Nov 24, 2015 at 01:58:05PM -0800, Sukadev Bhattiprolu wrote:
| > Appreciate comments on the proposal including following:
| > 
| > 	- Should we instead display the physical information unconditionally?
| 
| yes

Ok. I have made it unconditional now.

| 
| > 	  Maybe add '--system' or '--no-physical' to suppress the physical
| > 	  topology info?
| > 
| > 	- Should we ignore (as this patch does) or fail if '--physical'
| > 	  is specified on yet unsupported architectures?
| 
| I have originally thought that --physical will overwrite the current
| output (e.g. "Sockets:"). If we add information from librtas as
| additional fields (e.g. "Physical sockets:") than maybe we don't need
| the option --physical at all, and all we need is to describe all
| (difference between system/physical) in docs.

Ok. I have updated the man page.

| 
| > +static void read_physical_info_powerpc(struct lscpu_desc *desc)
| > +{
| > +	char buf[4096];
| 
|   buf[BUFSIZ]

Yes,

| 
| ...
| 
| >  static void
| >  read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod)
| >  {
| > @@ -506,6 +555,9 @@ read_basicinfo(struct lscpu_desc *desc, struct lscpu_modifier *mod)
| >  		desc->dispatching = path_read_s32(_PATH_SYS_CPU "/dispatching");
| >  	else
| >  		desc->dispatching = -1;
| >
| 
| you should not read information from rtas when lscpu is running in
| shapshot mode ("snapshot" means that we read info from /sys and /proc
| dump rather than from a real system; we use it for regression tests).
| 
|    if (mod->system == SYSTEM_ALIVE)
|         read_physical_info_powerpc(desc);

OK.

| 
| and mod->physical will be  probably unnecessary if the physical information
| will be printed unconditionally ;-)
| 
| > +	if (mod->physical)
| > +		read_physical_info_powerpc(desc);
| >  }

Sukadev


      reply	other threads:[~2015-11-25 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24 21:58 [RFC][PATCH 1/1] lscpu: Print physical cpu information Sukadev Bhattiprolu
2015-11-25  9:17 ` Karel Zak
2015-11-25 20:09   ` Sukadev Bhattiprolu [this message]

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=20151125200945.GA16551@us.ibm.com \
    --to=sukadev@linux.vnet.ibm.com \
    --cc=kzak@redhat.com \
    --cc=nacc@linux.vnet.ibm.com \
    --cc=util-linux@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox