#
✕ nick:axboe
#asahi-dev · 2022-02-17 00:35
axboekettenis: seriously? like 90s style?
#asahi-dev · 2022-02-16 20:55
axboeI'll come up with a few test cases
#asahi-dev · 2022-02-16 20:55
axboeI'd be curious if the flushes impact read latencies
#asahi-dev · 2022-02-16 20:52
axboechecked the samsung drive in my other laptop, and it's about 6x faster for flushes
#asahi-dev · 2022-02-16 20:50
axboeso they just do fewer, fs specific
#asahi-dev · 2022-02-16 20:49
axboeonly exception is zero writes
#asahi-dev · 2022-02-16 20:49
axboetakes the same amount of time
#asahi-dev · 2022-02-16 20:49
axboeyeah that's what I see here too, doesn't matter if it's 1 or 1000 writes
#asahi-dev · 2022-02-16 20:45
axboewith multi-queue, it would be difficult too...
#asahi-dev · 2022-02-16 20:45
axboewith the removal of barriers, there's zero notion of ordering in the linux IO stack
#asahi-dev · 2022-02-16 20:41
axboeand saying that without knowing what kind of passthrough support osx has
#asahi-dev · 2022-02-16 20:40
axboeyou might have the synthetically issue them on osx to test
#asahi-dev · 2022-02-16 20:40
axboefast ones are very rare on linux at least, we generally don't do that.
#asahi-dev · 2022-02-16 20:38
axboeeg slow and fast, nothing really in between
#asahi-dev · 2022-02-16 20:38
axboeI only see two ranges here: ~20 usec if no writes have happened since last flush, ~20 msec if even a FUA write has happened
#asahi-dev · 2022-02-16 20:38
axboelooks on par then
#asahi-dev · 2022-02-16 20:25
axboesad to say I avoid most papers on anything related to OS stuff
#asahi-dev · 2022-02-16 20:25
axboelooks like the time was about right
#asahi-dev · 2022-02-16 20:25
axboehttps://static.lwn.net/2002/0214/a/queue-barrier.php3
#asahi-dev · 2022-02-16 20:23
axboeit's just a way to do ordered writes, or it was
#asahi-dev · 2022-02-16 20:23
axboeyep
#asahi-dev · 2022-02-16 20:22
axboesadly we never really got useful hw support beyond "flush the cache", which is sad
#asahi-dev · 2022-02-16 20:22
axboebut that never came to fruition
#asahi-dev · 2022-02-16 20:22
axboeone idea back then was to propagate barriers into ordered commands on the hw, like tasks on SCSI
#asahi-dev · 2022-02-16 20:20
axboeso at some point later in time it was abandoned for the much simpler write-and-wait
#asahi-dev · 2022-02-16 20:20
axboewe thought it was pretty nifty, but it was too complicated and didn't really yield much of a benefit
#asahi-dev · 2022-02-16 20:20
axboebarriers were originally done by myself and chris mason, back in ~2001 as suse was looking for an EMC contract
#asahi-dev · 2022-02-16 20:19
axboethat'd be the plan. it's safe now, just not by default, you'd have to load it with the option to set flush_interval to 0
#asahi-dev · 2022-02-16 20:16
axboesven: at these completions rates, even serial would likely show it ;)
#asahi-dev · 2022-02-16 20:15
axboegot a meeting in a few, but I'll spend a bit of time to make it solid (multi-ns, ns ref, etc)
#asahi-dev · 2022-02-16 20:15
axboeok
#asahi-dev · 2022-02-16 20:14
axboeif this patch got cleaned up and changed to 0 by default, then it could be applicable. I'd run it ;)
#asahi-dev · 2022-02-16 20:14
axboesven: makes sense
#asahi-dev · 2022-02-16 20:14
axboetpw_rules: hard to say, depends on what is dirty in the page cache
#asahi-dev · 2022-02-16 20:13
axboesven: I thought osx just does way fewer flushes? surely the actual flush is just as slow there. but I guess the end result is the same
#asahi-dev · 2022-02-16 20:11
axboetpw_rules: haven't checked, but looking at difference in speed, seems very likely
#asahi-dev · 2022-02-16 20:11
axboes/somewhere/someone
#asahi-dev · 2022-02-16 20:11
axboesurely somewhere on this project must have some good apple internal contacts?
#asahi-dev · 2022-02-16 20:09
axboe;)
#asahi-dev · 2022-02-16 20:09
axboesven: perfect
#asahi-dev · 2022-02-16 20:09
axboetpw_rules: if you do fsync, then you can get 2 flushes per write sometimes (data + meta)
#asahi-dev · 2022-02-16 20:08
axboeif the patch were to go anywhere, it would just mean that the default should be 0 and hence retain standard behavior
#asahi-dev · 2022-02-16 20:08
axboeobviously the issue here is hw and that's where it ultimately should be fixed. I have worked with vendors before on stupid issues like that, but I have no clout at apple, so...
#asahi-dev · 2022-02-16 20:07
axboetotally fair, I did preface it with a hack alert
#asahi-dev · 2022-02-16 20:05
axboetpw_rules: probably pretty limited
#asahi-dev · 2022-02-16 20:04
axboewe don't do barriers in linux anymore
#asahi-dev · 2022-02-16 20:02
axboein a laptop, it should be fine
#asahi-dev · 2022-02-16 20:01
axboetpw_rules: make flushes faster on the nvme hw...
#asahi-dev · 2022-02-16 20:01
axboeit's more of an eventually consistent model ;)
#asahi-dev · 2022-02-16 20:00
axboetpw_rules: certainly

plus ›