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: <48041D90.2040702@cn.fujitsu.com>
Date:	Tue, 15 Apr 2008 11:14:24 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>,
	"xemul@...nvz.org" <xemul@...nvz.org>, menage@...gle.com,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] use vmalloc for mem_cgroup allocation. v2

KAMEZAWA Hiroyuki wrote:
> On Mon, 14 Apr 2008 19:17:30 -0700
> Andrew Morton <akpm@...ux-foundation.org> wrote:
>> Well...  vmalloced memory is of course a little slower to use - additional
>> TLB pressure.
>>
>> Do you think the memcgroup is accessed frequently enough to use vmalloc()
>> only on those architectures which actually need it?
>>
>> Because it'd be pretty simple to implement:
>>
>> 	if (sizeof(struct mem_group) > PAGE_SIZE)
>> 		vmalloc()
>> 	else
>> 		kmalloc()
>>
>> 	...
>>
>> 	if (sizeof(struct mem_group) > PAGE_SIZE)
>> 		vfree()
>> 	else
>> 		kfree()
>>
>> the compiler will optimise away the `if'.
>>
> 
> Hmm, ok. I'll rewrite one to do that.
> 

It will be better to use wrappers for these: mem_cgroup_alloc() and mem_cgroup_free()

> Thanks,
> -Kame
> 
> 
> 
--
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