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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A861C61DA4 for ; Sun, 5 Mar 2023 10:16:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 964E36B0071; Sun, 5 Mar 2023 05:16:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 912C96B0073; Sun, 5 Mar 2023 05:16:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7DA986B0074; Sun, 5 Mar 2023 05:16:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 6D0056B0071 for ; Sun, 5 Mar 2023 05:16:14 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 383E2409C3 for ; Sun, 5 Mar 2023 10:16:14 +0000 (UTC) X-FDA: 80534439468.07.69FA717 Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by imf29.hostedemail.com (Postfix) with ESMTP id 4D24C120011 for ; Sun, 5 Mar 2023 10:16:12 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf29.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.160.170 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678011372; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lotoz11ggMGtNTl3aQvMMzWHUqGY2U+vaeJhB00aaRc=; b=JmErtgp9gY26lI98h9QjicvYBnbHoJD0/lAX9akudCYcgd6beKCw42IIjyoYyxPrSmIJNf GDOQePqsykqszml0MTAwCxFzpQA6X5W9GChhZLB1iZ9jangQxDNZxPF6Qgqdm0YiWWnBbv xZS5tpiTb7YXUqTTDiv/KJ+Uo+Ie/Wc= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf29.hostedemail.com: domain of geert.uytterhoeven@gmail.com designates 209.85.160.170 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678011372; a=rsa-sha256; cv=none; b=zoLhUWq4SSmEqr9Gf3DTx9zdiCnLXtGhBms+lc3uKEQppLvnjO2zbep17BSg58smEWUwHg G2mP3lnmjrKyzep/KmuLrHNMi6WBZrEVzS/TV591oRjRXQvK14+FUae1dZu+ssf47NgvjL sMmWQHpR3f15VnHiLVkraXO+J8LFQq0= Received: by mail-qt1-f170.google.com with SMTP id c19so7568132qtn.13 for ; Sun, 05 Mar 2023 02:16:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678011371; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lotoz11ggMGtNTl3aQvMMzWHUqGY2U+vaeJhB00aaRc=; b=pbCU8Ou8NqpQdjm2WYX4Y/UaXjJr97t3lUSWItIIkIjQS+TtjYS+ZmFzajzPLWQLXp ABF6RwfFdTK8MbC+Zg+QsKoljxxUG7xpkckJ1NlvgmTud/whLWOTcNd7M+0g10BXDSkT Pxka16kAVREFT5nj3H5EyB7Xmb8i5xm0ZtLWeqMCWp6JlJSZov0Jq0vPy86OWVS3YbcX 2x/488NsZFyPn1o+8EwzJQw1kekCXrIXVNNXkCu+O/+gqEBNd16TDrDsbsi1NsihJva9 yVR5Vrt8/ShEEhduHPzTQMK/2xBSSu7YwuWdCpMfhFJXKHDryPQVCvhsZapDdrgfH1Hi zCAw== X-Gm-Message-State: AO0yUKV+Zeqw1qiD+p/IpQX6Qhl3TshpTfMPHvEihyaJI5WxYWZH4XHr 9Xw8ez75XGSHOz4DwJbvk3HO6NMQafqUtQ== X-Google-Smtp-Source: AK7set/pqEfqd59hqGjVHqEl4Jyx1PQjPTMZNm0lMq7lN7RhWMHmAgQgR/xlpXTX0KJOOBDip7rKDA== X-Received: by 2002:ac8:7f14:0:b0:3bf:c407:10c5 with SMTP id f20-20020ac87f14000000b003bfc40710c5mr13502597qtk.26.1678011371191; Sun, 05 Mar 2023 02:16:11 -0800 (PST) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com. [209.85.128.177]) by smtp.gmail.com with ESMTPSA id v21-20020ac87295000000b003b6382f66b1sm5391857qto.29.2023.03.05.02.16.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Mar 2023 02:16:10 -0800 (PST) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-53852143afcso129973907b3.3 for ; Sun, 05 Mar 2023 02:16:10 -0800 (PST) X-Received: by 2002:a81:b61d:0:b0:52e:f66d:b70f with SMTP id u29-20020a81b61d000000b0052ef66db70fmr4376133ywh.5.1678011370431; Sun, 05 Mar 2023 02:16:10 -0800 (PST) MIME-Version: 1.0 References: <20230228213738.272178-1-willy@infradead.org> In-Reply-To: <20230228213738.272178-1-willy@infradead.org> From: Geert Uytterhoeven Date: Sun, 5 Mar 2023 11:15:59 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 00/34] New page table range API To: "Matthew Wilcox (Oracle)" Cc: linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-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EY+n0zoJFdcpP6X/TNeI00v PCKTLsHN wD4Fgjb9Cf1triqz2PYGBuOg3+MFKQhvzCb5iH9UkTH2O4S5n8W18F6XNxAgwu9CKNQVF74ksPTa+cTGx6yt6UeyY0Bt3ZofNSBlDJB9ZFgsKz4NoUiLX8eh9RB3TYuc5ma+g28z8nUOn19K0Jo3QcVlwK2Rr3cjokyGapD1XKobdiGvSfGB0hZY4h5cyIjJwb4qoAHYE+ITvzJD45EYuiEGuoYz9UkUDHsJCg8NKgIWQruHTgDz+sUoT4KT5OOIQIdyU7Z4uzM0Yv3O+P2X6xstHA+7FrcVAxrzLh/I2PsRhTpN36/R0mDkmFvwT8yiPezAbrGBMd74X5aSf0p2wg37s566+dEt60QN9NRQ20uwuxeuQu4kByYtFutBbEjFLZwONQWU0Sbmb2uGdyZV4mI+h87Ejr+TSQR0rR0E4m7ut775wCG3GJK10ncovUddzqzkA5DSJkofUfRphT/H5WeXV8oXxoe24E6509NT0PyTHp4b0UljQATFXipieFWWwugsaAVG2omQfGkbTGcGjgQpZp1ZrVWRR01RBulf95bfynoCaHBymKXGmphCxzDGCz5vUPsGW3zuNkHy5yu30yVAB6W7TfwzUIYjK38rBQBlq+y4= 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: Hi Willy, On Tue, Feb 28, 2023 at 10:40=E2=80=AFPM Matthew Wilcox (Oracle) wrote: > This patchset changes the API used by the MM to set up page table entries= . > The four APIs are: > set_ptes(mm, addr, ptep, pte, nr) > update_mmu_cache_range(vma, addr, ptep, nr) > flush_dcache_folio(folio) > flush_icache_pages(vma, page, nr) > > flush_dcache_folio() isn't technically new, but no architecture > implemented it, so I've done that for you. The old APIs remain around > but are mostly implemented by calling the new interfaces. > > The new APIs are based around setting up N page table entries at once. > The N entries belong to the same PMD, the same folio and the same VMA, > so ptep++ is a legitimate operation, and locking is taken care of for > you. Some architectures can do a better job of it than just a loop, > but I have hesitated to make too deep a change to architectures I don't > understand well. > > One thing I have changed in every architecture is that PG_arch_1 is now a > per-folio bit instead of a per-page bit. This was something that would > have to happen eventually, and it makes sense to do it now rather than > iterate over every page involved in a cache flush and figure out if it > needs to happen. > > The point of all this is better performance, and Fengwei Yin has > measured improvement on x86. I suspect you'll see improvement on > your architecture too. Try the new will-it-scale test mentioned here: > https://lore.kernel.org/linux-mm/20230206140639.538867-5-fengwei.yin@inte= l.com/ > You'll need to run it on an XFS filesystem and have > CONFIG_TRANSPARENT_HUGEPAGE set. Thanks for your series! > For testing, I've only run the code on x86. If an x86->foo compiler > exists in Debian, I've built defconfig. I'm relying on the buildbots > to tell me what I missed, and people who actually have the hardware to > tell me if it actually works. Seems to work fine on ARAnyM and qemu-system-m68k/virt, so Tested-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds