nuttx/drivers/usbdev
Eero Nurkkala 5a45130d5c usbdev/usbmsc: introduce USBMSC_WRMULTIPLE for faster writes
This patch introduces a configuration option USBMSC_WRMULTIPLE,
which is used to store multiple blocks into a larger chunk that
then gets written via the mmcsd_writemultiple() (in case mmcsd
is used).

The bottleneck with the current implementation is the poor
performance due to short block writes.  USBMSC_DRVR_WRITE()
always writes only one sector (with eMMC that's usually 512 bytes).
eMMC devices usually erase much larger regions with near constant
time (see Jedec JESD84-B51, Extended CSD register byte [225],
SUPER_PAGE_SIZE): 'This register defines one or multiple of
programmable boundary unit that is programmed at the same time.'

If USBMSC_WRMULTIPLE is defined, then USBMSC_NWRREQS is used to
allocate the write buffer size.  We don't want this to be the
default behavior yet as this may reveal unseen bugs in usb drivers
due to the faster overall performance.

Sample configurations with measured performance:

  - Without USBMSC_WRMULTIPLE: 470 Kb/s
  - With USBMSC_WRMULTIPLE, CONFIG_USBMSC_NWRREQS=4: 1.1 Mb/s
    (dd with bs=2k)
  - With USBMSC_WRMULTIPLE, CONFIG_USBMSC_NWRREQS=16: 5.2 Mb/s
    (dd with bs=8k)

No doubt, this feature alone may make the mass storage work 10
times faster than before with eMMC cards.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2022-07-12 18:36:34 +08:00
..
adb.c drivers: remove unimplemented open/close/ioctl interfaces 2022-04-15 16:56:25 +08:00
cdcacm_desc.c Fix error: array subscript 2 is above array bounds of 'uint8_t[2]' 2022-03-10 19:46:01 +02:00
cdcacm.c cdcacm:support returning c_cflag & speed via termios 2022-01-31 01:15:29 +01:00
cdcacm.h drivers: nxstyle fixes 2021-03-04 18:32:27 -08:00
cdcecm.c devif: remove all devif_timer 2022-06-02 20:11:50 -03:00
cdcecm.h arm: stm32xx: Michael Jung: update licenses to Apache 2021-04-01 12:13:12 -05:00
composite_desc.c Fix error: array subscript 2 is above array bounds of 'uint8_t[2]' 2022-03-10 19:46:01 +02:00
composite.c Fix error: array subscript 2 is above array bounds of 'uint8_t[2]' 2022-03-10 19:46:01 +02:00
composite.h drivers: nxstyle fixes 2021-03-04 18:32:27 -08:00
dfu.c Fix error: array subscript 2 is above array bounds of 'uint8_t[2]' 2022-03-10 19:46:01 +02:00
Kconfig usbdev/usbmsc: introduce USBMSC_WRMULTIPLE for faster writes 2022-07-12 18:36:34 +08:00
Make.defs drivers: Author Gregory Nutt: update licenses to Apache 2021-03-04 18:32:27 -08:00
pl2303.c nuttx: unify FAR attribute usage across the code 2022-04-04 21:32:58 +08:00
rndis_std.h drivers: update licenses to Apache 2021-05-31 02:58:08 -05:00
rndis.c devif: remove all devif_timer 2022-06-02 20:11:50 -03:00
usbdev_strings.c drivers: nxstyle fixes 2021-03-04 18:32:27 -08:00
usbdev_trace.c drivers: Author Gregory Nutt: update licenses to Apache 2021-03-04 18:32:27 -08:00
usbdev_trprintf.c drivers: nxstyle fixes 2021-03-04 18:32:27 -08:00
usbmsc_desc.c Fix error: array subscript 2 is above array bounds of 'uint8_t[2]' 2022-03-10 19:46:01 +02:00
usbmsc_scsi.c usbdev/usbmsc: introduce USBMSC_WRMULTIPLE for faster writes 2022-07-12 18:36:34 +08:00
usbmsc.c usbdev/usbmsc: introduce USBMSC_WRMULTIPLE for faster writes 2022-07-12 18:36:34 +08:00
usbmsc.h usbdev: Add board unique serial string support 2022-01-19 09:25:48 +01:00