On Tue, 9 Jan 2018 19:58:34 +0100 Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > On Tue, Jan 09, 2018 at 10:53:10AM -0800, Stephen Hemminger wrote: > > On Tue, 9 Jan 2018 19:42:40 +0100 > > Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > > > > > On Thu, Jan 04, 2018 at 02:13:29PM -0800, Stephen Hemminger wrote: > > > > Allow setting size of ring buffer for host communication via > > > > module parameter. > > > > > > > > Signed-off-by: Stephen Hemminger <sthemmin@xxxxxxxxxxxxx> > > > > --- > > > > drivers/uio/uio_hv_generic.c | 25 +++++++++++++++++++++---- > > > > 1 file changed, 21 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/drivers/uio/uio_hv_generic.c b/drivers/uio/uio_hv_generic.c > > > > index 8d5f529a1dc1..24f8689fdb14 100644 > > > > --- a/drivers/uio/uio_hv_generic.c > > > > +++ b/drivers/uio/uio_hv_generic.c > > > > @@ -39,6 +39,13 @@ > > > > #define DRIVER_AUTHOR "Stephen Hemminger <sthemmin at microsoft.com>" > > > > #define DRIVER_DESC "Generic UIO driver for VMBus devices" > > > > > > > > +#define RING_SIZE_MIN 64 > > > > +#define RING_SIZE_MAX 512 > > > > + > > > > +static unsigned int ring_size = 128; > > > > +module_param(ring_size, uint, 0444); > > > > +MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)"); > > > > > > Ugh, really? Module parameters suck rocks. No other way to do this > > > dynamically? This affects all devices for the driver, is that ok? > > > > > > And how does anyone know to change this or not? Why would it be > > > changed? Why can't the kernel get this right on its own? > > > > You made UIO API so restrictive there is no parameterization available. > > _I_ did? Heck, I don't remember what I did last month, let alone almost > a decade ago... > > > The size of ring buffer is generally unchanged. > > Then why is this needed at all? The default ring buffer is quite large, and wasteful with small VM's with network device driver we do autotuning now based on number of channels which is based on number of cpu's. How about integrating that? _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel