From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 0EB2EC47078 for ; Fri, 21 May 2021 16:04:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8B61B613E3 for ; Fri, 21 May 2021 16:04:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B61B613E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 022806B00EF; Fri, 21 May 2021 12:04:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F3D4F8E0022; Fri, 21 May 2021 12:04:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E2DA76B00F1; Fri, 21 May 2021 12:04:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id AEDDC6B00EF for ; Fri, 21 May 2021 12:04:16 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 40D498248068 for ; Fri, 21 May 2021 16:04:16 +0000 (UTC) X-FDA: 78165710112.03.E67A559 Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by imf22.hostedemail.com (Postfix) with ESMTP id 5426AC005A01 for ; Fri, 21 May 2021 16:04:13 +0000 (UTC) Received: by mail-lf1-f49.google.com with SMTP id v8so25458865lft.8 for ; Fri, 21 May 2021 09:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u+o46hanR9P7zvSnBnu4BF9jcYec6WA6HmpllzjQX4U=; b=GPbGcKTyZK1/TQFrE4YKnGplyqqw8O0vITSws9ZhnTVJCCaTm7OUWRS25f3Vz5Lc8M xH7QmsSzP+Yy70WMcNG4UZXmxTChocRH6xPQTujQavLnp3JhVSZ9IybxhnslUFjIt+Im ItLm0oy9KujzeSTBPMA5ub5bTjudE1K7cR0Ig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u+o46hanR9P7zvSnBnu4BF9jcYec6WA6HmpllzjQX4U=; b=sGe1ZOfyT+TbUQdJ03MXMvbMstiyoVmskKfphp0PzMi8sjc3y6y8bM0USXE/U42QNr IqhFgoVCFyWvF8RDmieGm0vPi6Z6u7fJldNlb8+Q5iAYa97cW9jMPq58lXG0eyKxmagR C+QqplZ0WlFnVozZu0YB0xYXyO83SGkvWMXS056A0V4ulBXRsbyflKjdB0MPfvvYuUB4 a5vvKrnap921suV8hmDJzl4eXlQGxVAd0GNNqw2wk+Z6+DkKEmoABZLXD0RCEM0Lw9Qm wsYJeL1m/6zF4UxIAV4JP6qLJ/tr4yweStVbLP6dcpEwwHFGsCpCIZQDMQ5AKxi/77c7 qR+A== X-Gm-Message-State: AOAM531y6I/FrWK1vp1TdQ/4kroPbDMApc738JCA1AqzZSi8k1zBLU0Q IelEq+irWgio5xBG5KXbVmuWqaDN0HdQwtBO X-Google-Smtp-Source: ABdhPJzV08wzZJ4A+GbeRQU2Qjdceqaq2c7kL22re6gA4kp5b6TE07/RKadOaqIZcl6c4p7rlYW0Vg== X-Received: by 2002:a05:6512:c0f:: with SMTP id z15mr2552376lfu.578.1621613053886; Fri, 21 May 2021 09:04:13 -0700 (PDT) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com. [209.85.167.52]) by smtp.gmail.com with ESMTPSA id b35sm658135lfv.82.2021.05.21.09.04.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 May 2021 09:04:13 -0700 (PDT) Received: by mail-lf1-f52.google.com with SMTP id m11so30464369lfg.3 for ; Fri, 21 May 2021 09:04:12 -0700 (PDT) X-Received: by 2002:a05:6512:36c5:: with SMTP id e5mr2652442lfs.41.1621613052578; Fri, 21 May 2021 09:04:12 -0700 (PDT) MIME-Version: 1.0 References: <20210422054323.150993-1-aneesh.kumar@linux.ibm.com> <20210422054323.150993-8-aneesh.kumar@linux.ibm.com> <2eafd7df-65fd-1e2c-90b6-d143557a1fdc@linux.ibm.com> <5ea8fa4f-a5a2-7dc4-7958-23df6a2c1f3a@linux.ibm.com> <874kewme7a.fsf@linux.ibm.com> In-Reply-To: <874kewme7a.fsf@linux.ibm.com> From: Linus Torvalds Date: Fri, 21 May 2021 06:03:56 -1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 7/9] mm/mremap: Move TLB flush outside page table lock To: "Aneesh Kumar K.V" Cc: Linux-MM , Andrew Morton , Michael Ellerman , linuxppc-dev , Kalesh Singh , Nick Piggin , Joel Fernandes , Christophe Leroy Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=GPbGcKTy; dmarc=none; spf=pass (imf22.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.49 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5426AC005A01 X-Stat-Signature: oid4w1y7b5o8pebscmafydhui4pj4694 X-HE-Tag: 1621613053-619715 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: On Fri, May 21, 2021 at 3:04 AM Aneesh Kumar K.V wrote: > > We could do MOVE_PMD with something like below? A equivalent MOVE_PUD > will be costlier which makes me wonder whether we should even support that? Well, without USE_SPLIT_PTE_PTLOCKS the pud case would be trivial too. But everybody uses split pte locks in practice. I get the feeling that the rmap code might have to use pud_lock/pmd_lock. I wonder how painful that would be. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 4B9FEC47076 for ; Fri, 21 May 2021 16:04:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 C606F613DB for ; Fri, 21 May 2021 16:04:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C606F613DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Fmrz83L3Hz3bwt for ; Sat, 22 May 2021 02:04:52 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=GPbGcKTy; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=2a00:1450:4864:20::231; helo=mail-lj1-x231.google.com; envelope-from=torvalds@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=google header.b=GPbGcKTy; dkim-atps=neutral Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Fmryd1vhzz305x for ; Sat, 22 May 2021 02:04:24 +1000 (AEST) Received: by mail-lj1-x231.google.com with SMTP id p20so24554430ljj.8 for ; Fri, 21 May 2021 09:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u+o46hanR9P7zvSnBnu4BF9jcYec6WA6HmpllzjQX4U=; b=GPbGcKTyZK1/TQFrE4YKnGplyqqw8O0vITSws9ZhnTVJCCaTm7OUWRS25f3Vz5Lc8M xH7QmsSzP+Yy70WMcNG4UZXmxTChocRH6xPQTujQavLnp3JhVSZ9IybxhnslUFjIt+Im ItLm0oy9KujzeSTBPMA5ub5bTjudE1K7cR0Ig= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u+o46hanR9P7zvSnBnu4BF9jcYec6WA6HmpllzjQX4U=; b=EHQfE78qCBVdfBOwuiK6kzSabh1eDdn8W7c5nnEoux1IECmjo++jRiZxtMLkRSDWl2 nQgw1aAxTgXE26oyOxUKAzp7cYDTzlhbYnkY5hNwCwbhFnhxhtLcGpT2dyTcbPd3bYjs xLm7Yga9fFyBCTsnyUk5bMCubtnccUncxPvDngmgWyDxMOLVV6Maln/sOhc9kBkMmRdm HrP+kqY76LdKUe/i9uWDVOYcL5Kdi5L9qCs54NRjWHQ26CIhClEnyu19K/Co8OJwlsmT Pg0F3WVgia0xv4MihCTbs/toH7G4tuhOsg67k94TYqvgX1CJoSgXlPAG1eQU1ILQbAU0 5Ujg== X-Gm-Message-State: AOAM533Ci7Why8p02qCQzwFO+YXns3GWvG1CJ8Yes089UOEHwKDH2Dam 9jVb3tRY1RvBpyO983bSFKUbp4qt9Q4BusrR X-Google-Smtp-Source: ABdhPJzz93McTGpm6HjZYbGWGuraoQrdkkYJWf0lMcTWfMrkvRR/JBU3LllF0acbLFU0y2vrpeuijw== X-Received: by 2002:a2e:b524:: with SMTP id z4mr7411784ljm.62.1621613054929; Fri, 21 May 2021 09:04:14 -0700 (PDT) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id m4sm716688ljp.9.2021.05.21.09.04.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 May 2021 09:04:13 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id j6so27764234lfr.11 for ; Fri, 21 May 2021 09:04:12 -0700 (PDT) X-Received: by 2002:a05:6512:36c5:: with SMTP id e5mr2652442lfs.41.1621613052578; Fri, 21 May 2021 09:04:12 -0700 (PDT) MIME-Version: 1.0 References: <20210422054323.150993-1-aneesh.kumar@linux.ibm.com> <20210422054323.150993-8-aneesh.kumar@linux.ibm.com> <2eafd7df-65fd-1e2c-90b6-d143557a1fdc@linux.ibm.com> <5ea8fa4f-a5a2-7dc4-7958-23df6a2c1f3a@linux.ibm.com> <874kewme7a.fsf@linux.ibm.com> In-Reply-To: <874kewme7a.fsf@linux.ibm.com> From: Linus Torvalds Date: Fri, 21 May 2021 06:03:56 -1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 7/9] mm/mremap: Move TLB flush outside page table lock To: "Aneesh Kumar K.V" Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nick Piggin , Linux-MM , Kalesh Singh , Joel Fernandes , Andrew Morton , linuxppc-dev Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, May 21, 2021 at 3:04 AM Aneesh Kumar K.V wrote: > > We could do MOVE_PMD with something like below? A equivalent MOVE_PUD > will be costlier which makes me wonder whether we should even support that? Well, without USE_SPLIT_PTE_PTLOCKS the pud case would be trivial too. But everybody uses split pte locks in practice. I get the feeling that the rmap code might have to use pud_lock/pmd_lock. I wonder how painful that would be. Linus