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-next>] [day] [month] [year] [list]
Date:	Mon, 07 Apr 2008 13:07:34 +0300
From:	Boaz Harrosh <bharrosh@...asas.com>
To:	Pekka J Enberg <penberg@...helsinki.fi>
CC:	Hugh Dickins <hugh@...itas.com>,
	James Bottomley <James.Bottomley@...senPartnership.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Jens Axboe <jens.axboe@...cle.com>,
	Christoph Lameter <clameter@....com>,
	Peter Zijlstra <a.p.ziljstra@...llo.nl>,
	"Rafael J. Wysocki" <rjw@...k.pl>, mpm@...enic.com,
	linux-scsi <linux-scsi@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: scsi: fix sense_slab/bio swapping livelock

On Mon, Apr 07 2008 at 12:52 +0300, Pekka J Enberg <penberg@...helsinki.fi> wrote:
> Hi Boaz,
> 
> On Mon, 7 Apr 2008, Boaz Harrosh wrote:
>> The slub behavior described above is disturbing. If I want a 128-byte kmalloc I
>> would use kmalloc. But if I want a dedicated kmem_cache of my own I take the trouble
>> to create one. As I understood it, a dedicated kmem_cache is somewhat growing but
>> lazy-shrinking and eventually maxes out to my usage of it. If I reserve one elemnt then
>> even when memory is low and caches are shrunk I have at least a page. But more then
>> In low memory condition, in a steady sate the cost of each allocation is kept low
>> because I have the pages for my self and I don't need to go grabbing global locks.
>> Sharing with other pools breaks that behavior. Perhaps we need a flag in kmem_cache
>> creation that says we do not want slab sharing (OK slub sharing in this case).
> 
> I think you're better off using the page allocator then. SLOB, for 
> example, doesn't guarantee you're the only user of a page for 
> kmem_cache_alloc() either and I don't really see why it should as it tries 
> to be as memory efficient as possible.
> 
> 		Pekka

Please forgive my ignorance, but what is then the difference between kmem_cache_alloc()
and kmalloc?

would you not agree that sometimes we want to override that sharing of SLOBs?

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