From patchwork Wed Feb 23 05:21:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Junaid Shahid X-Patchwork-Id: 12756369 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 CAA85C433F5 for ; Wed, 23 Feb 2022 05:24:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6762D8D000B; Wed, 23 Feb 2022 00:24:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D4218D0001; Wed, 23 Feb 2022 00:24:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 44D948D000B; Wed, 23 Feb 2022 00:24:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 339D98D0001 for ; Wed, 23 Feb 2022 00:24:07 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 0595620765 for ; Wed, 23 Feb 2022 05:24:07 +0000 (UTC) X-FDA: 79172903334.07.94556EA Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf11.hostedemail.com (Postfix) with ESMTP id 857BA40004 for ; Wed, 23 Feb 2022 05:24:06 +0000 (UTC) Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-2d6b6cf0cafso150366007b3.21 for ; Tue, 22 Feb 2022 21:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=A2kZT9A4P8bW0lI9YOtf1wQA9jJkQ1koWvhOh//ocUo=; b=fbSsueZGuBScgzqcY02VIl0ILFLXpPlKdSo5ctJYl8kSPI7w0kDZ1uGY8ujtC+fl+e PEzsS5j+6h2lyRr/UrTBatrXvU4f3NErvUAR7v4X1dzKu33iDdHE2QCAop5cuA3atf5U EJ4V1Fx706MmP14iSjNuJdP3U5u2B16C5Fj3e/UoRc8fZC4srXBJUArKZJ67Qxmu0hNA BsPOvLUKtyHj9nuWAemSw1G1+wDLXUYyYOFHHc5fb0JSBY7PBPNYf4tS05DMNxCxy6ed 1VKdWkC7HesYHDOsvNnF5BnhxEmTplkx92VqdXNvb7r03sGqA/SDTfz8vVfIQeADD5L1 ir/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=A2kZT9A4P8bW0lI9YOtf1wQA9jJkQ1koWvhOh//ocUo=; b=1D80Akdi91IKOIJKSJSzvXFiJlf5nStQPZzWIYLyZVc/ENd7GXAY3Cz+PksI2V8kuU yVNY6uOY5T98GDZm6v5ljfKEr5CnllgPXNYjpExNWVz9TSkDg6S5mOY82g7xCksJNmum i5EOcGtW0xzTOzTiNSO67k+tP5TQ3mScJk9wkKQC+8pw/W6BH/JgD8uYxqWidKus7NbF MSylqYDgrDZ3205Zo1GzXoiqHqC2boX6df669OA4QXXNHKeiy2icW6hWj1yObJ3lqF9Z XOkcmZWZwLd5r5sEzoM79+oMJSa/2IJS2A/yAbZbTvQ4R1kn6mczHkiKJWVwXi3mL2i1 m8LQ== X-Gm-Message-State: AOAM530IZOWhZVBhrBKAHVL6DB0JdVd9Xg6WbJgXcG83BXO3/E5lhC+q UuRb0duzBoDhL8fhHxT3Zhl7Y2rMy6Xi X-Google-Smtp-Source: ABdhPJx1fLXJ2Nd+XyAyj3SwtD/6yx9YWclO/RpwDKJJBLCMeXbY/FNMqCpTASogEOd+LsJ96uLWXmi1HY+9 X-Received: from js-desktop.svl.corp.google.com ([2620:15c:2cd:202:ccbe:5d15:e2e6:322]) (user=junaids job=sendgmr) by 2002:a81:1d8c:0:b0:2cb:da76:5da8 with SMTP id d134-20020a811d8c000000b002cbda765da8mr27707177ywd.165.1645593845809; Tue, 22 Feb 2022 21:24:05 -0800 (PST) Date: Tue, 22 Feb 2022 21:21:45 -0800 In-Reply-To: <20220223052223.1202152-1-junaids@google.com> Message-Id: <20220223052223.1202152-10-junaids@google.com> Mime-Version: 1.0 References: <20220223052223.1202152-1-junaids@google.com> X-Mailer: git-send-email 2.35.1.473.g83b2b277ed-goog Subject: [RFC PATCH 09/47] mm: Add __PAGEFLAG_FALSE From: Junaid Shahid To: linux-kernel@vger.kernel.org Cc: kvm@vger.kernel.org, pbonzini@redhat.com, jmattson@google.com, pjt@google.com, oweisse@google.com, alexandre.chartre@oracle.com, rppt@linux.ibm.com, dave.hansen@linux.intel.com, peterz@infradead.org, tglx@linutronix.de, luto@kernel.org, linux-mm@kvack.org X-Rspamd-Queue-Id: 857BA40004 X-Stat-Signature: ypwo4n9oaswtq3xd6tmemhao6kmy333f X-Rspam-User: Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=fbSsueZG; spf=pass (imf11.hostedemail.com: domain of 39cQVYgcKCOwXibOWRgUccUZS.QcaZWbil-aaYjOQY.cfU@flex--junaids.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=39cQVYgcKCOwXibOWRgUccUZS.QcaZWbil-aaYjOQY.cfU@flex--junaids.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam05 X-HE-Tag: 1645593846-660926 X-Bogosity: Ham, tests=bogofilter, spamicity=0.008290, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: __PAGEFLAG_FALSE is a non-atomic equivalent of PAGEFLAG_FALSE. Signed-off-by: Junaid Shahid --- include/linux/page-flags.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index b5f14d581113..b90a17e9796d 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -390,6 +390,10 @@ static inline int Page##uname(const struct page *page) { return 0; } static inline void folio_set_##lname(struct folio *folio) { } \ static inline void SetPage##uname(struct page *page) { } +#define __SETPAGEFLAG_NOOP(uname, lname) \ +static inline void __folio_set_##lname(struct folio *folio) { } \ +static inline void __SetPage##uname(struct page *page) { } + #define CLEARPAGEFLAG_NOOP(uname, lname) \ static inline void folio_clear_##lname(struct folio *folio) { } \ static inline void ClearPage##uname(struct page *page) { } @@ -411,6 +415,9 @@ static inline int TestClearPage##uname(struct page *page) { return 0; } #define PAGEFLAG_FALSE(uname, lname) TESTPAGEFLAG_FALSE(uname, lname) \ SETPAGEFLAG_NOOP(uname, lname) CLEARPAGEFLAG_NOOP(uname, lname) +#define __PAGEFLAG_FALSE(uname, lname) TESTPAGEFLAG_FALSE(uname, lname) \ + __SETPAGEFLAG_NOOP(uname, lname) __CLEARPAGEFLAG_NOOP(uname, lname) + #define TESTSCFLAG_FALSE(uname, lname) \ TESTSETFLAG_FALSE(uname, lname) TESTCLEARFLAG_FALSE(uname, lname)