freebsd-dev/sys/boot/common
Andrey V. Elsukov f9cd8b07a4 Almost each time when loader opens a file, this leads to calling
disk_open(). Very often this is called several times for one file.
This leads to reading partition table metadata for each call. To
reduce the number of disk I/O we have a simple block cache, but it
is very dumb and more than half of I/O operations related to reading
metadata, misses this cache.

Introduce new cache layer to resolve this problem. It is independent
and doesn't need initialization like bcache, and will work by default
for all loaders which use the new DISK API. A successful disk_open()
call to each new disk or partition produces new entry in the cache.
Even more, when disk was already open, now opening of any nested
partitions does not require reading top level partition table.
So, if without this cache, partition table metadata was read around
20-50 times during boot, now it reads only once. This affects the booting
from GPT and MBR from the UFS.
2012-09-29 16:47:56 +00:00
..
bcache.c
boot.c zfs boot: try to set vfs.root.mountfrom from currdev as a fallback 2012-05-12 09:07:41 +00:00
bootstrap.h zfsboot/zfsloader: support accessing filesystems within a pool 2012-05-12 09:03:30 +00:00
commands.c Close a file descriptor leak in an error case. 2009-10-28 10:06:27 +00:00
console.c
crc32.c Remove second consts in r233288 in order to appease C++ compilers. 2012-03-26 18:22:04 +00:00
crc32.h - Split code shared by almost any boot loader into separate files and 2010-09-24 19:49:12 +00:00
dev_net.c - Add code allowing a network device to only be open and closed once 2010-01-09 21:23:39 +00:00
dev_net.h
devopen.c
disk.c Almost each time when loader opens a file, this leads to calling 2012-09-29 16:47:56 +00:00
disk.h Almost each time when loader opens a file, this leads to calling 2012-09-29 16:47:56 +00:00
gpt.c Read backup GPT header from the last LBA only when primary GPT header and 2012-04-12 12:37:53 +00:00
gpt.h - Split code shared by almost any boot loader into separate files and 2010-09-24 19:49:12 +00:00
help.common
interp_backslash.c
interp_forth.c
interp_parse.c Replace index() and rindex() calls with strchr() and strrchr(). 2012-01-03 18:51:58 +00:00
interp.c a whitespace nit 2011-05-07 13:57:30 +00:00
isapnp.c
isapnp.h
load_elf32_obj.c
load_elf32.c
load_elf64_obj.c
load_elf64.c
load_elf_obj.c Don't return an error if a kld does not contain any modules (e.g. a 2012-06-20 21:06:51 +00:00
load_elf.c Fix loading of kernel modules at boot time for powerpc64. 2012-09-08 20:00:31 +00:00
loader.8 As discussed on -current, remove the hardcoded default maxswzone. 2012-08-14 17:01:21 +00:00
ls.c
Makefile.inc Introduce new API to work with disks from the loader's drivers. 2012-08-05 12:15:15 +00:00
md.c Add support for memory disk (md). The size of the memory disk 2009-12-13 01:20:32 +00:00
merge_help.awk
misc.c
module.c boot: file_loadraw should strdup name argument 2012-09-11 06:18:36 +00:00
newvers.sh
panic.c
part.c The MBR data is not necessarily aligned. This is a problem on ARM. 2012-09-14 05:24:06 +00:00
part.h Create the interface to work with various partition tables from the 2012-08-05 11:29:44 +00:00
pnp.c
reloc_elf32.c
reloc_elf64.c
reloc_elf.c Implement elfN(reloc) for powerpc. With this change the kernel is now able to 2012-09-21 18:21:31 +00:00
ufsread.c Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent 2012-05-25 09:36:39 +00:00
util.c Fix buffer overflow in sys/boot/common/util.c's printf(), when printing 2011-08-08 20:53:04 +00:00
util.h Rename bcpy() macro to bcopy(). 2011-02-27 12:25:47 +00:00