lkml.org 
[lkml]   [2008]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] USB: use stack allocation for struct usb_ctrlrequest
Wu Fengguang wrote:

>
>>> e.g. what if the memory is allocated from ZONE_HIGHMEM?
>>>
>>>
>> In many cases there is no problem to DMA high memory. If you happen to
>> be working with a device that does have problems with full 32 bit
>> addresses then GFP_DMA would be the right flag, not GFP_NOIO.
>>
>
> For 64bit systems, we can easily go beyond 4GB physical memory.
> So at least we should add GFP_DMA32 in addition to GFP_NOIO?
>
>
I don't think so. 64bit systems don't have ZONE_HIMEM - this is why I
was referring to 32 bit.

More to the point, many devices don't have any issues accessing full 64
bit addressing mode and many 64bit machines have IOMMU that will take
care of those devices that DO have a problem. Adding this flag will just
penalize the MM sub-system for no reason. For the rare case where there
is a device that cannot do 64 bit addressing in a 64 bit machine with no
IOMMU, AFAIK bounce buffers are used to overcome the issue.

Cheers,
Gilad



--
Gilad Ben-Yossef
Chief Coffee Drinker

Codefidence Ltd.
The code is free, your time isn't.(TM)

Web: http://codefidence.com
Email: gilad@codefidence.com
Office: +972-8-9316883 ext. 201
Fax: +972-8-9316885
Mobile: +972-52-8260388

The Doctor: Don't worry, Reinette, just a nightmare.
Everyone has nightmares. Even monsters from under the
bed have nightmares, don't you, monster?
Reinette: What do monsters have nightmares about?
The Doctor: Me!



\
 
 \ /
  Last update: 2008-12-10 15:35    [W:0.084 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site