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: <4BDE9504.8030401@suse.cz>
Date:	Mon, 03 May 2010 11:19:00 +0200
From:	Jiri Slaby <jslaby@...e.cz>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	Avi Kivity <avi@...hat.com>, Changli Gao <xiaosuo@...il.com>,
	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
	akpm@...ux-foundation.org, paulmck@...ux.vnet.ibm.com,
	adobriyan@...il.com, mingo@...e.hu, peterz@...radead.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: use kmalloc() to allocate fdmem if possible

On 05/03/2010 11:13 AM, Eric Dumazet wrote:
> /*
>  * Warning: if size is not a power of two, kmalloc() might
>  * waste memory because of its requirements.
>  */
> void *kvmalloc(size_t size)
> {
> 	void *ptr = kmalloc(size, GFP_KERNEL | __GFP_NOWARN);

This is kind of waste of high-order pages, isn't it? Wouldn't it be
better to have a watermark where we skip kmalloc completely?

> 
> 	if (ptr)
> 		return ptr;
> 	return vmalloc(size);
> }



-- 
js
suse labs
--
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