From 80a9e94df1865287dc67676528d3141a020288be Mon Sep 17 00:00:00 2001 From: Li Dongyang Date: Thu, 10 Oct 2024 20:54:25 +1100 Subject: [PATCH] LU-18225 kernel: silent page allocation failure in virtio_scsi virtio_scsi uses GFP_ATOMIC to allocate memory, with large requests sometimes the allocation fails. We don't need to throw up the allocation error and dump stack for this as virtio_scsi will return SCSI_MLQUEUE_HOST_BUSY which translates to BLK_STS_RESOURCE and that will be handled by upper layers. Change-Id: I7117711d05794d57ab294f3bc6746de1979afc22 Test-Parameters: trivial Signed-off-by: Li Dongyang Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56644 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Ronnie Sahlberg Reviewed-by: Oleg Drokin --- .../virtio_scsi-silence-page-allocation-failure.patch | 14 ++++++++++++++ lustre/kernel_patches/series/4.18-rhel8.10.series | 1 + lustre/kernel_patches/series/4.18-rhel8.4.series | 1 + lustre/kernel_patches/series/4.18-rhel8.5.series | 1 + lustre/kernel_patches/series/4.18-rhel8.6.series | 1 + lustre/kernel_patches/series/4.18-rhel8.7.series | 1 + lustre/kernel_patches/series/4.18-rhel8.8.series | 1 + lustre/kernel_patches/series/4.18-rhel8.9.series | 1 + lustre/kernel_patches/series/5.14-rhel9.1.series | 1 + lustre/kernel_patches/series/5.14-rhel9.2.series | 1 + lustre/kernel_patches/series/5.14-rhel9.3.series | 1 + lustre/kernel_patches/series/5.14-rhel9.4.series | 1 + 12 files changed, 25 insertions(+) create mode 100644 lustre/kernel_patches/patches/virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/patches/virtio_scsi-silence-page-allocation-failure.patch b/lustre/kernel_patches/patches/virtio_scsi-silence-page-allocation-failure.patch new file mode 100644 index 0000000..14a57c5 --- /dev/null +++ b/lustre/kernel_patches/patches/virtio_scsi-silence-page-allocation-failure.patch @@ -0,0 +1,14 @@ +Index: linux-4.18.0-553.16.1.el8_10/drivers/scsi/virtio_scsi.c +=================================================================== +--- linux-4.18.0-553.16.1.el8_10.orig/drivers/scsi/virtio_scsi.c ++++ linux-4.18.0-553.16.1.el8_10/drivers/scsi/virtio_scsi.c +@@ -455,7 +455,8 @@ static int __virtscsi_add_cmd(struct vir + sgs[out_num + in_num++] = in->sgl; + } + +- return virtqueue_add_sgs(vq, sgs, out_num, in_num, cmd, GFP_ATOMIC); ++ return virtqueue_add_sgs(vq, sgs, out_num, in_num, cmd, ++ GFP_ATOMIC | __GFP_NOWARN); + } + + static void virtscsi_kick_vq(struct virtio_scsi_vq *vq) diff --git a/lustre/kernel_patches/series/4.18-rhel8.10.series b/lustre/kernel_patches/series/4.18-rhel8.10.series index 04cc58e..8b9ea55 100644 --- a/lustre/kernel_patches/series/4.18-rhel8.10.series +++ b/lustre/kernel_patches/series/4.18-rhel8.10.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel8.3.patch block-pass-bio-into-integrity_processing_fn-rhel8.patch jbd2-revoke-rhashtable-rhel8.4.patch mm-wait_for_stable_page-should-check-for-bdev-rhel8.6.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/4.18-rhel8.4.series b/lustre/kernel_patches/series/4.18-rhel8.4.series index 07197769..6e39826 100644 --- a/lustre/kernel_patches/series/4.18-rhel8.4.series +++ b/lustre/kernel_patches/series/4.18-rhel8.4.series @@ -2,3 +2,4 @@ block-bio-integrity-Advance-seed-correctly-for-large.patch block-integrity-allow-optional-integrity-functions-rhel8.3.patch block-pass-bio-into-integrity_processing_fn-rhel8.patch jbd2-revoke-rhashtable-rhel8.4.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/4.18-rhel8.5.series b/lustre/kernel_patches/series/4.18-rhel8.5.series index 07197769..6e39826 100644 --- a/lustre/kernel_patches/series/4.18-rhel8.5.series +++ b/lustre/kernel_patches/series/4.18-rhel8.5.series @@ -2,3 +2,4 @@ block-bio-integrity-Advance-seed-correctly-for-large.patch block-integrity-allow-optional-integrity-functions-rhel8.3.patch block-pass-bio-into-integrity_processing_fn-rhel8.patch jbd2-revoke-rhashtable-rhel8.4.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/4.18-rhel8.6.series b/lustre/kernel_patches/series/4.18-rhel8.6.series index 8d9a7f7..5bbd1dd 100644 --- a/lustre/kernel_patches/series/4.18-rhel8.6.series +++ b/lustre/kernel_patches/series/4.18-rhel8.6.series @@ -3,3 +3,4 @@ block-integrity-allow-optional-integrity-functions-rhel8.3.patch block-pass-bio-into-integrity_processing_fn-rhel8.patch jbd2-revoke-rhashtable-rhel8.4.patch mm-wait_for_stable_page-should-check-for-bdev-rhel8.6.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/4.18-rhel8.7.series b/lustre/kernel_patches/series/4.18-rhel8.7.series index 04cc58e..8b9ea55 100644 --- a/lustre/kernel_patches/series/4.18-rhel8.7.series +++ b/lustre/kernel_patches/series/4.18-rhel8.7.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel8.3.patch block-pass-bio-into-integrity_processing_fn-rhel8.patch jbd2-revoke-rhashtable-rhel8.4.patch mm-wait_for_stable_page-should-check-for-bdev-rhel8.6.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/4.18-rhel8.8.series b/lustre/kernel_patches/series/4.18-rhel8.8.series index 04cc58e..8b9ea55 100644 --- a/lustre/kernel_patches/series/4.18-rhel8.8.series +++ b/lustre/kernel_patches/series/4.18-rhel8.8.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel8.3.patch block-pass-bio-into-integrity_processing_fn-rhel8.patch jbd2-revoke-rhashtable-rhel8.4.patch mm-wait_for_stable_page-should-check-for-bdev-rhel8.6.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/4.18-rhel8.9.series b/lustre/kernel_patches/series/4.18-rhel8.9.series index 04cc58e..8b9ea55 100644 --- a/lustre/kernel_patches/series/4.18-rhel8.9.series +++ b/lustre/kernel_patches/series/4.18-rhel8.9.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel8.3.patch block-pass-bio-into-integrity_processing_fn-rhel8.patch jbd2-revoke-rhashtable-rhel8.4.patch mm-wait_for_stable_page-should-check-for-bdev-rhel8.6.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/5.14-rhel9.1.series b/lustre/kernel_patches/series/5.14-rhel9.1.series index a3c8f85..325cea1 100644 --- a/lustre/kernel_patches/series/5.14-rhel9.1.series +++ b/lustre/kernel_patches/series/5.14-rhel9.1.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel9.1.patch block-pass-bio-into-integrity_processing_fn-rhel9.patch jbd2-revoke-rhashtable-rhel8.4.patch add-and-use-a-per-mapping-stable-writes-flag-rhel9.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/5.14-rhel9.2.series b/lustre/kernel_patches/series/5.14-rhel9.2.series index a3c8f85..325cea1 100644 --- a/lustre/kernel_patches/series/5.14-rhel9.2.series +++ b/lustre/kernel_patches/series/5.14-rhel9.2.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel9.1.patch block-pass-bio-into-integrity_processing_fn-rhel9.patch jbd2-revoke-rhashtable-rhel8.4.patch add-and-use-a-per-mapping-stable-writes-flag-rhel9.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/5.14-rhel9.3.series b/lustre/kernel_patches/series/5.14-rhel9.3.series index c737f7f..3909a2c 100644 --- a/lustre/kernel_patches/series/5.14-rhel9.3.series +++ b/lustre/kernel_patches/series/5.14-rhel9.3.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel9.3.patch block-pass-bio-into-integrity_processing_fn-rhel9.patch jbd2-revoke-rhashtable-rhel8.4.patch add-and-use-a-per-mapping-stable-writes-flag-rhel9.patch +virtio_scsi-silence-page-allocation-failure.patch diff --git a/lustre/kernel_patches/series/5.14-rhel9.4.series b/lustre/kernel_patches/series/5.14-rhel9.4.series index fbd086b..6169b4a 100644 --- a/lustre/kernel_patches/series/5.14-rhel9.4.series +++ b/lustre/kernel_patches/series/5.14-rhel9.4.series @@ -2,3 +2,4 @@ block-integrity-allow-optional-integrity-functions-rhel9.3.patch block-pass-bio-into-integrity_processing_fn-rhel9.patch jbd2-revoke-rhashtable-rhel8.4.patch add-and-use-a-per-mapping-stable-writes-flag-rhel9.4.patch +virtio_scsi-silence-page-allocation-failure.patch -- 1.8.3.1