Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp566998iog; Mon, 13 Jun 2022 08:16:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uOzMa5cckpe+olIJmRU/KKU2zmVYZTw73hYGqfsKlfugu8D6RwZIxT0AG2lWMQd2+ElVr+ X-Received: by 2002:a17:906:3985:b0:70c:a5fe:d4fb with SMTP id h5-20020a170906398500b0070ca5fed4fbmr313329eje.127.1655133386868; Mon, 13 Jun 2022 08:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655133386; cv=none; d=google.com; s=arc-20160816; b=YBiIVsYIG3Xb1IKeKeHfKJzU6LYM52QqtM1mskNDZwxoBcPABukL/6TgXnBiilMo41 s/3JI9oXpn6Z6IwnO4/ixDMEERT3s6R082GJ78Q5nGCQ0Zpu3qcHhQ+6IvhZVYXsqMPB CVcv0oQm7cT76KGY1m3B+0JgSwpzbtSmeWVOOAN1bOudk/qpZiPk9fI+TETvu1GToe2b CYTWwbILGX5BWKJ6G7PcSoRdvRfprOUPMuf5TQHctePEgKhmUGSY8/dQjLvapn+Nmah7 xGX0UHTsTJaPTxY+gmnerSAB3E5TwnDdx6Cs7JzhVSnaayw57X+IxE0zgd7VK9jPpmfj 72GQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zNeIngNJvni0CrhUVplqjJ8Bpq3i5/KkzNcF+1YAeRY=; b=h/tfe+syiscnrZB74J/XGNJzJZAWCA6o1uYEwakM7LZGXpwvI5Fpp45ohZ5pBCsr2w BQurD5WM+3i0j3J20HFGXtnQDtllBnotkotKrB3VIv/9LPstNpNiswVBgn8yZFFtFIIY zXPJC8TtgV2fMmXj0g71KuUR1k53hbhWV3AC4eqcc4h0kueJDRwzmuP4UOz7N0lV7OpA yMEYsahZgLXXkuSpGaPlaMlCmRlXePY9hTMRP/ngdM3ACGGs7mz5bvi5GjT4cT0iDLEZ /fm/z02AnIZ8+T+J9Xft1oZDU/hDX6/SL867QTgxXWUzjixDvK9YEhKf3AKMdsfTMIaK NVwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1mwJK2ku; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg43-20020a170907a42b00b00711fca6bc59si9524254ejc.263.2022.06.13.08.16.00; Mon, 13 Jun 2022 08:16: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=@linuxfoundation.org header.s=korg header.b=1mwJK2ku; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345691AbiFMKgN (ORCPT + 99 others); Mon, 13 Jun 2022 06:36:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346362AbiFMKeX (ORCPT ); Mon, 13 Jun 2022 06:34:23 -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 462BDDCC; Mon, 13 Jun 2022 03:22:26 -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 35CC4B80E93; Mon, 13 Jun 2022 10:22:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87938C34114; Mon, 13 Jun 2022 10:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115742; bh=q4/TRkFKO17K5S6Q52l+i8SN+KZng04nsE2jNUt5RHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1mwJK2kurEkx07HUhGRDF4ujY6XAh6/U3DwXyYIYYiIx7z56pBGE8wpMALZV+ru3o JQN8lePIVF3HjcL6RAyO5EfuZHD7gk52UPvkbCggWWgy+eN+d3QwuYkQaaJuWP50sG BMA07Dsm0pj37ELkQWouomzQ4bWTxytPWddRe/Y8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikulas Patocka , Christoph Hellwig , Sasha Levin Subject: [PATCH 4.14 025/218] dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC Date: Mon, 13 Jun 2022 12:08:03 +0200 Message-Id: <20220613094914.270206187@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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 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