Re: [Patch] Increase USBFS Bulk Transfer size

From: Greg KH
Date: Wed Oct 12 2011 - 16:41:37 EST


On Wed, Oct 12, 2011 at 08:00:38PM +0200, Mihai Moldovan wrote:
> Hi Greg,
>
> * On 12.10.2011 04:17 PM, Greg KH wrote:
> > As stated before, this patch is not acceptable. Please work to figure
> > out the real reason for your device problems here, this is not the
> > correct solution at all.
>
> I've gone through this whole (and previous) thread, but couldn't find a
> real argument why this is so wrong.

Because it does nothing except increase kernel memory pressure. Why not
increase it to 1Gb while we are at it, it realistically makes no
difference.

And so, because it makes no difference, we should not change the
existing value as there seems to be something else wrong with what is
going on here in the userspace code that can't handle smaller buffer
sizes.

Within the kernel, and the host controller driver, the memory is split
up into much smaller pieces anyway, so there should not be any
difference at all, if you write your userspace code correctly, that the
USB device would see anything different with a bigger (or even smaller)
usbfs buffer size.

> So far everybody has argued that it's 'wrong' and may break older user
> code. The latter argument even is wrong, as drivers not requiring a
> higher bulk transfer size just aren't affected.
>
> This being said, I agree that allocating more memory than needed is
> wasting memory and bad, if it can be avoided. On the other hand, we're
> talking about very few devices here and not several ten of MB system
> memory being wasted by all bulk transfers in total.
> I basically see two cases:
> - systems with a few MB of RAM. I highly doubt those use usbfs anyway
> (usually other stuff like usb-storage)

Not true at all, I know of some using usbfs quite well, and have been
since the 2.2 kernel days.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/