Re: Allocating memory below 4G

From: Pete Zaitcev (OTID3) (oted3354ac022639a1_at_comcast.net)
Date: 04/18/05

  • Next message: David Schwartz: "Re: question about sockets"
    Date: Mon, 18 Apr 2005 13:18:23 -0700
    
    

    On Fri, 15 Apr 2005 08:07:23 -0700, Greg Law wrote:

    > I'm writing a driver for a device that requires DMA-able memory below
    > 4G. I'm running on an AMD x86_64 with 8GB RAM, and exausting the IOMMU
    > entries. My device can't use bounce-buffers for performance reasons.
    > So I'm kind-of stuck.

    > Is there any way I can request the kernel give me physical memory below
    > 4G? I don't really want to insist on ZONE_NORMAL, since this is quite
    > a limited resource, and I can quite happily have physical RAM in the 1G
    > -> 4G range.

    I'm afraid you cannot do what you want here. Allocations only happen
    according to zones. It's not possible to place additional limits.

    However, I am surprised to hear that ZONE_NORMAL is "limited" on x86_64.
    I thought it covered all memory, with highmem being nil. Which, of course,
    does not help you, but I'm curious where these data come from.

    One easy cheasy way to make it work is to run with mem=4G. I'm pretty
    sure nobody will ever notice the difference.

    -- Pete


  • Next message: David Schwartz: "Re: question about sockets"