Re: Infrastructure for zerocopy I/O

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

 



By the way on MacOSX we also pre-allocate some buffer in userspace
first for everything.

Well it's up to you anyway I haven't seen a move into a good direction
in that area for years anyway on Linux so I'm used to deal with what
is currently available.

On Tue, Nov 17, 2015 at 8:13 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 17 Nov 2015, Steinar H. Gunderson wrote:
>
>> On Tue, Nov 17, 2015 at 07:17:31PM +0100, Markus Rechberger wrote:
>> > 1. the memset on isochronous transfers to empty the buffers in order
>> > to avoid leaking raw memory to userspace (this costs a lot on intel
>> > Atoms and is also noticeable on other systems).
>> >
>> > 2. the memory fragmentation. Seems like recent systems have a better
>> > performance here since we did not get that report for several months
>> > now, or maybe the user behavior changed.
>> > Some older Linux systems (maybe 2-3 years old) triggered this issue
>> > way more often.
>>
>> I guess if we get transparent zerocopy, both of these are going away
>> just like with your patch, right? The only difference is really who sets up
>> the memory area (the kernel or not).
>>
>> Alan, could we perhaps let the zerocopy flag make the request fail (instead
>> of going through a bounce buffer) if direct DMA is not possible? That way,
>> it would be quite obvious that you need to allocate the memory some other way
>> instead of silently hitting the issues Markus mention.
>
> But what other way of allocating memory is there?
>
> With scatter-gather lists, fragmentation isn't an issue.  But bounce
> buffers are unavoidable if the memory isn't accessible to the USB
> hardware.
>
> Alan Stern
>
--
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