We want to keep our root file system open to preserve bcache segment
between file accesses, thus reducing physical disk IO.
TODO: implement mount/unmount for cd9660/msdosfs/zfs.
Differential D30848
loader: implement mount/unmount rootfs tsoome on Jun 21 2021, 6:13 PM. Authored by Tags None Referenced Files
Details
We want to keep our root file system open to preserve bcache segment TODO: implement mount/unmount for cd9660/msdosfs/zfs.
Diff Detail
Event TimelineComment Actions FWIW, the original use case was floppies and that you had to have the bcache_free so that when you swapped floppies (for use with splitfs or kernel and mfsroot on separate floppies), the loader would always read data from the new floppy. However, that use case is no longer relevant. Comment Actions Tested with HEAD in EC2 on arm64: Booting in BIOS mode, this cuts the loader time from 5.38s to 3.66s. Booting in EFI mode, this cuts the loader time from 0.962s to 0.634s. The difference in time looks like it's almost all from I/Os being performed by open, which is consistent with the caching of disk and filesystem metadata. Comment Actions do not set pd_blkio to NULL. We should either just leave it initialized or use CloseProtocol() call and Comment Actions Yes. we do have disk list allocated, so we can just keep the protocol handles. The alternate would be to call CloseProtocol() and then set it NULL.
Comment Actions This is complete rework. Instead of hacking into not releasing At this iteration, only ufs implementation is provided. Comment Actions So I generally like this patch, despite what I fear is the negative impression that my detailed feedback might leave. Much of that detailed feedback is due, in part, to the pre-existing condition that malloc and friends do not set errno when returning NULL, which looks easy to remedy.
Comment Actions much better, and thanks for the malloc errno ptr.
Comment Actions more comments. And bugfix: setting up variable with env_setenv first time does Comment Actions add zfs_mount and zfs_unmount. While we do know, zfs pools are not closing open disk devices, Comment Actions I have the needed bits done, just working with some testing. I do hope to be done soon enough. Comment Actions Looks good to me. Anything that we might have missed that didn't get caught in testing we can fix later if need be. |