Re: [PATCH] Staging: usbip: Use local pointer to reference urb in stub_recv_cmd_submit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2011-06-17 at 11:34:00 +0200, Dan Carpenter <error27@xxxxxxxxx> wrote:
> On Fri, Jun 17, 2011 at 11:27:57AM +0200, Tobias Klauser wrote:
> > On 2011-06-17 at 11:00:29 +0200, Joey Lee <jlee@xxxxxxxxxx> wrote:
> > > ??? ??????2011-06-16 ??? 13:38 +0200???Tobias Klauser ?????????
> > > > Use a local pointer to reference the urb instead of dereferencing the
> > > > priv->urb member all over the function.
> > > > 
> > > 
> > > What's the benefit for use local pointer to instead of priv->urb? Does
> > > it for coding style?
> > 
> > Dereferencing a pointer can be an expensive operation, depending on the
> > (cache) architecture.
> 
> I'd have to see some benchmarks before I believe that matters here. :P

I didn't run any benchmarks to be honest, only looked at the generated
assembly on the nios2 architecture (where I'm currently trying to get
usbip running) where it showed significantly less load instructions and
thus potential memory access.

Cheers
Tobias
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux