-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Linux read-ahead for a single page on ZVOLs
Linux has read-ahead logic designed to accelerate sequential workloads. ZFS has its own read-ahead logic called zprefetch that operates on both ZVOLs and datasets. Having two prefetchers active at the same time can cause overprefetching, which unnecessarily reduces IOPS performance on CoW filesystems like ZFS. Testing shows that entirely disabling the Linux prefetch results in a significant performance penalty for reads while commensurate benefits are seen in random writes. It appears that read-ahead benefits are inversely proportional to random write benefits, and so a single page of Linux-layer read-ahead appears to offer the middle ground for both workloads. Reviewed-by: Chunwei Chen <david.chen@osnexus.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <ryao@gentoo.org> Issue #5902
- Loading branch information
1 parent
5731140
commit bc17f10
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
dnl # | ||
dnl # 2.6.32 - 4.11, statically allocated bdi in request_queue | ||
dnl # 4.12 - x.y, dynamically allocated bdi in request_queue | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_BDI], [ | ||
AC_MSG_CHECKING([whether blk_queue bdi is dynamic]) | ||
ZFS_LINUX_TRY_COMPILE([ | ||
#include <linux/blkdev.h> | ||
],[ | ||
struct request_queue q; | ||
struct backing_dev_info bdi; | ||
q.backing_dev_info = &bdi; | ||
],[ | ||
AC_MSG_RESULT(yes) | ||
AC_DEFINE(HAVE_BLK_QUEUE_BDI_DYNAMIC, 1, | ||
[blk queue backing_dev_info is dynamic]) | ||
],[ | ||
AC_MSG_RESULT(no) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters