Re: [PATCH v2] usb: core: warn if a GFP zone flag is passed to hcd_buffer_alloc()

From: Oliver Neukum
Date: Wed Apr 16 2025 - 09:09:11 EST


On 16.04.25 12:47, Petr Tesarik wrote:
If I stay with the USB buffer allocations, AFAICS the mem_flags
parameter should be used only for non-zone flags. If you specify,
GFP_DMA here, it will have no impact whatsoever on allocating DMA
buffers. It may unnecessarily allocate from the DMA zone for doing PIO.

Yes. But we should not limit enforcement of such a _new_ policy
to one method in order to fix a hypothetical issue.
There is just no need for action.

Now I think I should really write an article for LWN to debunk some
myths about GFP_DMA.

Well, if you go to that trouble an explanation of why memflags
are passed in USB at all and how DMA works in general would be
productive.

Regards
Oliver