From patchwork Tue Apr 20 15:00:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 12214461 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC0D3C43461 for ; Tue, 20 Apr 2021 15:01:10 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71ECE613D2 for ; Tue, 20 Apr 2021 15:01:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71ECE613D2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2699C100F226A; Tue, 20 Apr 2021 08:01:10 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=rppt@kernel.org; receiver= Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 84683100F225C for ; Tue, 20 Apr 2021 08:01:08 -0700 (PDT) Received: by mail.kernel.org (Postfix) with ESMTPSA id EE7CC613CD; Tue, 20 Apr 2021 15:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618930864; bh=8H5HU47vEWQjvvF+2Pz4ChL06bcJ0cPitsV98kgBsxg=; h=From:To:Cc:Subject:Date:From; b=n4Nm3HlpfChYGkCY62zrscIigP2PS/KwtQe3rk8cf0a4kmFXBffFMI/JZOZf3lqXG I2DY9NMidPqLhsTgvFwkE+J6Fy9TPmwoPeQuiLO1iU5ibpkWYcCNMkqL8WamECYDx/ cFnHJ2L51bPl3ihavFrLiRAdeJI2Bij5m4ZGUDbwVRUbPbbbOGIQTyE7lxfqgkGVlh +EYbmgdDfDCeyFVzW71FzXt7d+plT2fK+Ik0mpJZ2ndkuq0eiTmXZAZ7zGob/famDE EyW64QzflOhPuGIz3FV6JVuCs/V9Kd04MBng8Mkhuo5rTiWoHO+xJJif/5vq6yiKU1 X3aq4Yn+wxUkw== From: Mike Rapoport To: Andrew Morton Subject: [PATCH v3 0/2] secretmem: optimize page_is_secretmem() Date: Tue, 20 Apr 2021 18:00:47 +0300 Message-Id: <20210420150049.14031-1-rppt@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Message-ID-Hash: 7UCCUWM5PYMMR2CQT7FFL2PFEI7ETY27 X-Message-ID-Hash: 7UCCUWM5PYMMR2CQT7FFL2PFEI7ETY27 X-MailFrom: rppt@kernel.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: Alexander Viro , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Catalin Marinas , Christopher Lameter , Dave Hansen , David Hildenbrand , Elena Reshetova , "H. Peter Anvin" , Ingo Molnar , James Bottomley , "Kirill A. Shutemov" , Matthew Wilcox , Matthew Garrett , Mark Rutland , Michal Hocko , Mike Rapoport , Mike Rapoport , Michael Kerrisk , Palmer Dabbelt , Paul Walmsley , Peter Zijlstra , "Rafael J. Wysocki" , Rick Edgecombe , Roman Gushchin , Shakeel B utt , Shuah Khan , Thomas Gleixner , Tycho Andersen , Will Deacon , Yury Norov , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-riscv@lists.infradead.org, x86@kernel.org X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Mike Rapoport Hi, This is an updated version of page_is_secretmem() changes. This is based on v5.12-rc7-mmots-2021-04-15-16-28. @Andrew, please let me know if you'd like me to rebase it differently or resend the entire set. v3: * add missing put_compound_head() if we are to return NULL from gup_page_range(), thanks David. * add unlikely() to test for page_is_secretmem. v2: * move the check for secretmem page in gup_pte_range after we get a reference to the page, per Matthew. Mike Rapoport (2): secretmem/gup: don't check if page is secretmem without reference secretmem: optimize page_is_secretmem() include/linux/secretmem.h | 26 +++++++++++++++++++++++++- mm/gup.c | 6 +++--- mm/secretmem.c | 12 +----------- 3 files changed, 29 insertions(+), 15 deletions(-)