Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp438971iog; Mon, 13 Jun 2022 06:03:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0wXIag6FRzdYxTlQe8s/9zmgDu79AkLUy43Mdj7S9Tv5ZLVm9S8sCsnAQvzaxKigQfikL X-Received: by 2002:a17:906:5354:b0:712:1f3c:2970 with SMTP id j20-20020a170906535400b007121f3c2970mr15790291ejo.29.1655125279411; Mon, 13 Jun 2022 06:01:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125279; cv=none; d=google.com; s=arc-20160816; b=qm/w2orj1EylkzAQVG3DjbCVozBEM4TmnQbSDCYTTrXwDFS1v7chf9OGo3xlGJt5yL o09iJxrmqmV10xEpWXSBJj/FKfYjT/rGeWGcvtTteLqALiBojvnxCTsCuWEJcUZrRApI Sg5uhKYzRe5R9zqJKl+PIqV+N5ydVYuqeKWxIjI65YfYaoQ/t8/20d42FLHo3Yjq7Vs+ 4XugDhIRHqjw3CUkaAqhI8S6Wfb5UTBrh/LrGmZDGvTOolMz7j98GeW7rzvjGRJj/L2e dmBzoEvLT71FVY9igLv2+OOsBEXn0pMYpstwfGJWrjAjpq8u44rByQyQAok9KZd8Ejcu El0w== 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=3YHDkjWFx7QiGCSFk041tfeS9ZSxEIaYLKVIEeUKgQs=; b=peSn6Klz3G6upPqvV8P1aC8BlrwWA2QDIqAjHyqFOv4CF91lYV7+sCWTWf9S3hTxvx EBcIreFFOqwz6HXFy0d+bFNVaf3ouo/fDVXMtmAV/H6mXUaElzMVQ/4oMfsFRHH2hcQo t7iTvwgbI1lys9wF/frV3nL2F/3IkjrkHn2fCrUfAvAgbqlMEFzla2vBWTcsWUlVQgcI pX2oP4KU5aXAopkjtEansu2TLs622kEGXGS90tcmrvgBIyG5eWk7kAaLoxR/FfeF0PxT 2ug2ZdSQZJstXuFmPZsvAGcwsdk8KeBHL7GWwcfzgQgxnpZPLmiHQMGIejuDmQgnODfi UfRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pgziv3fQ; 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 g20-20020a50ee14000000b0042b303fea16si6573493eds.50.2022.06.13.06.00.52; Mon, 13 Jun 2022 06:01:19 -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=Pgziv3fQ; 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 S233663AbiFMKPu (ORCPT + 99 others); Mon, 13 Jun 2022 06:15:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241763AbiFMKPK (ORCPT ); Mon, 13 Jun 2022 06:15:10 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5103BDE93; Mon, 13 Jun 2022 03:14:44 -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 sin.source.kernel.org (Postfix) with ESMTPS id 558E3CE1166; Mon, 13 Jun 2022 10:14:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48D03C34114; Mon, 13 Jun 2022 10:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115280; bh=EOmJEH68TjxZdaiohHMuXN0fLS1RICZ/GU/FScIyQFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pgziv3fQh/+5wAmJyUdlT5WWVaX2Aq02H31vkspk90P0pyjtIqLkdah+2ipXnRIy7 xqrYExakZu6QPiE13imYhm6j3JFThlkjH9Fzb/KlSCs8xy870oyQ6mNk16L/G6cMzN mtsxBrZALi4qpCVBCrLs1pQUls752AMxFePz6grE= 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.9 019/167] dma-debug: change allocation mode from GFP_NOWAIT to GFP_ATIOMIC Date: Mon, 13 Jun 2022 12:08:13 +0200 Message-Id: <20220613094845.377746231@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094840.720778945@linuxfoundation.org> References: <20220613094840.720778945@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 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