Re: g_mass_storage performance on partition vs. file

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

 



On Fri, 3 Aug 2018, Martin Hicks wrote:

> 
> Hi,
> 
> I've run into a huge performance gap between running a g_mass_storage
> gadget with the backing file pointing to a raw partition (/dev/mmcblk1)
> vs. creating a file on an ext4 filesystem and exporting that.
> 
> With the partition I see write rates around 5MB/s, and with /proc/sys/vm/block_dump
> enabled I can see that all writes are 512-byte single-sector writes.
> 
> Using a file within ext4fs, I get around 20MB and block_dump shows large IOs
> (mostly 2048 sector).
> 
> Is there any way to get raw-partition to better use caching and not write back
> every sector individually?

g_mass_storage does no buffering internally; the benefit you get with
ext4 comes from buffering within the filesystem.

I have no idea how much or what kind of buffering the block-layer 
drivers do for raw partition accesses.  You're better off asking the 
people responsible for the block layer about that.

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