Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5515884ioo; Wed, 1 Jun 2022 07:09:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVjU1cOGedDJwrHMmpKRn/k18O0dSbdg0E530GhE5XOo1GMrSUI7iMknrukXinwo3Mmj73 X-Received: by 2002:a17:90b:3591:b0:1e3:25d3:e78e with SMTP id mm17-20020a17090b359100b001e325d3e78emr12427434pjb.29.1654092566848; Wed, 01 Jun 2022 07:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654092566; cv=none; d=google.com; s=arc-20160816; b=T3xoOg48L0gt81SjgGLtkXQ4bbP9jECtMsCOIlEcbNGw+KAZqotnRhrUBvxWgJo0TI qPd3wN8VmBiZUZ7Fe1I0yMl8iDVCCogvbfx9pjNe+MHaMRLpausAM82RhpAbc+urTbKt SKXxTcaeOSC+xwwpQAF1dGlRhjLV5tbWHF6mCw8Top5MK/HQIYCngA4Q3hKLqH9KJEuG xqVvsWG8W4qUrpbM4Udd3WsNEFZGyyBEJqKSCECVo/hTjQs+mAfGUmbFXEX65pObHmZt uqFkygZqZdw/aBLJy3Wpz4/HvddrNFRjnpnXeP/dNxKRR7SpzlJSjeZY7IOLrtnvL3bc 4/7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3YHDkjWFx7QiGCSFk041tfeS9ZSxEIaYLKVIEeUKgQs=; b=oaUNyE0eOwaYFU51d4fTxnknfVFYIfkm+vpLETyV7Q28w2qCbQzkRDo46DbYAYFuUO wBOwEr0dfKIxUprzmpL28oWxGWag7c+F/ZNUYjjkRT4xcDN+J47eHXxXDQwmy4yZtxcx bCWPTlSxswH3UF1Bi9Bos/QrPuZRimHbsmeON4L7Y9k+qWb44vU+aEYhdtWLin2fNCyG 6JjpXHXGfWDFMfrcrKqugGxFdGwFzRFDN4p7cpYfEyLm/bN5MiRgW/QsOyhjjKRjJc+D JJlNql8cJGFA5hE1DMTovEhh/vMUd+tCyrgb7iMXSBfqLQI9cXcNYS+QzWKGAMkMD/nl 1Tog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ygnu0vet; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a635002000000b003f634895b7dsi2300043pgb.166.2022.06.01.07.09.05; Wed, 01 Jun 2022 07:09:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ygnu0vet; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237957AbiE3Ovn (ORCPT + 99 others); Mon, 30 May 2022 10:51:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242639AbiE3ObY (ORCPT ); Mon, 30 May 2022 10:31:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0300512DBD0; Mon, 30 May 2022 06:53:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E5991B80ABD; Mon, 30 May 2022 13:52:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20A50C385B8; Mon, 30 May 2022 13:52:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653918773; bh=EOmJEH68TjxZdaiohHMuXN0fLS1RICZ/GU/FScIyQFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ygnu0vet0eWoFqSkRVdY3OmWRFgpxM9grLpRoCGxfSr1//iZVgHxAcbN/zEzSJIT1 hKR0MXzfm3Wxgd3l3hQhtOtdho/63Am4mAuKrjbgLx9K2yZZ5uDesiKj7rCvROLxXv ttmLdpR4cpzFq7LlDR6g8pXppXP6xyqoI2R39YT4/BlCuLl1a6+vmtnCqxMLVnXph6 TwN4GJCgiDe0eyvNY/FBLYzujv3ah6qMEQfG6lFh1OyldMKmPPoWZUbftpfwuycc7E XgIjbjRccUHQ2EKMI7qI6ZIrKUxEBg4tkF89768FZVzrrEWVfiybgkT8XIvij6RsxK 9BQTPKSJVmERA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mikulas Patocka , Christoph Hellwig , Sasha Levin Subject: [PATCH AUTOSEL 4.9 16/24] dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC Date: Mon, 30 May 2022 09:52:03 -0400 Message-Id: <20220530135211.1937674-16-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220530135211.1937674-1-sashal@kernel.org> References: <20220530135211.1937674-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mikulas Patocka [ 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 Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- 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 4435bec55fb5..baafebabe3ac 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -463,7 +463,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