Skip to content

Commit

Permalink
Replace revert with upstream patch regarding dm-crypt bug
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Oct 28, 2023
1 parent fb404f2 commit c689047
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 106 deletions.
105 changes: 0 additions & 105 deletions 0001-Revert-dm-crypt-allocate-compound-pages-if-possible.patch

This file was deleted.

40 changes: 40 additions & 0 deletions 0001-dm-crypt-dont-allocate-large-compound-pages.patch
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--


2 changes: 1 addition & 1 deletion kernel.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Patch26: 0001-sound-Disable-SG-buffer.patch
Patch27: 0001-amdgpu-timeout.patch
Patch28: 0001-iwlwifi-avoid-writing-to-MSI-X-page-when-MSI-X-is-no.patch
Patch29: 0001-xen-pciback-Consider-INTx-disabled-when-MSI-MSI-X-is.patch
Patch30: 0001-Revert-dm-crypt-allocate-compound-pages-if-possible.patch
Patch30: 0001-dm-crypt-dont-allocate-large-compound-pages.patch

# S0ix support:
Patch61: xen-events-Add-wakeup-support-to-xen-pirq.patch
Expand Down

0 comments on commit c689047

Please sign in to comment.