public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] kmalloc() and page sizes
@ 2002-01-10 10:18 Christian Hildner
  2002-01-10 19:56 ` David Mosberger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christian Hildner @ 2002-01-10 10:18 UTC (permalink / raw)
  To: linux-ia64

Hi all!

In the current kernels the size limit for kmalloc() is 128KB. The ia64
architecture provides pagesizes ranging from 4K, ... , 64K, 256K, ... ,
4G. If we would increase the maximum kmalloc() size limit to 256K (or
1M) this would match perfectly to the pagesizes.

Since I need a large (256K) segment from kmalloc(), I would appreciate
the increase of the size limit. Maybe also other 64Bit architectures
could benefit from that.

Please tell your opinion to the list.

Christian



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] kmalloc() and page sizes
  2002-01-10 10:18 [Linux-ia64] kmalloc() and page sizes Christian Hildner
@ 2002-01-10 19:56 ` David Mosberger
  2002-01-11 12:09 ` Christian Hildner
  2002-01-11 16:38 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2002-01-10 19:56 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Thu, 10 Jan 2002 11:18:49 +0100, Christian Hildner <christian.hildner@hob.de> said:

  Christian> Hi all!  In the current kernels the size limit for
  Christian> kmalloc() is 128KB. The ia64 architecture provides
  Christian> pagesizes ranging from 4K, ... , 64K, 256K, ... , 4G. If
  Christian> we would increase the maximum kmalloc() size limit to
  Christian> 256K (or 1M) this would match perfectly to the pagesizes.

  Christian> Since I need a large (256K) segment from kmalloc(), I
  Christian> would appreciate the increase of the size limit. Maybe
  Christian> also other 64Bit architectures could benefit from that.

  Christian> Please tell your opinion to the list.

Is there a reason you can't use alloc_pages() directly?  It can handle
allocation orders of up to 10 (not that you'll find many chunks of
that size!).  The slab allocator is limited to an allocation order of
5, as you observed.

	--david


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] kmalloc() and page sizes
  2002-01-10 10:18 [Linux-ia64] kmalloc() and page sizes Christian Hildner
  2002-01-10 19:56 ` David Mosberger
@ 2002-01-11 12:09 ` Christian Hildner
  2002-01-11 16:38 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: Christian Hildner @ 2002-01-11 12:09 UTC (permalink / raw)
  To: linux-ia64

David,

the storage I need for my driver has to be mapped by the 64MB kernel page. The alloc_pages()
gives me pages with virtual addresses outside the kernel mapped page. Since kmalloc() gives
storage at natural alignment this call is perfect to overlay the storage with an additional
mapping with 256KB page size.

Christian

David Mosberger schrieb:

> >>>>> On Thu, 10 Jan 2002 11:18:49 +0100, Christian Hildner <christian.hildner@hob.de> said:
>
>   Christian> Hi all!  In the current kernels the size limit for
>   Christian> kmalloc() is 128KB. The ia64 architecture provides
>   Christian> pagesizes ranging from 4K, ... , 64K, 256K, ... , 4G. If
>   Christian> we would increase the maximum kmalloc() size limit to
>   Christian> 256K (or 1M) this would match perfectly to the pagesizes.
>
>   Christian> Since I need a large (256K) segment from kmalloc(), I
>   Christian> would appreciate the increase of the size limit. Maybe
>   Christian> also other 64Bit architectures could benefit from that.
>
>   Christian> Please tell your opinion to the list.
>
> Is there a reason you can't use alloc_pages() directly?  It can handle
> allocation orders of up to 10 (not that you'll find many chunks of
> that size!).  The slab allocator is limited to an allocation order of
> 5, as you observed.
>
>         --david



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-ia64] kmalloc() and page sizes
  2002-01-10 10:18 [Linux-ia64] kmalloc() and page sizes Christian Hildner
  2002-01-10 19:56 ` David Mosberger
  2002-01-11 12:09 ` Christian Hildner
@ 2002-01-11 16:38 ` David Mosberger
  2 siblings, 0 replies; 4+ messages in thread
From: David Mosberger @ 2002-01-11 16:38 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Fri, 11 Jan 2002 13:09:11 +0100, Christian Hildner <christian.hildner@hob.de> said:

  Christian> David, the storage I need for my driver has to be mapped
  Christian> by the 64MB kernel page. The alloc_pages() gives me pages
  Christian> with virtual addresses outside the kernel mapped
  Christian> page. Since kmalloc() gives storage at natural alignment
  Christian> this call is perfect to overlay the storage with an
  Christian> additional mapping with 256KB page size.

The page allocator returns memory in the identity mapped kernel
segment, just like kmalloc().  In fact, kmalloc() is implemented on
top of the page allocator.  Also, the page allocator uses the buddy
system, so the memory is aligned according to the allocation order.

	--david


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-11 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-10 10:18 [Linux-ia64] kmalloc() and page sizes Christian Hildner
2002-01-10 19:56 ` David Mosberger
2002-01-11 12:09 ` Christian Hildner
2002-01-11 16:38 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox