Re: [PATCH] Memory mapping for USBFS

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

 



On Sun, Sep 29, 2013 at 8:18 PM, Markus Rechberger
<mrechberger@xxxxxxxxx> wrote:
> On Sun, Sep 29, 2013 at 2:07 PM, Ming Lei <tom.leiming@xxxxxxxxx> wrote:
>> On Sun, Sep 29, 2013 at 7:51 PM, Markus Rechberger
>> <mrechberger@xxxxxxxxx> wrote:
>>
>>>
>>> I agree, but here not only small buffers are the problem, also latency.
>>>
>>> I will send another patch version which overrides the SG transfer once
>>> a preallocated buffer is submitted. The current patch will only use
>>> the pre-allocated buffers if the buffer size is smaller than 15-16k.
>>
>> If you put much attention to performance & latency, I am wondering why
>> you don't write a kernel mode usb driver to fix your problem?  With usbfs
>> and user mode driver, both performance and latency won't be very good:
>
> Userspace drivers work with all systems from Linux 2.6.15 on in our case.
> One driver for all.
> USBFS has been designed to write such drivers, and we are using it.

If it does work from 2.6.15 on, why do you post the patch now? Is there
any recent change which breaks your driver?

>
>> - URB can only be submitted in process context with context switch cost
>> - URB complete is notified by signal, which might introduce much latency
>> With one kernel mode driver, you can get better performance/latency much
>> easily.
>>
>
> nearly all embedded systems are usually shipped without third party
> kernel modules and in some cases
> they don't even provide the kernel source (additionally said I do not
> want to provide kernel
> drivers for each system it's a big waste of time, not even thinking
> about the time trying to
> get the kernel sources for a system).

You can submit patch and ask to merge the driver into kernel tree.

> We have our glue module which we could ship but once a manufacturer
> decides to update
> their system the game starts again the driver would not load (they do
> not ship any modules
> which do not belong to their system).
>
> The current problems are maybe less than 0.1% on our side but we also
> want to have them fixed.

I mean with usbfs and user space driver, you can't expect very good
performance and latency.

I didn't review your patch in detail, but looks your patch doesn't handle
cache problem, for example, user space may write data to mmap area,
but the data may stay in cache and don't reach memory, so it might be
be transferred to device mistakenly.

Thanks,
-- 
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux