From patchwork Fri Jun 9 01:09:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 13273063 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 10BD1C7EE25 for ; Fri, 9 Jun 2023 01:09:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8FBA38E0011; Thu, 8 Jun 2023 21:09:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 885338E0001; Thu, 8 Jun 2023 21:09:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74CCA8E0011; Thu, 8 Jun 2023 21:09:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 66DE78E0001 for ; Thu, 8 Jun 2023 21:09:33 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 399B5C0311 for ; Fri, 9 Jun 2023 01:09:33 +0000 (UTC) X-FDA: 80881426626.08.A2CE40A Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) by imf25.hostedemail.com (Postfix) with ESMTP id 61959A0005 for ; Fri, 9 Jun 2023 01:09:31 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=UcfhhEB8; spf=pass (imf25.hostedemail.com: domain of hughd@google.com designates 209.85.217.54 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686272971; 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-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lc/g6LXQOs93yTgCiGczTkkFK+sAgodNjTysgahDEVw=; b=ZkzgiNfA0fUKn/lPa8uWgVy+RDPp6bPu1uruMT1p6PTjZXRY0KIibP+uelIgroK8gZQNTq Rnw7LfhUzbDRjO0JsB/32t//AFiimQEw0fPOpKC4jdPvNYk/Bsvep773TCBR0MwIrG3g1F ugV4RW35B8f0V4k/VUJSy3tEBSKpyeY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686272971; a=rsa-sha256; cv=none; b=4HWFBw6tvoa4zcf4w1g7PIwSTUv8L16TTllDwBKXAMz0LXKcTxldN3rcO8m3Tdo958sC0z j9xP0w1E1r/vqRtiLXoSfjLmP+M+MNN8kCz2a7CAS7WseTWybaElPuDma/MSndIlaOMgau ttVfYnYdf0HGgk8icQGp86VkfYZy5wA= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=UcfhhEB8; spf=pass (imf25.hostedemail.com: domain of hughd@google.com designates 209.85.217.54 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-43dc7a78a37so401827137.0 for ; Thu, 08 Jun 2023 18:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686272970; x=1688864970; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=lc/g6LXQOs93yTgCiGczTkkFK+sAgodNjTysgahDEVw=; b=UcfhhEB8JVYtSaYNjeXN56wB9MqyMQtCQGtprQFTqjfYjEL7E7V3Iy94OMfqel1oXO QZIcQiOjvsa3e98AoL/nIYiIeV2XwYtBY8pjjhbDjSLvNRXQUNuQ1CEyYWBCd3xYPZVP trZtykP/Mof04N1VHc0lVHbgyp1EiW4pew5nO8aSYUb++iO0ncGeIIIiQK3p/c+W0yHU AAa6tsu0E2vKcj4HqLxwkHvPM9meFiA6K3qv+5vTGLBRG4cfgXg5/75cLxanqJajUo8o cFN/FNCedO3dWchgzF6syrkwFnGXauAim52zAU4uX164Btb5VfynbXsQAJloguXMP3eG dROw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686272970; x=1688864970; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lc/g6LXQOs93yTgCiGczTkkFK+sAgodNjTysgahDEVw=; b=ELiir/axakDBVlnjq0w5hcLobWnIJc/YyCjHkpyDadn3bhK3CvnqXlf25pco+UPB8b tYDmzGBkG8wzm5IP7rcq7zgTPCeKhV4X9vrQ1IqxULQ0pd+LtBPNo9Qgf9npAei1IyBw izOozbuJXZRxm+a4g+f5UXsb14JEMwdVOc4QqSyxYw99oeSMf/BSlGynHWXiNBxgSaNu qCwpoln8lTih6+Vd+3xE/NekDSXynHvbmg2SKLo/GW5M3yaouxgDSVrJ5nDwm82Ib0wm jz8W8nxkocw42IohP/O16O8MJZXTgA2TONocUYZ2zvTktSLASHTG3r7Bz1x+rFF90ywF qGEg== X-Gm-Message-State: AC+VfDwTYV2WYk5/3B0M2VNdKz8Bh9vbaAdr6vqohWMfeYcWtk6N9Mji CpoJLGhx8Oi5lP1PIkOTbtN7Pw== X-Google-Smtp-Source: ACHHUZ5C3ZXPkFDl7beNnC8Wxo2aSMU5SCcCj/7iCu4IfWqU05s5B/rb2VYjxSOJxyLyi/equlOn5A== X-Received: by 2002:a67:f490:0:b0:43b:1dfa:2534 with SMTP id o16-20020a67f490000000b0043b1dfa2534mr162704vsn.10.1686272970295; Thu, 08 Jun 2023 18:09:30 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id n11-20020a25400b000000b00bb393903508sm603507yba.14.2023.06.08.18.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 18:09:29 -0700 (PDT) Date: Thu, 8 Jun 2023 18:09:25 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Yang Shi , Mel Gorman , Peter Xu , Peter Zijlstra , Will Deacon , Yu Zhao , Alistair Popple , Ralph Campbell , Ira Weiny , Steven Price , SeongJae Park , Lorenzo Stoakes , Huang Ying , Naoya Horiguchi , Christophe Leroy , Zack Rusin , Jason Gunthorpe , Axel Rasmussen , Anshuman Khandual , Pasha Tatashin , Miaohe Lin , Minchan Kim , Christoph Hellwig , Song Liu , Thomas Hellstrom , Ryan Roberts , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 03/32] mm/pgtable: kmap_local_page() instead of kmap_atomic() In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 61959A0005 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 8c5hmat6nxai9oxzs1zws1by1soi9p5a X-HE-Tag: 1686272971-562033 X-HE-Meta: U2FsdGVkX1+yEgVg3XwGUBl9S+1i2Ry5mPmJviSheANUclbxt6tLPDbAZB6YvbBOR+sbBWOnLkxzDhYL/1Ufm3YW5YIH6uqP6nV5MpWz/i0uM1dQulyiRgkx5Lf7VX0CrSmy6ATEVFPTAXcTaFHGgYUFtngLYUi37wUWMVrj8dksTu/dP39969ymYlM8luuV/5wMr5bciQneuemhwnP0//H8mPV5qJh7nImOz/B3La7kAcl+gHi6yKU7lfpzAgRRvvsdpABOhCsWM0negzIRWXikMs8hK7U6z88VXdLb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UKoDUQwsYOtwHAnX9ARLYA72oUPJ4C4fQP/1isNUMRVkPMT1lxJtg== 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: pte_offset_map() was still using kmap_atomic(): update it to the preferred kmap_local_page() before making further changes there, in case we need this as a bisection point; but I doubt it can cause any trouble. Signed-off-by: Hugh Dickins --- include/linux/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 8ec27fe69dc8..94235ff2706e 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -96,9 +96,9 @@ static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address) #if defined(CONFIG_HIGHPTE) #define pte_offset_map(dir, address) \ - ((pte_t *)kmap_atomic(pmd_page(*(dir))) + \ + ((pte_t *)kmap_local_page(pmd_page(*(dir))) + \ pte_index((address))) -#define pte_unmap(pte) kunmap_atomic((pte)) +#define pte_unmap(pte) kunmap_local((pte)) #else #define pte_offset_map(dir, address) pte_offset_kernel((dir), (address)) #define pte_unmap(pte) ((void)(pte)) /* NOP */