Re: [RFC][PATCH 1/1] lscpu: Print physical cpu information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

> 	  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.

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

  buf[BUFSIZ]

...

>  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);

and mod->physical will be  probably unnecessary if the physical information
will be printed unconditionally ;-)

> +	if (mod->physical)
> +		read_physical_info_powerpc(desc);
>  }


 Thanks!

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux