[Libdlo] [PATCH] udlfb: high-throughput urb pool
Greg KH
greg at kroah.com
Fri Dec 17 13:35:35 PST 2010
On Fri, Dec 17, 2010 at 03:04:49PM -0600, Andrew Kephart wrote:
> On Fri, 2010-12-17 at 12:34 -0800, Greg KH wrote:
> > On Fri, Dec 17, 2010 at 02:17:34PM -0600, Andrew Kephart wrote:
> > > udlfb: add parameters for URB pool size and for nonblocking URB pool
> > >
> [some deleted]
> >
> > Ick, no, don't use a module parameter for this, just get it right the
> > first time (make it big) and leave it at that.
> >
> > thanks,
> >
> > greg k-h
>
> Ok. If that's the preferred model, then I'm all for it.
>
> The reason it's in there, though, is that there's the potential for a
> pretty big performance vs. memory tradeoff, where the "right" answer
> will depend pretty heavily on the expected usage, so I didn't want to
> burn a bunch of memory (>100K) if it isn't going to be needed.
>
> In cases like this, is there a preferred model for handling that
> variability? Plan for worst-case? Compile-time option? With sysctl?
> Something else? Toss the pre-allocation model and go on-demand?
I prefer on-demand, with an upper bound so we don't easily oops the box
(older kernels had the fun bug of `cat /dev/zero > /dev/ttyUSB0` caused
by me forgetting to limit the number of outstanding urbs for some
usb-serial drivers.)
So make the upper bound large (50?) and just create them on demand as
needed and you should be fine.
thanks,
greg k-h
More information about the Libdlo
mailing list