On Wednesday 22 February 2006 15:36, Christoph Hellwig wrote:
> On Tue, Feb 21, 2006 at 10:03:58PM +0100, Carlos Mart?n wrote:
> > > The important bit is that you need the pointers with the above module
> > > spit, because you can't call usb- or pci-specific routines from 
> > > acx-common.ko 
> > 
> > Yes, I realise that (unless you export them, but I don't think we want 
that). 
> 
> even that wouldn't work with current module because the usb and pci modules
> call into the common code and thus we'd have recursive module depency.

And you may not build both modules, so acx-common.ko would never be satisfied. 
Function pointers all the way then.

> 
> > This approach is probably better even if the driver is unified. Pointer 
> > dereferences are cheaper than branches/jumping, aren't they?
> 
> It shouldn't matter these days as cpus have nice branch prediction.

I remember reading P4s have problems with this because they had really long 
branch pipes (the proper name escapes me at the moment) and if they got it 
wrong, it took quite a bit of time (in CPU terms, of course) to flush them. I 
don't use them personally, but I believe the trend is to do that.

   cmn
-- 
Carlos Martín Nieto    |   http://www.cmartin.tk
Hobbyist programmer    |
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to