Skip to content

exfatprogs: optimise mkfs zeroing out and fix stdio output

David Timber exfat 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v0 Latest8 patches 1 replyIn review

Patches in v0 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8exfat2img, treewide: do not clobber stdoutexfat2img/exfat2img.c lib/libexfat.c+2 -20 replies
2/8mkfs, fsck: refactor getopt_long() return valuesfsck/fsck.c mkfs/mkfs.c+19 -150 replies
3/8treewide: fix factual errors and reduce column length of usage messagedump/dump.c label/label.c mkfs/mkfs.c +1 more+36 -370 replies
4/8libexfat: refactor exfat_bad_char()include/libexfat.h lib/libexfat.c+20 -180 replies
5/8libexfat: add exfat_secerase_blocks() and exfat_zeroout_blocks()include/libexfat.h lib/libexfat.c+87 -160 replies
6/8libexfat: add exfat_trace()include/libexfat.h+4 -00 replies
7/8mkfs: use BLKZEROOUT for disk zeroing outmkfs/mkfs.c mkfs/mkfs.h+115 -510 replies
8/8mkfs: issue POSIX_FADV_NOREUSE before zeroing outmkfs/mkfs.c+33 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v0 yet.

Read the v0 thread

Cover letter [PATCH v0 0/8] exfatprogs: optimise mkfs zeroing out and fix stdio output

Following is the performance impact profiling. I don't have a spare NVME SSD to test with so I used AWS EC2 :(

Your contributions welcome.

I'm sure pgsteal_* in /proc/vmstat can be used as yet another metric on a busy host, but I didn't bother to go that far to collect that data.

UAS:

- Host: Raspberry Pi 4 Model B Rev 1.5
- Device: Samsung BAR+ 64GB (via USB 3.0)
- Target partition size: 1998585856 bytes

Pre-patch:

System time (seconds): 4.54
Percent of CPU this job got: 7%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:05.14 Maximum resident set size (kbytes): 3200 Voluntary context switches: 10297 Involuntary context switches: 978
File system inputs: 2168
File system outputs: 3903664

Post-patch:

System time (seconds): 0.29
Percent of CPU this job got: 0%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:56.49 Maximum resident set size (kbytes): 3200 Voluntary context switches: 5792 Involuntary context switches: 1322
File system inputs: 2224
File system outputs: 176

NVME:

- Host: AWS EC2 c7gd.medium
- Device: "locally attached" SSD volume
- Size: 59000000000 bytes

Pre-patch:

System time (seconds): 22.64
Percent of CPU this job got: 0%
Elapsed (wall clock) time (h:mm:ss or m:ss): 45:47.70 Maximum resident set size (kbytes): 2792 Voluntary context switches: 227200 Involuntary context switches: 7352
File system inputs: 1360
File system outputs: 115235032

Post-patch:

System time (seconds): 1.14
Percent of CPU this job got: 0%
Elapsed (wall clock) time (h:mm:ss or m:ss): 26:08.06 Maximum resident set size (kbytes): 2788 Voluntary context switches: 56409 Involuntary context switches: 60
File system inputs: 1727
File system outputs: 656

David Timber (8):
exfat2img, treewide: do not clobber stdout
mkfs, fsck: refactor getopt_long() return values
treewide: fix factual errors and reduce column length of usage message
libexfat: refactor exfat_bad_char()
libexfat: add exfat_secerase_blocks() and exfat_zeroout_blocks()
libexfat: add exfat_trace()
mkfs: use BLKZEROOUT for disk zeroing out
mkfs: issue POSIX_FADV_NOREUSE before zeroing out

 dump/dump.c           |  14 +--
 exfat2img/exfat2img.c |   2 +-
 fsck/fsck.c           |  14 ++-
 include/libexfat.h    |  33 +++++-
 label/label.c         |   6 +-
 lib/libexfat.c        | 114 +++++++++++++------
 mkfs/mkfs.c           | 254 +++++++++++++++++++++++++++++-------------
 mkfs/mkfs.h           |   1 +
 tune/tune.c           |  18 +--
 9 files changed, 316 insertions(+), 140 deletions(-)
Signature · 1 line
2.55.0