Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/uvm

On Jan 4, 2011, at 2:19 AM, Michael Graff wrote:

> On 1/4/11 2:26 AM, Matt Thomas wrote:
>> Module Name: src
>> Committed By:        matt
>> Date:                Tue Jan  4 08:26:33 UTC 2011
>> Modified Files:
>>      src/sys/uvm: uvm_extern.h uvm_fault.c uvm_km.c uvm_page.c
>> Log Message:
> ...
>> When allocating kernel memory pages, allow the MD to specify a preferred
>> VM_FREELIST from which to choose pages.  For machines with large amounts
>> of memory (> 4GB), all kernel memory to come from <4GB to reduce the amount
>> of bounce buffering needed with 32bit DMA devices.
> Sorry to be clueless here, but does this mean I lose my large, automatic
> disk cache on my 32GB machine, or is this just for other types of memory
> purposes?

Not really.  A lot of device can only do 32bit DMA transfers so without some 
type assistance (like the alpha has) you are restricted to DMA to the first 4GB 
of RAM.  If you are doing DMA to an address >= 4GB, the system will stage the 
data in a buffer < 4GB for the DMA and then move the data to its ultimate 
destination (for a read).  For a write it copies to the "bounce" buffer, and 
then does a DMA.

The point is if you are allocating a mbuf or a usb buffer, it makes sense to 
allocate from the first 4GB if you can to avoid using bounce buffers.

It's just a preference.

Home | Main Index | Thread Index | Old Index