* Re: Slab allocators: Define common size limitations [not found] <Pine.LNX.4.64.0705152313490.5832@schroedinger.engr.sgi.com> @ 2007-05-16 6:58 ` Geert Uytterhoeven 2007-05-16 7:02 ` David Miller ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Geert Uytterhoeven @ 2007-05-16 6:58 UTC (permalink / raw) To: Christoph Lameter Cc: linux-mm, Andrew Morton, Linux Kernel Development, Linux/PPC Development On Tue, 15 May 2007, Christoph Lameter wrote: > So define a common maximum size for kmalloc. For conveniences sake > we use the maximum size ever supported which is 32 MB. We limit the maximum > size to a lower limit if MAX_ORDER does not allow such large allocations. What are the changes a large allocation will actually succeed? Is there an alignment rule for large allocations? E.g. for one of the PS3 drivers I need a physically contiguous 256 KiB-aligned block of 256 KiB. Currently I'm using __alloc_bootmem() for that, but maybe kmalloc() becomes a suitable alternative now? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slab allocators: Define common size limitations 2007-05-16 6:58 ` Slab allocators: Define common size limitations Geert Uytterhoeven @ 2007-05-16 7:02 ` David Miller 2007-05-16 17:41 ` Christoph Lameter 2007-05-16 21:42 ` Arnd Bergmann 2 siblings, 0 replies; 5+ messages in thread From: David Miller @ 2007-05-16 7:02 UTC (permalink / raw) To: Geert.Uytterhoeven; +Cc: linuxppc-dev, linux-mm, akpm, linux-kernel, clameter From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Date: Wed, 16 May 2007 08:58:39 +0200 (CEST) > E.g. for one of the PS3 drivers I need a physically contiguous 256 > KiB-aligned block of 256 KiB. Currently I'm using __alloc_bootmem() > for that, but maybe kmalloc() becomes a suitable alternative now? I'm allocating up to 1MB for per-process TLB hash tables on sparc64. But I can gracefully handle failures and it's just a performance tweak to use such large sized tables. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slab allocators: Define common size limitations 2007-05-16 6:58 ` Slab allocators: Define common size limitations Geert Uytterhoeven 2007-05-16 7:02 ` David Miller @ 2007-05-16 17:41 ` Christoph Lameter 2007-05-16 21:42 ` Arnd Bergmann 2 siblings, 0 replies; 5+ messages in thread From: Christoph Lameter @ 2007-05-16 17:41 UTC (permalink / raw) To: Geert Uytterhoeven Cc: linux-mm, Andrew Morton, Linux Kernel Development, Linux/PPC Development On Wed, 16 May 2007, Geert Uytterhoeven wrote: > On Tue, 15 May 2007, Christoph Lameter wrote: > > So define a common maximum size for kmalloc. For conveniences sake > > we use the maximum size ever supported which is 32 MB. We limit the maximum > > size to a lower limit if MAX_ORDER does not allow such large allocations. > > What are the changes a large allocation will actually succeed? > Is there an alignment rule for large allocations? > > E.g. for one of the PS3 drivers I need a physically contiguous 256 KiB-aligned > block of 256 KiB. Currently I'm using __alloc_bootmem() for that, but maybe > kmalloc() becomes a suitable alternative now? The chance of succeeding drops with the time that the system has been running. Typically these large allocs are used when the system is brought up. Maybe we will be able to successfully allocate these even after memory has gotten significant use when Mel's antifrag/defrag work has progressed more. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slab allocators: Define common size limitations 2007-05-16 6:58 ` Slab allocators: Define common size limitations Geert Uytterhoeven 2007-05-16 7:02 ` David Miller 2007-05-16 17:41 ` Christoph Lameter @ 2007-05-16 21:42 ` Arnd Bergmann 2007-05-17 8:45 ` Geert Uytterhoeven 2 siblings, 1 reply; 5+ messages in thread From: Arnd Bergmann @ 2007-05-16 21:42 UTC (permalink / raw) To: linuxppc-dev Cc: Geert Uytterhoeven, linux-mm, Andrew Morton, Linux Kernel Development, Christoph Lameter On Wednesday 16 May 2007, Geert Uytterhoeven wrote: > What are the changes a large allocation will actually succeed? > Is there an alignment rule for large allocations? > > E.g. for one of the PS3 drivers I need a physically contiguous 256 KiB-aligned > block of 256 KiB. Currently I'm using __alloc_bootmem() for that, but maybe > kmalloc() becomes a suitable alternative now? kmalloc is limited to 128KiB on most architectures. Normally there is no need to use it anyway, just use __get_free_pages(). It will generally succeed at early boot time, but not after the system has been running for some time. Arnd <>< ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Slab allocators: Define common size limitations 2007-05-16 21:42 ` Arnd Bergmann @ 2007-05-17 8:45 ` Geert Uytterhoeven 0 siblings, 0 replies; 5+ messages in thread From: Geert Uytterhoeven @ 2007-05-17 8:45 UTC (permalink / raw) To: Arnd Bergmann Cc: linuxppc-dev, Andrew Morton, Christoph Lameter, Linux Kernel Development, linux-mm On Wed, 16 May 2007, Arnd Bergmann wrote: > On Wednesday 16 May 2007, Geert Uytterhoeven wrote: > > What are the changes a large allocation will actually succeed? > > Is there an alignment rule for large allocations? > > > > E.g. for one of the PS3 drivers I need a physically contiguous 256 KiB-aligned > > block of 256 KiB. Currently I'm using __alloc_bootmem() for that, but maybe > > kmalloc() becomes a suitable alternative now? > > kmalloc is limited to 128KiB on most architectures. Normally there is no > need to use it anyway, just use __get_free_pages(). It will generally > succeed at early boot time, but not after the system has been running > for some time. Exactly my understanding. And __get_free_pages() returns PAGE_SIZE-aligned memory. So I'll keep the current code. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE) Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1 Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-17 8:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.64.0705152313490.5832@schroedinger.engr.sgi.com>
2007-05-16 6:58 ` Slab allocators: Define common size limitations Geert Uytterhoeven
2007-05-16 7:02 ` David Miller
2007-05-16 17:41 ` Christoph Lameter
2007-05-16 21:42 ` Arnd Bergmann
2007-05-17 8:45 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).