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  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:	Mon, 17 Feb 2014 18:36:59 +0000
From:	Sudeep Holla <Sudeep.Holla@....com>
To:	Heiko Carstens <heiko.carstens@...ibm.com>
CC:	Sudeep.Holla@....com,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	"linux390@...ibm.com" <linux390@...ibm.com>,
	"linux-s390@...r.kernel.org" <linux-s390@...r.kernel.org>
Subject: Re: [PATCH RFC/RFT v2 3/8] s390: move cacheinfo sysfs to generic
 cacheinfo infrastructure

Hi Heiko,

On 10/02/14 11:30, Heiko Carstens wrote:
> On Fri, Feb 07, 2014 at 04:49:18PM +0000, Sudeep Holla wrote:
>> From: Sudeep Holla <sudeep.holla@....com>
>>
>> This patch removes the redundant sysfs cacheinfo code by making use of
>> the newly introduced generic cacheinfo infrastructure.
>>
>> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
> 
> [...]
> 
>> -static ssize_t shared_cpu_map_func(struct kobject *kobj, int type, char *buf)
>> -{
>> -	struct cache_index_dir *index;
>> -	int len;
>> +	this_leaf->level = level + 1;
>> +	this_leaf->type = type;
>> +	this_leaf->coherency_line_size = ecag(EXTRACT_LINE_SIZE, level, ti);
>> +	this_leaf->ways_of_associativity = ecag(EXTRACT_ASSOCIATIVITY,
>> +						level, ti);
>> +	this_leaf->size = ecag(EXTRACT_SIZE, level, ti);
>> +	if (private)
>> +		cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map);
>> +	else /* System wide */
>> +		cpumask_copy(&this_leaf->shared_cpu_map, cpu_online_mask);
> 
> FWIW, this also seems to be wrong: on s390 we only expose cpu private
> caches via sysfs. Shared caches are not exposed (and simply saying they are
> system wide would be wrong).
> Please have a look at these two commits which should describe why things
> are as they are on s390:
> 
> 881730ad365130f64b5c70c40904b04eb3b79de3
>  "s390/cache: expose cpu cache topology via sysfs"
> 6668022c7bde3fdc96d3d257294a7216c7a46829
>  "s390/cache: add cpu cache information to /proc/cpuinfo"
> 
>

I need your help to get few things clarified.

IIUC, I see that shared caches are not exposed via sysfs but there are exposed
through /proc/cpuinfo, right ? If yes, based on your above statement, shared
cpus are may not be system-wide, then how can /proc/cpuinfo show shared cache info.

Regards,
Sudeep

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