apple-nvme: defer cache flushes by a specified amount
Cache flushes on the M1 nvme are really slow, taking 17-18 msec to
complete. This can slow down workloads considerably, pure random writes
end up being bound by the flush latency and hence run at 55-60 IOPS.
Add a deferred flush work around to provide better performance, at a
minimal risk. By default, flushes are delayed at most 1 second, but this
is configurable.
With this work-around, a pure random write workload runs at ~12K IOPS
rather than 56 IOPS.
Signed-off-by: Jens Axboe <axboe@kernel.dk>