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]
Message-ID: <506480FB.40802@parallels.com>
Date:	Thu, 27 Sep 2012 20:38:19 +0400
From:	Glauber Costa <glommer@...allels.com>
To:	Christoph Lameter <cl@...ux.com>
CC:	<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Pekka Enberg <penberg@...nel.org>,
	David Rientjes <rientjes@...gle.com>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH 4/4] sl[au]b: process slabinfo_show in common code

On 09/27/2012 07:07 PM, Christoph Lameter wrote:
> On Thu, 27 Sep 2012, Glauber Costa wrote:
> 
>> --- a/mm/slab_common.c
>> +++ b/mm/slab_common.c
>> @@ -239,7 +239,23 @@ static void s_stop(struct seq_file *m, void *p)
>>
>>  static int s_show(struct seq_file *m, void *p)
>>  {
>> -	return slabinfo_show(m, p);
>> +	struct kmem_cache *s = list_entry(p, struct kmem_cache, list);
>> +	struct slabinfo sinfo;
>> +
>> +	memset(&sinfo, 0, sizeof(sinfo));
>> +	get_slabinfo(s, &sinfo);
> 
> Could get_slabinfo() also set the objects per slab etc in some additional
> field in struct slabinfo? Then we can avoid the exporting of the oo_
> functions and we do not need the cache_order() etc functions.
> 
Yes. As a matter of fact, I first implemented it this way, and later
switched. I was anticipating that people would be likely to point out
that those properties are directly derivable from the caches, and it
would be better to just get them from there.

I am more than happy to stick them in the slabinfo struct.

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