eenurkka opened a new pull request, #6601:
URL: https://github.com/apache/incubator-nuttx/pull/6601

   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 <[email protected]>
   
   ## Summary
   
   This speeds up the mass storage emmcsd write operations significantly.
   
   ## Impact
   
   Due to the high risk, the behavior is behind #ifdefs.  Enabling this feature
   is likely to reveal USB driver issues, like it did with risc-v/mpfs as well.
   
   ## Testing
   
   Sending  1.9 Gb image on Polarfire MPFS kit with varying bs options:
   
   dd if=core-image-minimal-dev-icicle-kit-es-amp-20211208101259.rootfs.wic 
of=/dev/sdb bs=2k status=progress
   
   dd if=core-image-minimal-dev-icicle-kit-es-amp-20211208101259.rootfs.wic 
of=/dev/sdb bs=8k status=progress
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to