freebsd-dev/lib/libstand
Toomas Soome 3949295f36 libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory
Current implementation of dosfs in libstand reads full File Allocation Table to
the RAM in the initialization code. In the extreme case of FAT32 filesystem,
this structure will take up to 256-1024 Mb of loader memory, depending on the
cluster size.

Proposed patch reduces libstands/dosfs memory requirements to 128 Kb for all
variants of dosfs filesystem. For FAT12 and FAT16 filesystems, File Allocation
Table is cached in full, as before. For FAT32, File Allocation Table is broken
into the equal blocks of 128 Kilobytes (32768 entries), and only current block
is cached.

Because per-filesystem context is now small, global FAT cache (for all
instances of dosfs filesystem) is replaced by local per-instance cache.

Submitted by:	Mikhail.Kupchik_gmail.com
Reviewed by:	tsoome, allanjude
Differential Revision:	https://reviews.freebsd.org/D9547
2017-04-06 20:12:39 +00:00
..
amd64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
i386 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
mips Merge @228176 from Perforce to fix a bug introduced in r249553: 2013-04-28 14:40:29 +00:00
powerpc Fix loader on PowerPC following r279784. It turns out that, due to .PATH 2015-03-09 02:19:44 +00:00
sparc64 Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
__main.c
arp.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
assert.c
bcd.c
bootp.c loader: verify the value from dhcp.interface-mtu and use snprintf to set mtu 2017-03-20 22:20:17 +00:00
bootp.h Try to extract the RFC1048 data from PXE. If we get enough info we can skip 2017-03-09 06:01:24 +00:00
bootparam.c
bootparam.h
bzipfs.c
cd9660.c dosfs support in libstand is broken since r298230 2016-12-30 19:06:29 +00:00
close.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
closeall.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dev.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
dosfs.c libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory 2017-04-06 20:12:39 +00:00
dosfs.h libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory 2017-04-06 20:12:39 +00:00
environment.c Fix an inappropriate free of a non-dynamic value. While here, make the 2013-12-18 17:03:43 +00:00
ether.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ext2fs.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
fstat.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
getopt.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
gets.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
globals.c Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
gzipfs.c
in_cksum.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
inet_ntoa.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ioctl.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
iodesc.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
libstand.3 Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n' 2015-01-23 07:30:57 +00:00
lseek.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
Makefile Add explicit_bzero() to libstand, and switch GELIBoot to using it 2017-03-31 00:04:32 +00:00
Makefile.depend DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
nandfs.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
net.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
net.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
netif.c
netif.h
nfs.c Remove OLD_NFSV2 from loader and libstand 2017-03-30 19:32:25 +00:00
nfsv2.h Remove OLD_NFSV2 from loader and libstand 2017-03-30 19:32:25 +00:00
nullfs.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
open.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
pager.c
pkgfs.c Add pkgfs, a file system implementation for reading files out of a 2014-07-31 23:25:13 +00:00
printf.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
qdivrem.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
quad.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
random.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rarp.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
read.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
readdir.c
rpc.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rpc.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rpcv2.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
saioctl.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
sbrk.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
splitfs.c
stand.h loader: want mechanism to avoid RA with bcache 2017-04-06 15:57:53 +00:00
stat.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strcasecmp.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strdup.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strerror.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strtol.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
strtoul.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
tftp.c Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
tftp.h
twiddle.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
udp.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
ufs.c prefix UFS symbols with UFS_ to reduce namespace pollution 2017-02-15 19:50:26 +00:00
uuid_from_string.c Fix a bug in the parsing code: always use the len and not 8. 2016-05-20 05:33:26 +00:00
uuid_to_string.c Make tohex() work as expected. 2016-01-09 08:04:29 +00:00
write.c Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
zalloc_defs.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_malloc.c
zalloc_mem.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_protos.h
zalloc.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00