All of lore.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] kmalloc() size-limitation
@ 2002-01-15  7:14 Christian Hildner
  2002-01-15  7:56 ` Tang, Yu
  2002-02-04 21:16 ` Jes Sorensen
  0 siblings, 2 replies; 7+ messages in thread
From: Christian Hildner @ 2002-01-15  7:14 UTC (permalink / raw)
  To: linux-ia64

David,

you proposed me to use alloc_pages() instead of kmalloc() in order to get memory bigger than the
128K limit of the kmalloc() call. But even driver-developers don't want to handle with the page
struct unless this is unavoidable. Which are the disadvantages of increasing the size limit of
kmalloc() to 256K, 512K or 1M since machines are getting bigger and 64Bit machines break with
current memory limitations?

Since kmalloc() is implemented in the non arch specific part this also goes to the lkml.

Christian



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

* RE: [Linux-ia64] kmalloc() size-limitation
  2002-01-15  7:14 Christian Hildner
@ 2002-01-15  7:56 ` Tang, Yu
  2002-02-04 21:16 ` Jes Sorensen
  1 sibling, 0 replies; 7+ messages in thread
From: Tang, Yu @ 2002-01-15  7:56 UTC (permalink / raw)
  To: linux-ia64

if I am not missing something, kmalloc is SLAB based on _get_free_pages
nowadays,  and alloc_pages() is based on _get_free_pages directly.  you may
get the more limitations than alloc_pages(). the reason for choosing kmalloc
mainly, is that it makes less fragments when allocing and freeing memories
that's not large as pages.

-----Original Message-----
From: Christian Hildner [mailto:christian.hildner@hob.de]
Sent: 2002年1月15日 15:15
To: davidm@hpl.hp.com; linux ia64 kernel list; LKML
Subject: [Linux-ia64] kmalloc() size-limitation


David,

you proposed me to use alloc_pages() instead of kmalloc() in order to get
memory bigger than the
128K limit of the kmalloc() call. But even driver-developers don't want to
handle with the page
struct unless this is unavoidable. Which are the disadvantages of increasing
the size limit of
kmalloc() to 256K, 512K or 1M since machines are getting bigger and 64Bit
machines break with
current memory limitations?

Since kmalloc() is implemented in the non arch specific part this also goes
to the lkml.

Christian


_______________________________________________
Linux-IA64 mailing list
Linux-IA64@linuxia64.org
http://lists.linuxia64.org/lists/listinfo/linux-ia64


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

* Re: [Linux-ia64] kmalloc() size-limitation
       [not found]       ` <3C43D6EC.74B4EC85@hob.de>
@ 2002-02-04 21:16         ` Jes Sorensen
  2002-02-05  6:51           ` Christian Hildner
  0 siblings, 1 reply; 7+ messages in thread
From: Jes Sorensen @ 2002-02-04 21:16 UTC (permalink / raw)
  To: Christian Hildner; +Cc: davidm, linux ia64 kernel list, LKML

Christian Hildner <christian.hildner@hob.de> writes:

> David,
> 
> you proposed me to use alloc_pages() instead of kmalloc() in order
> to get memory bigger than the 128K limit of the kmalloc() call. But
> even driver-developers don't want to handle with the page struct
> unless this is unavoidable. Which are the disadvantages of
> increasing the size limit of kmalloc() to 256K, 512K or 1M since
> machines are getting bigger and 64Bit machines break with current
> memory limitations?

Because drivers needs to work on all architectures and relying on
different hahavior from kmalloc() is bad.

Jes

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

* Re: [Linux-ia64] kmalloc() size-limitation
  2002-01-15  7:14 Christian Hildner
  2002-01-15  7:56 ` Tang, Yu
@ 2002-02-04 21:16 ` Jes Sorensen
  1 sibling, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2002-02-04 21:16 UTC (permalink / raw)
  To: linux-ia64

Christian Hildner <christian.hildner@hob.de> writes:

> David,
> 
> you proposed me to use alloc_pages() instead of kmalloc() in order
> to get memory bigger than the 128K limit of the kmalloc() call. But
> even driver-developers don't want to handle with the page struct
> unless this is unavoidable. Which are the disadvantages of
> increasing the size limit of kmalloc() to 256K, 512K or 1M since
> machines are getting bigger and 64Bit machines break with current
> memory limitations?

Because drivers needs to work on all architectures and relying on
different hahavior from kmalloc() is bad.

Jes


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

* Re: [Linux-ia64] kmalloc() size-limitation
  2002-02-04 21:16         ` [Linux-ia64] kmalloc() size-limitation Jes Sorensen
@ 2002-02-05  6:51           ` Christian Hildner
  2002-02-07 15:47             ` Jes Sorensen
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Hildner @ 2002-02-05  6:51 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: davidm, LKML

Jes Sorensen schrieb:

> Christian Hildner <christian.hildner@hob.de> writes:
>
> > David,
> >
> > you proposed me to use alloc_pages() instead of kmalloc() in order
> > to get memory bigger than the 128K limit of the kmalloc() call. But
> > even driver-developers don't want to handle with the page struct
> > unless this is unavoidable. Which are the disadvantages of
> > increasing the size limit of kmalloc() to 256K, 512K or 1M since
> > machines are getting bigger and 64Bit machines break with current
> > memory limitations?
>
> Because drivers needs to work on all architectures and relying on
> different hahavior from kmalloc() is bad.
>
> Jes

Jes,

sorry for being unclear. I mean from increasing the kmalloc() size-limit
all platforms would benefit.

Christian

PS: David, I am looking forward getting your book. You are doing a great
job.


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

* Re: [Linux-ia64] kmalloc() size-limitation
  2002-02-05  6:51           ` Christian Hildner
@ 2002-02-07 15:47             ` Jes Sorensen
  2002-02-08  7:23               ` Christian Hildner
  0 siblings, 1 reply; 7+ messages in thread
From: Jes Sorensen @ 2002-02-07 15:47 UTC (permalink / raw)
  To: Christian Hildner; +Cc: davidm, LKML

>>>>> "Christian" == Christian Hildner <christian.hildner@hob.de> writes:

Christian> Jes Sorensen schrieb:
>> Because drivers needs to work on all architectures and relying on
>> different hahavior from kmalloc() is bad.

Christian> sorry for being unclear. I mean from increasing the kmalloc()
Christian> size-limit all platforms would benefit.

Thats not really a good idea, and definately not something you want to
rely on. A lot of architectures are still stuck with 4KB pages and
trying to allocate 128KB on larger in one chunk is likely to fail after
the system has been running for a while. On an ia64 with 16KB or 64KB
pages it's fairly likely it will work, but this is not necessarily a
good idea to do for other archs. If you need such a large block of
memory, vmalloc() is the real way to go.

Jes

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

* Re: [Linux-ia64] kmalloc() size-limitation
  2002-02-07 15:47             ` Jes Sorensen
@ 2002-02-08  7:23               ` Christian Hildner
  0 siblings, 0 replies; 7+ messages in thread
From: Christian Hildner @ 2002-02-08  7:23 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: LKML

Jes Sorensen schrieb:

> >>>>> "Christian" == Christian Hildner <christian.hildner@hob.de> writes:
>
> Christian> Jes Sorensen schrieb:
> >> Because drivers needs to work on all architectures and relying on
> >> different hahavior from kmalloc() is bad.
>
> Christian> sorry for being unclear. I mean from increasing the kmalloc()
> Christian> size-limit all platforms would benefit.
>
> Thats not really a good idea, and definately not something you want to
> rely on. A lot of architectures are still stuck with 4KB pages and
> trying to allocate 128KB on larger in one chunk is likely to fail after
> the system has been running for a while. On an ia64 with 16KB or 64KB
> pages it's fairly likely it will work, but this is not necessarily a
> good idea to do for other archs. If you need such a large block of
> memory, vmalloc() is the real way to go.
>
> Jes

I think you are right. Memory fragmentation will become a real problem on
small machines.

Christian


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

end of thread, other threads:[~2002-02-08  7:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3C3D6A89.27EAA4C7@hob.de>
     [not found] ` <15421.61910.163437.45726@napali.hpl.hp.com>
     [not found]   ` <3C3ED5E7.8BA479B7@hob.de>
     [not found]     ` <15423.5404.65155.924018@napali.hpl.hp.com>
     [not found]       ` <3C43D6EC.74B4EC85@hob.de>
2002-02-04 21:16         ` [Linux-ia64] kmalloc() size-limitation Jes Sorensen
2002-02-05  6:51           ` Christian Hildner
2002-02-07 15:47             ` Jes Sorensen
2002-02-08  7:23               ` Christian Hildner
2002-01-15  7:14 Christian Hildner
2002-01-15  7:56 ` Tang, Yu
2002-02-04 21:16 ` Jes Sorensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.