All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Mikulas Patocka <mpatocka@redhat.com>,
	Christoph Hellwig <hch@lst.de>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH AUTOSEL 4.14 19/29] dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC
Date: Mon, 30 May 2022 09:50:46 -0400	[thread overview]
Message-ID: <20220530135057.1937286-19-sashal@kernel.org> (raw)
In-Reply-To: <20220530135057.1937286-1-sashal@kernel.org>

From: Mikulas Patocka <mpatocka@redhat.com>

[ Upstream commit 84bc4f1dbbbb5f8aa68706a96711dccb28b518e5 ]

We observed the error "cacheline tracking ENOMEM, dma-debug disabled"
during a light system load (copying some files). The reason for this error
is that the dma_active_cacheline radix tree uses GFP_NOWAIT allocation -
so it can't access the emergency memory reserves and it fails as soon as
anybody reaches the watermark.

This patch changes GFP_NOWAIT to GFP_ATOMIC, so that it can access the
emergency memory reserves.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 lib/dma-debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 61e7240947f5..163e0e9b357f 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -465,7 +465,7 @@ EXPORT_SYMBOL(debug_dma_dump_mappings);
  * At any time debug_dma_assert_idle() can be called to trigger a
  * warning if any cachelines in the given page are in the active set.
  */
-static RADIX_TREE(dma_active_cacheline, GFP_NOWAIT);
+static RADIX_TREE(dma_active_cacheline, GFP_ATOMIC);
 static DEFINE_SPINLOCK(radix_lock);
 #define ACTIVE_CACHELINE_MAX_OVERLAP ((1 << RADIX_TREE_MAX_TAGS) - 1)
 #define CACHELINE_PER_PAGE_SHIFT (PAGE_SHIFT - L1_CACHE_SHIFT)
-- 
2.35.1


  parent reply	other threads:[~2022-05-30 14:49 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 13:50 [PATCH AUTOSEL 4.14 01/29] drm/virtio: fix NULL pointer dereference in virtio_gpu_conn_get_modes Sasha Levin
2022-05-30 13:50 ` Sasha Levin
2022-05-30 13:50 ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 02/29] mwifiex: add mutex lock for call in mwifiex_dfs_chan_sw_work_queue Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 03/29] b43legacy: Fix assigning negative value to unsigned variable Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 04/29] b43: " Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 05/29] ipw2x00: Fix potential NULL dereference in libipw_xmit() Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 06/29] ACPICA: Avoid cache flush inside virtual machines Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 07/29] ALSA: jack: Access input_dev under mutex Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 08/29] drm/amd/pm: fix double free in si_parse_power_table() Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 09/29] ath9k: fix QCA9561 PA bias level Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 10/29] media: venus: hfi: avoid null dereference in deinit Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 11/29] media: pci: cx23885: Fix the error handling in cx23885_initdev() Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 12/29] media: cx25821: Fix the warning when removing the module Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 13/29] scsi: megaraid: Fix error check return value of register_chrdev() Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 14/29] drm/amd/pm: fix the compile warning Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 15/29] ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 16/29] ASoC: dapm: Don't fold register value changes into notifications Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 17/29] net: remove two BUG() from skb_checksum_help() Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 18/29] s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES Sasha Levin
2022-05-30 13:50 ` Sasha Levin [this message]
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 20/29] ipmi:ssif: Check for NULL msg when handling events and messages Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 21/29] rtlwifi: Use pr_warn instead of WARN_ONCE Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 22/29] openrisc: start CPU timer early in boot Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 23/29] nvme-pci: fix a NULL pointer dereference in nvme_alloc_admin_tags Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 24/29] ASoC: rt5645: Fix errorenous cleanup order Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 25/29] net: phy: micrel: Allow probing without .driver_data Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 26/29] media: exynos4-is: Fix compile warning Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 27/29] ARM: 9201/1: spectre-bhb: rely on linker to emit cross-section literal loads Sasha Levin
2022-05-30 13:50   ` Sasha Levin
2022-05-30 13:52   ` Ard Biesheuvel
2022-05-30 13:52     ` Ard Biesheuvel
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 28/29] rxrpc: Return an error to sendmsg if call failed Sasha Levin
2022-05-30 13:50 ` [PATCH AUTOSEL 4.14 29/29] eth: tg3: silence the GCC 12 array-bounds warning Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220530135057.1937286-19-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.