[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVOGxWe5+o0hLROiPN43OCDekV2Ovz1yXr95H1m+yHGn4w@mail.gmail.com>
Date: Thu, 16 Jan 2014 09:28:49 +0800
From: Ming Lei <tom.leiming@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: Bjørn Mork <bjorn@...k.no>,
Thomas Kear <thomas@...r.co.nz>,
Ben Hutchings <bhutchings@...arflare.com>,
netdev <netdev@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma
On Mon, Jan 13, 2014 at 9:26 PM, David Laight <David.Laight@...lab.com> wrote:
>>
>> I believe all processing use the urb->num_sgs field to limit the number
>> of entries. Common interfaces like dma_map_sg() and for_each_sg() limit
>> their processing to "nents" entries, and the USB code use the value of
>> urb->num_sgs for this parameter.
>
> Which mostly means that the sg_xxx functions are doing a whole load
> of unnecessary instructions and memory accesses...
>
> This probably has a lot to do with the significant difference in the
> cpu use for the usb3 and 'normal' ethernet interfaces.
>
> While each bit doesn't seem significant, they soon add up.
If you plan to remove the 'nents' parameter, I am wondering if it is
a good idea, because sg_nents() should be more heavy. Not mention
sometimes the callers just want to map/unmap part of entries.
Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists