diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-11-17 16:41:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 11:09:07 -0800 |
commit | add1aaeabe6b08ed26381a2a06e505b2f09c3ba5 (patch) | |
tree | 42519bb5709cc0943eab7dfa8ca1481ebcdf3815 /arch | |
parent | 52fb743d3aa7ee27a4f3182816aa02dc3e513d9d (diff) |
USB: change the memory limits in usbfs URB submission
For a long time people have complained about the limitations imposed
by usbfs. URBs coming from userspace are not allowed to have transfer
buffers larger than a more-or-less arbitrary maximum.
While it is generally a good idea to avoid large transfer buffers
(because the data has to be bounced to/from a contiguous kernel-space
buffer), it's not the kernel's job to enforce such limits. Programs
should be allowed to submit URBs as large as they like; if there isn't
sufficient contiguous memory available then the submission will fail
with a simple ENOMEM error.
On the other hand, we would like to prevent programs from submitting a
lot of small URBs and using up all the DMA-able kernel memory. To
that end, this patch (as1497) replaces the old limits on individual
transfer buffers with a single global limit on the total amount of
memory in use by usbfs. The global limit is set to 16 MB as a nice
compromise value: not too big, but large enough to hold about 300 ms
of data for high-speed transfers.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions