Page MenuHomeFreeBSD

add mrsas_shutdown method
ClosedPublic

Authored by avg on Apr 4 2019, 6:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 20, 4:31 PM
Unknown Object (File)
Feb 20 2024, 12:46 AM
Unknown Object (File)
Jan 31 2024, 2:20 AM
Unknown Object (File)
Dec 26 2023, 4:36 AM
Unknown Object (File)
Dec 23 2023, 12:36 AM
Unknown Object (File)
Dec 11 2023, 11:39 AM
Unknown Object (File)
Sep 22 2023, 5:03 PM
Unknown Object (File)
Sep 15 2023, 11:06 AM
Subscribers

Details

Summary

It should be safer to flush controller and disk caches on the shutdown.
And to gracefully shut down the controller as well.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23507
Build 22513: arc lint + arc unit

Event Timeline

sys/dev/mrsas/mrsas.c
1197

is there an upper bound here? And why only for panicstr != NULL? I get it's only while we're panicing, but why do we have to do this when we panic and not otherwise.

sys/dev/mrsas/mrsas.c
1197

I copied this code verbatim from mrsas_detach, so there is no upper limit in both places.

And it's actually the other way around, we do this only when we are not panic-ing. This code wakes another thread and waits for it to clear a flag. But the other thread, of course, cannot run if we are in panic.

remove a wrong panicstr check that was left by accident

This looks good to me, however I'd wait a few days to see if Scott can spot something that I can't.

sys/dev/mrsas/mrsas.c
1197

I'm glad to see you got rid of the panicstr here, that's what I was really commenting about.

This revision is now accepted and ready to land.Apr 9 2019, 5:20 PM
In D19817#426388, @imp wrote:

This looks good to me, however I'd wait a few days to see if Scott can spot something that I can't.

I also sent a link to this review to Kashyap Desai.
Waiting for his / Broadcom's reply as well.

sys/dev/mrsas/mrsas.c
1197

I was so sure that I removed it that I just didn't see it.

sys/dev/mrsas/mrsas.c
1199

This can be done with pps_ratecheck() instead.

1209

This isn't incorrect, but I'm not comfortable with mesas_shutdown_ctlr() having an unbounded timeout.

This revision was automatically updated to reflect the committed changes.