← Back to context

Comment by FooBarWidget

4 years ago

Even on laptops I feel uncomfortable. My macOS freezes or kernel panics on me from time to time.

I believe the NVMe driver has a kernel panic hook; I would hope it is used to issue a flush.

OTOH, if you have watchdog timeouts (I've seen this from bad drivers), those would certainly not give the kernel a chance to do that.

  • What would you implement in Asahi? Would you follow Apple's approach and defer flushes, implementing a kernel panic hook and having some kind of F_FULLFSYNC or just keep Linux' current implementation?

    • We're probably going to have a knob to defer flushes (but still do them, unlike Apple, after a max timeout) that will be on by default on laptops, and make sure panics flush the cache if we can. Also apparently we need to do something for the power button too, as I just tested how macOS handles that. There is a warning before the system shuts down but we need to listen to it. Same with critical battery states.

      4 replies →