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]
Date:	Sun, 6 Apr 2014 14:15:46 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...il.com>
Cc:	Don Zickus <dzickus@...hat.com>, acme@...stprotocols.net,
	LKML <linux-kernel@...r.kernel.org>, jmario@...hat.com,
	fowles@...each.com, bp@...en8.de
Subject: Re: [PATCH 1/4] perf: Allow ability to map cpus to nodes easily

On Thu, Apr 03, 2014 at 02:48:51PM +0900, Namhyung Kim wrote:
> Hi Don,

SNIP

> 
> More generally, this sysfs access needs to check actual mountpoint using
> sysfs__mountpoint() IMHO.
> 
> Also this API can be generalized like reading int value from a sysfs
> file as the filename itself represents the content in most cases.
> 
> So how about changing this way?  It might reside on somewhere in tools/lib/api/fs/.
> 
>   max_cpu_num = sysfs__read_int("devices/system/cpu/possible");
> 
>   max_node_num = sysfs__read_int("devices/system/node/possible");
> 
> 
> Hmm.. looking at the code, perf already has filename__read_{int,str} API
> in util/util.c.  Maybe you can just use it instead.

I think those just read the file, while Don needs to parse
the map to get max cpu number

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