Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-27 Thread Clemens Ladisch
Felipe Ferreri Tonello wrote: > One thing to consider is that the ALSA rawmidi device buffer is > sequential and our USB request buffer is not. This means that our 32 > (qlen) * 256 (buflen) = 8KB of data is non-linear. Some requests might > have 3 or 4 bytes (average size of a normal MIDI

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-27 Thread Felipe Ferreri Tonello
Hi Clemens On 27/11/15 09:05, Clemens Ladisch wrote: > Felipe Ferreri Tonello wrote: >> On 13/11/15 08:55, Clemens Ladisch wrote: >>> Felipe F. Tonello wrote: +static void f_midi_transmit(struct f_midi *midi) +{ +... + len = kfifo_peek(>in_req_fifo, ); +

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-27 Thread Clemens Ladisch
Felipe Ferreri Tonello wrote: > On 13/11/15 08:55, Clemens Ladisch wrote: >> Felipe F. Tonello wrote: >>> +static void f_midi_transmit(struct f_midi *midi) >>> +{ >>> +... >>> + len = kfifo_peek(>in_req_fifo, ); >>> + ... >>> + if (req->length > 0) { >>> +

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-27 Thread Felipe Ferreri Tonello
Hi Clemens On 27/11/15 09:05, Clemens Ladisch wrote: > Felipe Ferreri Tonello wrote: >> On 13/11/15 08:55, Clemens Ladisch wrote: >>> Felipe F. Tonello wrote: +static void f_midi_transmit(struct f_midi *midi) +{ +... + len = kfifo_peek(>in_req_fifo, ); +

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-27 Thread Clemens Ladisch
Felipe Ferreri Tonello wrote: > One thing to consider is that the ALSA rawmidi device buffer is > sequential and our USB request buffer is not. This means that our 32 > (qlen) * 256 (buflen) = 8KB of data is non-linear. Some requests might > have 3 or 4 bytes (average size of a normal MIDI

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-27 Thread Clemens Ladisch
Felipe Ferreri Tonello wrote: > On 13/11/15 08:55, Clemens Ladisch wrote: >> Felipe F. Tonello wrote: >>> +static void f_midi_transmit(struct f_midi *midi) >>> +{ >>> +... >>> + len = kfifo_peek(>in_req_fifo, ); >>> + ... >>> + if (req->length > 0) { >>> +

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-25 Thread Felipe Ferreri Tonello
Hi Clemens On 13/11/15 08:55, Clemens Ladisch wrote: > Felipe F. Tonello wrote: >> This patch introduces pre-allocation of IN endpoint USB requests. This >> improves on latency (requires no usb request allocation on transmit) and >> avoid >> several potential probles on allocating too many usb

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-25 Thread Felipe Ferreri Tonello
Hi Robert, On 13/11/15 12:38, Robert Baldyga wrote: > Hi Felipe, > > On 11/10/2015 06:52 PM, Felipe F. Tonello wrote: >> This patch introduces pre-allocation of IN endpoint USB requests. This >> improves on latency (requires no usb request allocation on transmit) and >> avoid >> several

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-25 Thread Felipe Ferreri Tonello
Hi Robert, On 13/11/15 12:38, Robert Baldyga wrote: > Hi Felipe, > > On 11/10/2015 06:52 PM, Felipe F. Tonello wrote: >> This patch introduces pre-allocation of IN endpoint USB requests. This >> improves on latency (requires no usb request allocation on transmit) and >> avoid >> several

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-25 Thread Felipe Ferreri Tonello
Hi Clemens On 13/11/15 08:55, Clemens Ladisch wrote: > Felipe F. Tonello wrote: >> This patch introduces pre-allocation of IN endpoint USB requests. This >> improves on latency (requires no usb request allocation on transmit) and >> avoid >> several potential probles on allocating too many usb

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-13 Thread Robert Baldyga
Hi Felipe, On 11/10/2015 06:52 PM, Felipe F. Tonello wrote: > This patch introduces pre-allocation of IN endpoint USB requests. This > improves on latency (requires no usb request allocation on transmit) and avoid > several potential probles on allocating too many usb requests (which involves >

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-13 Thread Clemens Ladisch
Felipe F. Tonello wrote: > This patch introduces pre-allocation of IN endpoint USB requests. This > improves on latency (requires no usb request allocation on transmit) and avoid > several potential probles on allocating too many usb requests (which involves > DMA pool allocation problems). > >

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-13 Thread Clemens Ladisch
Felipe F. Tonello wrote: > This patch introduces pre-allocation of IN endpoint USB requests. This > improves on latency (requires no usb request allocation on transmit) and avoid > several potential probles on allocating too many usb requests (which involves > DMA pool allocation problems). > >

Re: [PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-13 Thread Robert Baldyga
Hi Felipe, On 11/10/2015 06:52 PM, Felipe F. Tonello wrote: > This patch introduces pre-allocation of IN endpoint USB requests. This > improves on latency (requires no usb request allocation on transmit) and avoid > several potential probles on allocating too many usb requests (which involves >

[PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-10 Thread Felipe F. Tonello
This patch introduces pre-allocation of IN endpoint USB requests. This improves on latency (requires no usb request allocation on transmit) and avoid several potential probles on allocating too many usb requests (which involves DMA pool allocation problems). This implementation also handles

[PATCH v5 7/7] usb: gadget: f_midi: pre-allocate IN requests

2015-11-10 Thread Felipe F. Tonello
This patch introduces pre-allocation of IN endpoint USB requests. This improves on latency (requires no usb request allocation on transmit) and avoid several potential probles on allocating too many usb requests (which involves DMA pool allocation problems). This implementation also handles