Compare commits

...

3 Commits

Author SHA1 Message Date
8dc3ae88b3 Reapply "muffin: test, move to 6.18"
All checks were successful
Build and Deploy / mreow (push) Successful in 1m36s
Build and Deploy / yarn (push) Successful in 46s
Build and Deploy / muffin (push) Successful in 2m42s
This reverts commit 86cf624027.
2026-04-24 23:48:26 -04:00
a177877ce3 zfs: add test fix for deadlock 2026-04-24 23:48:22 -04:00
86cf624027 Revert "muffin: test, move to 6.18"
All checks were successful
Build and Deploy / mreow (push) Successful in 50s
Build and Deploy / yarn (push) Successful in 44s
Build and Deploy / muffin (push) Successful in 1m2s
This reverts commit 1df3a303f5.
2026-04-24 14:21:40 -04:00
2 changed files with 42 additions and 1 deletions

View File

@@ -20,7 +20,14 @@ let
arcMaxBytes = (totalRamBytes - totalHugepageBytes) * 60 / 100; arcMaxBytes = (totalRamBytes - totalHugepageBytes) * 60 / 100;
in in
{ {
boot.zfs.package = pkgs.zfs_2_4; # remove inline dbuf_evict_one call so the dedicated eviction thread
# handles cache pressure instead of stalling txg_sync on 6.14+.
# https://github.com/openzfs/zfs/issues/18426
boot.zfs.package = pkgs.zfs_2_4.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
../patches/zfs/0001-remove-dbuf_evict_one-call.patch
];
});
boot.initrd.kernelModules = [ "zfs" ]; boot.initrd.kernelModules = [ "zfs" ];
boot.kernelParams = [ boot.kernelParams = [

View File

@@ -0,0 +1,34 @@
--- a/module/zfs/dbuf.c 2026-04-24 14:20:12.565390796 -0400
+++ b/module/zfs/dbuf.c 2026-04-24 14:20:40.711198653 -0400
@@ -864,23 +864,16 @@
dbuf_evict_notify(uint64_t size)
{
/*
- * We check if we should evict without holding the dbuf_evict_lock,
- * because it's OK to occasionally make the wrong decision here,
- * and grabbing the lock results in massive lock contention.
+ * Wake the dedicated eviction thread when the cache
+ * exceeds target. Inline eviction from write-completion
+ * context is intentionally avoided: it adds a second
+ * multilist sublist lock to every write, and when
+ * kmem_cache_free is slow (__free_frozen_pages zone lock
+ * contention on 6.14+), the cascade stalls txg_sync.
+ * See openzfs#18426.
*/
- if (size > dbuf_cache_target_bytes()) {
- /*
- * Avoid calling dbuf_evict_one() from memory reclaim context
- * (e.g. Linux kswapd, FreeBSD pagedaemon) to prevent deadlocks.
- * Memory reclaim threads can get stuck waiting for the dbuf
- * hash lock.
- */
- if (size > dbuf_cache_hiwater_bytes() &&
- !current_is_reclaim_thread()) {
- dbuf_evict_one();
- }
+ if (size > dbuf_cache_target_bytes())
cv_signal(&dbuf_evict_cv);
- }
}
/*