From patchwork Mon Apr 29 08:28:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13646457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71CA6C4345F for ; Mon, 29 Apr 2024 08:28:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 89CAB6B0083; Mon, 29 Apr 2024 04:28:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 84BA66B0085; Mon, 29 Apr 2024 04:28:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 73BB86B0088; Mon, 29 Apr 2024 04:28:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 55FE36B0083 for ; Mon, 29 Apr 2024 04:28:42 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id B8EBBA29D8 for ; Mon, 29 Apr 2024 08:28:41 +0000 (UTC) X-FDA: 82061893242.19.7AB4946 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf21.hostedemail.com (Postfix) with ESMTP id E0FFC1C0014 for ; Mon, 29 Apr 2024 08:28:38 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=gguGejPK; spf=none (imf21.hostedemail.com: domain of BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714379320; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=0HBKQ8fzn9KpERPmuzYZnAAGF9fl2woLnSZSNk8YNj0=; b=l3nlSgUxzuMTMExYaCnc0p+FGy380VQQJ0sfn+zA91snhMpUIeFfnA/XAcYSvwMRURtbT7 WeuCXzSorzbFOVPSLvMg9szAEhBT+paRpmBG2sEKC/VAlVZ1hNW+iTwddYdOe0Hs/MFArb CpX7kTjOHgHl4CldNJgi2kbZFMmzQug= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=gguGejPK; spf=none (imf21.hostedemail.com: domain of BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+30e30756e4afbbed450f+7554+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714379320; a=rsa-sha256; cv=none; b=iQa3PjFzYaWSJjzPjcVsv0TY7uNmPSi8TRnWBfmqY/8CDTgZGAZlaVb6cMjpbjRQhSTpWH mNYcimStoc5kU51cw3xhFk6qt6pts+qtWyQM1B6yiE0LDuy4zFFF3JSSymRQ+l4dBN5Kue hhmCCHDLI/Wl25UdfePJ1xqrxyQaviI= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=0HBKQ8fzn9KpERPmuzYZnAAGF9fl2woLnSZSNk8YNj0=; b=gguGejPKFBb2SHLAf0pg8M/0KD /CFy59ULONhTXP3ou7Ah3u5bP8C6Brb8AyfDk2GuBS5gwKrniqgmlyokDlbiO2/FbeiRBjwBz5bdS DALxUVv+Cvx3u5HXva3hxPU6iVF9SosN39xoPzmfp0hF5uup2X0rumSTB60XvaGzU4rMF+hnoF2Ku yXl9EZ2pjGaYjHMgrQpQgXcaap797zF9UIZulKZLDMHhOgCbEtSHrVMltvyVs+2go6XC4KFqhqVgV bdMm2DID4IzIfAONE1lPHiepC5TJgB6aHeilJ3iOIbTjA0ks9p9zCpXYWxf5jbFd2s4DnYRC23O6N I7I84I1g==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1MND-00000001xP9-1WR0; Mon, 29 Apr 2024 08:28:32 +0000 From: Christoph Hellwig To: akpm@linux-foundation.org, osalvador@suse.de Cc: elver@google.com, vbabka@suse.cz, andreyknvl@gmail.com, linux-mm@kvack.org, djwong@kernel.org, david@fromorbit.com, linux-xfs@vger.kernel.org Subject: [PATCH v2] mm,page_owner: don't remove __GFP_NOLOCKDEP in add_stack_record_to_list Date: Mon, 29 Apr 2024 10:28:28 +0200 Message-Id: <20240429082828.1615986-1-hch@lst.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Stat-Signature: fj3zhe5by4wjte3oiqetciw757ztbbpj X-Rspamd-Queue-Id: E0FFC1C0014 X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1714379318-332730 X-HE-Meta: U2FsdGVkX18e6GJDPcraonZJSsCCC9C0vG8AOsCc2OZNJTYarqEp+cZfqBN5m+Q0BUEs2A7B5wmfKd9GfyYZU/a197Kz6u7qAAEe/xlimDPHERXe6+LgskP9u/Dp+3iJTW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2PwLyTxbifF/SFfU4MHxpUrlG7cs1k3mVYiouZiI6vLeCE3TPDHCwBIE9db/V+cia1fzlQxXGnVtcaAgtpdJTigpkP4GpKvvd/9O/acWwmG+ghenIePX7DHqIQcjrNOJoowAb5gvxGVTXG421nZpaoC5dH9pZ2mHfpLPPeQTtqHhBeVaKVyWzvNcbGxO7/ZsQBS7QsLULVUKHc/7+7ZTpG+Gq3wEboY9los0fyLGsEhMKCk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Otherwise we'll generate false lockdep positives. Fixes: 217b2119b9e2 ("mm,page_owner: implement the tracking of the stacks count") Signed-off-by: Christoph Hellwig Reviewed-by: Vlastimil Babka Acked-by: Oscar Salvador --- Changes since v1: - only pass on __GFP_NOLOCKDEP and leave the other masking in place mm/page_owner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index d17d1351ec84af..428c1ea8b4579e 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -170,7 +170,7 @@ static void add_stack_record_to_list(struct stack_record *stack_record, /* Filter gfp_mask the same way stackdepot does, for consistency */ gfp_mask &= ~GFP_ZONEMASK; - gfp_mask &= (GFP_ATOMIC | GFP_KERNEL); + gfp_mask &= (GFP_ATOMIC | GFP_KERNEL | __GFP_NOLOCKDEP); gfp_mask |= __GFP_NOWARN; set_current_in_page_owner();