Bug 226682 - ARMADA38X: Running out of CESA TDMA descriptors for disk I/O on GELI SSD
Summary: ARMADA38X: Running out of CESA TDMA descriptors for disk I/O on GELI SSD
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: CURRENT
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-03-17 20:06 UTC by Christina Mueller
Modified: 2018-03-26 12:36 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Mueller 2018-03-17 20:06:04 UTC
While testing I/O performance on a SolidRun Clearfog Pro (ARMADA A38x) with an SSD (PLEXTOR PX-128M6G-2242) encrypted by GELI AES-CBC, errors were reported on the console/dmesg about running out of TMDA descriptors.

Looking at sys/dev/cesa/cesa.h, the comments seem to focus on network buffers with a maximum size of 1500 bytes while SSD disk I/O in my case would involve 4KB buffers. Without really diving into the rest of the code, I've increased the values in cesa.h and can now operate the SSD with sustained rates ~200MB/s without running out of TDMA descriptors.

There might be better ways to do this but the "diff" below most certainly fixed my issue.

Index: sys/dev/cesa/cesa.h
===================================================================
--- sys/dev/cesa/cesa.h (revision 329554)
+++ sys/dev/cesa/cesa.h (working copy)
@@ -63,8 +63,8 @@
  */
 
 /* Values below are optimized for requests containing about 1.5 kB of data */
-#define CESA_SA_DESC_PER_REQ           2
-#define CESA_TDMA_DESC_PER_REQ         8
+#define CESA_SA_DESC_PER_REQ           (2 * 3)   /* 4KB, not 1.5kB */
+#define CESA_TDMA_DESC_PER_REQ         (8 * 3)   /* 4KB, not 1.5kB */
 
 #define CESA_SA_DESCRIPTORS            (CESA_SA_DESC_PER_REQ * CESA_REQUESTS)
 #define CESA_TDMA_DESCRIPTORS          (CESA_TDMA_DESC_PER_REQ * CESA_REQUESTS)
Comment 1 Brad Davis freebsd_committer freebsd_triage 2018-03-26 12:36:20 UTC
Add some people to CC: that can likely help with this issue.