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 4:57 AM, Manuel Bouyer wrote:

> On Tue, Jan 04, 2011 at 02:32:02AM -0800, Matt Thomas wrote:
>> 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.
> 
> Is there some provision to always keep some <4GB pages free (with some being
> quite large for e.g. USB descriptors) so there is always some bounce buffers
> available ? AFAIK, if you allocate from the <4Gb free list, you can eat all
> DMA-capable RAM.
> I fixed this issue in arch/x86/x86/x86_machdep.c 1.37, I wonder if your change
> has reintroduced this problem ...

Since it's not turned on by default, I doubt it.



Home | Main Index | Thread Index | Old Index