Re: [PATCH 05/10] uio_hv_generic: make ring size configurable

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

 



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.
The size of ring buffer is generally unchanged. 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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