[rt2x00-users] [RFT] rt2x00: Use GFP_KERNEL for rx buffer allocation on USB devices
Andreas Hartmann
andihartmann at 01019freenet.de
Wed Apr 18 22:59:20 EST 2012
Helmut Schaa wrote:
> Hi,
>
> On Wed, Apr 18, 2012 at 1:57 PM, Andreas Hartmann
> <andihartmann at 01019freenet.de> wrote:
>> Helmut Schaa wrote:
>>> Since the RX path on USB devices is handled in process context we can
>>> use GFP_KERNEL for RX buffer allocation. This should reduce the
>>> likelihood of allocation failures.
>>>
>>> Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
>>> ---
[...]
>> Does this change really affect only usb?
>
> The change, yes.
>
>> As far as I can see, pci is
>> affected, too?
>
> Correct.
>
>> Or did I misunderstood something?
>
> However PCI processes the RX path in softirq context and as such
> cannot use GFP_KERNEL allocations. And I would hesitate to switch
> PCI to also use process context for interrupt processing. In my tests
> this affects performance on embedded devices heavily.
>
> So, this workaround is only applicable to USB for now.
Well, I asked, because the call
skb = rt2x00queue_alloc_rxskb(&queue->entries[i], GFP_KERNEL);
in rt2x00queue_alloc_rxskbs(struct data_queue *queue) statically uses
GFP_KERNEL for both usb and pci. For pci, I would have expected GFP_ATOMIC.
But this probably doesn't harm because it's only used once during device
initialization.
Regards,
Andreas
More information about the users
mailing list