Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I'm developing a kernel module that requires more than 1GB RAM. Most of this memory is taken from the slab, using kmem_cache_create() and kmem_cache_alloc(). Also using vmalloc() and kmalloc(). ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    mtz
    mtz is offline
    Just Joined!
    Join Date
    Aug 2009
    Posts
    3

    Huge memory on PAE kernel


    Hi,

    I'm developing a kernel module that requires more than 1GB RAM.
    Most of this memory is taken from the slab, using kmem_cache_create() and kmem_cache_alloc().
    Also using vmalloc() and kmalloc().

    It works fine on RHEL4, kernel 2.6.9-42.ELhugemem, having 3.1 GB Low-Memory (LowTotal in /proc/meminfo).

    Porting to RHEL5 kernel 2.6.18-128.el5PAE, there's only 715 MB Low-Memory.
    My questions:
    1. How can a kernel module allocate high memory?
    2. Should using high memory degrade performance?

    Note:
    RHEL4 kernel is built with CONFIG_HIGHMEM4G=y
    RHEL5 kernel is built with CONFIG_HIGHMEM64G=y

    Thanks,
    Mtz

  2. #2
    mtz
    mtz is offline
    Just Joined!
    Join Date
    Aug 2009
    Posts
    3
    I will try to answer myself...
    1. How can a kernel module allocate high memory?
    Simply, by calling vmalloc().
    2. Should using high memory degrade performance?
    It should, but I'm not sure how much.
    I'm also not sure if allocating more than 128MB VM will exhaust the 896-1024MB zone, and further degrade performance.

    Comments, anyone?
    Thanks,
    Mtz

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    Any reason why you cannot use an x86_64 kernel? If you can, then you don't have to worry about himem/lowmem issues. It will still run your 32bit applications without problem.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #4
    mtz
    mtz is offline
    Just Joined!
    Join Date
    Aug 2009
    Posts
    3
    Quote Originally Posted by Rubberman View Post
    Any reason why you cannot use an x86_64 kernel? If you can, then you don't have to worry about himem/lowmem issues. It will still run your 32bit applications without problem.
    Hi Rubberman,

    Porting to x86_64 kernel is indeed in our roadmap; however, suspecting this porting will exceed our schedule, it was decided to currently stick to x86_32.
    So for now, we'll probably have to manage with the current limitations:
    LowTotal: 714 MB ; for kmalloc(), kmem_cache_alloc(), …
    VmallocTotal: 114 MB ; for vmalloc()

    I've tried to increase the vmalloc space as described in the link :
    lkml.org/lkml/2006/6/28/155
    but kept getting the described kernel panic… Any tips on this?

    Thanks,
    Mtz

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    Quote Originally Posted by mtz View Post
    Hi Rubberman,

    Porting to x86_64 kernel is indeed in our roadmap; however, suspecting this porting will exceed our schedule, it was decided to currently stick to x86_32.
    So for now, we'll probably have to manage with the current limitations:
    LowTotal: 714 MB ; for kmalloc(), kmem_cache_alloc(), …
    VmallocTotal: 114 MB ; for vmalloc()

    I've tried to increase the vmalloc space as described in the link :
    lkml.org/lkml/2006/6/28/155
    but kept getting the described kernel panic… Any tips on this?

    Thanks,
    Mtz
    Actually, it might be faster to just update to x86_64. Sorry that I don't know what the best means to tune low memory and vmalloc memory. I would think that this might be possible with boot-time parameters. Have you posted this query to the kernel.org forums?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •