-
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.
Linux page migration code won't wait for writeback to complete unless it needs to call release_folio. Call SetPagePrivate wherever PageUptodate is set and define .release_folio, to cause fallback_migrate_folio to wait for us. Signed-off-by: tstabrawa <[email protected]>
- Loading branch information
Showing
6 changed files
with
140 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,33 @@ | ||
dnl # | ||
dnl # Linux 5.18 uses invalidate_folio in lieu of invalidate_page | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_INVALIDATE_FOLIO], [ | ||
ZFS_LINUX_TEST_SRC([vfs_has_invalidate_folio], [ | ||
#include <linux/fs.h> | ||
static void | ||
test_invalidate_folio(struct folio *folio, size_t offset, | ||
size_t len) { | ||
(void) folio; (void) offset; (void) len; | ||
return; | ||
} | ||
static const struct address_space_operations | ||
aops __attribute__ ((unused)) = { | ||
.invalidate_folio = test_invalidate_folio, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_VFS_INVALIDATE_FOLIO], [ | ||
dnl # | ||
dnl # Linux 5.18 uses invalidate_folio in lieu of invalidate_page | ||
dnl # | ||
AC_MSG_CHECKING([whether invalidate_folio exists]) | ||
ZFS_LINUX_TEST_RESULT([vfs_has_invalidate_folio], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_VFS_INVALIDATE_FOLIO, 1, [invalidate_folio exists]) | ||
],[ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
dnl # | ||
dnl # Linux 5.19 uses release_folio in lieu of releasepage | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_RELEASE_FOLIO], [ | ||
ZFS_LINUX_TEST_SRC([vfs_has_release_folio], [ | ||
#include <linux/fs.h> | ||
static bool | ||
test_release_folio(struct folio *folio, gfp_t gfp) { | ||
(void) folio; (void) gfp; | ||
return (0); | ||
} | ||
static const struct address_space_operations | ||
aops __attribute__ ((unused)) = { | ||
.release_folio = test_release_folio, | ||
}; | ||
],[]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_VFS_RELEASE_FOLIO], [ | ||
dnl # | ||
dnl # Linux 5.19 uses release_folio in lieu of releasepage | ||
dnl # | ||
AC_MSG_CHECKING([whether release_folio exists]) | ||
ZFS_LINUX_TEST_RESULT([vfs_has_release_folio], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_VFS_RELEASE_FOLIO, 1, [release_folio exists]) | ||
],[ | ||
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
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