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)
Nov 19 2024, 9:36 PM
Unknown Object (File)
Oct 22 2024, 9:43 AM
Unknown Object (File)
Oct 9 2024, 8:11 AM
Unknown Object (File)
Oct 3 2024, 7:10 PM
Unknown Object (File)
Oct 1 2024, 8:30 PM
Unknown Object (File)
Sep 28 2024, 4:04 AM
Unknown Object (File)
Sep 5 2024, 3:36 AM
Unknown Object (File)
Sep 4 2024, 2:11 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.