git: kernel - Fix indefinite wait buffer bug with encrypted disks
Matthew Dillon
dillon at crater.dragonflybsd.org
Sat Jan 18 10:04:11 PST 2020
commit 8345afad56bed8074dc4836acd98dfb6a80bbeb7
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sat Jan 18 09:49:45 2020 -0800
kernel - Fix indefinite wait buffer bug with encrypted disks
* Preallocate all (nmax) mpipe buffers to avoid doing any large buffer
allocations inside critical low-memory I/O paths.
* Remove the per-sector objcache, which could cause numerous blocking
memory allocations in critical low-memory I/O paths. Instead,
pre-allocate all necessary data outside of the critical path.
For now these per-sector structures are cached in a simple linked
list with a single spin-lock (not ideal).
* Reorganize per-sector data into its own essiv_ivgen_data structure,
Plus other minor cleanups.
* TODO - We need to queue the bio in the target_crypt_config structure
instead of relying on mpipe_alloc_callback() which must still allocate
a small structure via M_INTWAIT.
Reported-by: goleo, profmakx, daftaupe, others
Summary of changes:
sys/dev/disk/dm/crypt/dm_target_crypt.c | 141 ++++++++++++++++++++++----------
1 file changed, 96 insertions(+), 45 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/8345afad56bed8074dc4836acd98dfb6a80bbeb7
--
DragonFly BSD source repository
More information about the Commits
mailing list