Re: calculating ring buffer size

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

 



On Mon, Oct 17, 2011 at 03:31:02PM +0530, Amit Nagal wrote:
> Hi ,
> 
> While going through a few usb drivers code  , i observed that the
> drivers maintain a ring buffer
> which stores data coming from usb device in interrupt context .
> Also these ring buffers is a  power of  2 size
> 
> i am looking for reasons how to compute the the max size of these ring
> buffers , so that no overflow situation happens .
> What factors should always be accounted while computing the max size
> of these ring buffers .

Test your device, and your driver, with different values and determine
what is the best size.  It's not that hard to do.

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux