forked from QubesOS/qubes-linux-kernel
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace revert with upstream patch regarding dm-crypt bug
- Loading branch information
Showing
3 changed files
with
41 additions
and
106 deletions.
There are no files selected for viewing
105 changes: 0 additions & 105 deletions
105
0001-Revert-dm-crypt-allocate-compound-pages-if-possible.patch
This file was deleted.
Oops, something went wrong.
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,40 @@ | ||
From: Mikulas Patocka <[email protected]> | ||
Subject: [PATCH] dm-crypt: don't allocate large compound pages | ||
|
||
It was reported that the patch 5054e778fcd9cd29ddaa8109077cd235527e4f94 | ||
("dm crypt: allocate compound pages if possible") causes intermittent | ||
freezes [1]. | ||
|
||
So far, it is not clear what is the root cause. It was reported that with | ||
the allocation order 3 or lower it works [1], so we restrict the order to | ||
3 (that is PAGE_ALLOC_COSTLY_ORDER). | ||
|
||
[1] https://www.spinics.net/lists/dm-devel/msg56048.html | ||
|
||
Signed-off-by: Mikulas Patocka <[email protected]> | ||
Reported-by: Marek Marczykowski-Górecki <[email protected]> | ||
Tested-by: Marek Marczykowski-Górecki <[email protected]> | ||
Cc: [email protected] # v6.5+ | ||
Fixes: 5054e778fcd9 ("dm crypt: allocate compound pages if possible") | ||
|
||
--- | ||
drivers/md/dm-crypt.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
Index: linux-2.6/drivers/md/dm-crypt.c | ||
=================================================================== | ||
--- linux-2.6.orig/drivers/md/dm-crypt.c | ||
+++ linux-2.6/drivers/md/dm-crypt.c | ||
@@ -1679,7 +1679,7 @@ static struct bio *crypt_alloc_buffer(st | ||
unsigned int nr_iovecs = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
gfp_t gfp_mask = GFP_NOWAIT | __GFP_HIGHMEM; | ||
unsigned int remaining_size; | ||
- unsigned int order = MAX_ORDER - 1; | ||
+ unsigned int order = PAGE_ALLOC_COSTLY_ORDER; | ||
|
||
retry: | ||
if (unlikely(gfp_mask & __GFP_DIRECT_RECLAIM)) | ||
|
||
--185210117-1463778712-1698427974=:495964-- | ||
|
||
|
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