Page MenuHomeFreeBSD

loader: Don't free bcache for devices of type DEVT_DISK
ClosedPublic

Authored by cperciva on Sep 30 2021, 8:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 23, 11:17 AM
Unknown Object (File)
Jan 30 2025, 11:39 PM
Unknown Object (File)
Jan 26 2025, 6:23 PM
Unknown Object (File)
Jan 25 2025, 7:20 PM
Unknown Object (File)
Jan 24 2025, 8:45 AM
Unknown Object (File)
Jan 24 2025, 8:27 AM
Unknown Object (File)
Jan 24 2025, 5:42 AM
Unknown Object (File)
Jan 18 2025, 2:10 PM
Subscribers

Details

Summary

In my testing, this speeds up the loader from 513 ms to 474 ms, reduces the number of I/Os performed from 609 to 432, and reduces the total number of blocks read from 61963 to 60797.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This solves the "calling mount doesn't actually hold the disk open if there's no filesystem to mount" problem.

Seems good to my eye.

This revision is now accepted and ready to land.Sep 30 2021, 8:58 PM

The obvious flaw is about possible unfreed memory, but that shouldn't be big problem anyhow.