freebsd-dev/sys
Toomas Soome 7a60826b65 loader: bcache read ahead block count should take account the large sectors
The loader bcache is implementing simple read-ahead to boost the cache.
The bcache is built based on 512B block sizes, and the read ahead is attempting
to read number of cache blocks, based on amount of the free bcache space.

However, there are devices using larger sector sizes than 512B, most obviously
the CD media is based on 2k sectors. This means the read-ahead can not be just
random number of blocks, but we should use value suitable also for use with
larger sectors, as for example, with CD devices, we should read multiple of 2KB.
Since the sector size from disk interface is not too reliable, i guess we can
just use "good enough" value, so the implementation is rounding down the read
ahead block count to be multiple of 16.

This means we have covered sector sizes to 8k.

In addition, the update does implement the end of cache marker, to help to
detect the possible memory corruption - I have not seen it happening so far,
but it does not hurt to have the detection mechanism in place.

Reviewed by:	allanjude
Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D9179
2017-02-06 08:58:40 +00:00
..
amd64 Regen after r313284. 2017-02-05 14:19:19 +00:00
arm Define the vm_ooffset_t and vm_pindex_t types as machine-independend. 2017-02-04 12:26:38 +00:00
arm64 Define the vm_ooffset_t and vm_pindex_t types as machine-independend. 2017-02-04 12:26:38 +00:00
boot loader: bcache read ahead block count should take account the large sectors 2017-02-06 08:58:40 +00:00
bsm
cam Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
cddl Ensure that the DOF string length is divisible by 2. 2017-02-05 02:47:34 +00:00
compat Update syscall.master to 4.10-rc6. Also fix comments, a typo, 2017-02-05 14:17:09 +00:00
conf Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
contrib [ath_hal] [ar9300] link in the CAC enable/diable methods and expose it via the HAL. 2017-02-03 05:15:35 +00:00
crypto Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
ddb Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
dev [iwm] Use notification wait API to wait for calibration to complete. 2017-02-06 05:35:11 +00:00
fs Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
gdb
geom Check that primary GPT header is valid before wiping partitioning. 2017-02-04 05:09:47 +00:00
gnu Add Ingenic X1000 DTS files (unofficial). 2016-11-19 15:03:49 +00:00
i386 Regen after r313284. 2017-02-05 14:19:19 +00:00
isa Remove pc98 support completely. 2017-01-28 02:22:15 +00:00
kern rwlock: move lockstat handling out of inline primitives 2017-02-05 13:37:23 +00:00
kgssapi
libkern calculate_crc32c: Add SSE4.2 implementation on x86 2017-01-31 03:26:32 +00:00
mips Define the vm_ooffset_t and vm_pindex_t types as machine-independend. 2017-02-04 12:26:38 +00:00
modules Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
net Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
net80211 [net80211] don't update quiet time counter values every probe request. 2017-02-03 06:04:06 +00:00
netgraph mppc - Finish pluging NETGRAPH_MPPC_COMPRESSION. 2017-01-20 00:02:11 +00:00
netinet Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
netinet6 Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
netipsec Merge projects/ipsec into head/. 2017-02-06 08:49:57 +00:00
netnatm
netpfil Fix indentantion in pf_purge_thread(). No functional change. 2017-01-30 22:47:48 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing 2016-10-20 09:22:10 +00:00
powerpc Define the vm_ooffset_t and vm_pindex_t types as machine-independend. 2017-02-04 12:26:38 +00:00
riscv Implement atomic_fcmpset_*() for RISC-V. 2017-02-05 00:32:12 +00:00
rpc
security Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, 2016-11-22 00:41:24 +00:00
sparc64 Define the vm_ooffset_t and vm_pindex_t types as machine-independend. 2017-02-04 12:26:38 +00:00
sys rwlock: move lockstat handling out of inline primitives 2017-02-05 13:37:23 +00:00
teken
tests
tools Replace using of objdump with elfdump 2017-01-10 18:46:40 +00:00
ufs ffs_vnops: Simplify extattr access 2017-01-19 16:46:05 +00:00
vm Style, use tab after #define. 2017-02-04 19:16:19 +00:00
x86 Define the vm_ooffset_t and vm_pindex_t types as machine-independend. 2017-02-04 12:26:38 +00:00
xdr
xen "Buses" is the preferred plural of "bus" 2017-01-15 17:54:01 +00:00
Makefile Remove pc98 support completely. 2017-01-28 02:22:15 +00:00