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 4496DC433F5 for ; Wed, 4 May 2022 19:22:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2E3786B0071; Wed, 4 May 2022 15:22:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 26B246B0073; Wed, 4 May 2022 15:22:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BD666B0074; Wed, 4 May 2022 15:22:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EB6CC6B0071 for ; Wed, 4 May 2022 15:22:55 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id B6F881210B8 for ; Wed, 4 May 2022 19:22:55 +0000 (UTC) X-FDA: 79429033110.04.7CBCDE9 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by imf09.hostedemail.com (Postfix) with ESMTP id 74720140084 for ; Wed, 4 May 2022 19:22:49 +0000 (UTC) Received: by mail-lf1-f52.google.com with SMTP id bq30so4029656lfb.3 for ; Wed, 04 May 2022 12:22:54 -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=bl4DsFmDfwvhyMeIDRKZ+MZU2qUZebxraWgPXLtE/5g=; b=ehxpRxo5gzBoJTc0GfE/8H6JBEvsN6M2waqrFAfJM3/amRzGZehEE2yL+0HKx0b+YA Pz/CMNCNVd14jevagAbqkG3+IRSEWHA4sziJUQa39BkiZStOD//nwHtCgsaypxe8Qwgf E1zfjx06w4nHOO9Ci2X2WVJ0fo+jDmCYrlXn8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bl4DsFmDfwvhyMeIDRKZ+MZU2qUZebxraWgPXLtE/5g=; b=pDISQadcNDJV85OCv4ZombWAVIW7eNp3WI6IYAazM9vi417QXEKvE8P3J0bP0VIU8+ cTcQoRpikx05vNLnKlbINa2sRxIi1TCSnn2XS5QeQ1VzemFvAvQ2xaCEYtLKwqvuYxes RvrBNNgqaKBuHsutAzoe5fdEDUKW3xmpadzET0lUSlDJo1z32CA36F1hgii6whN6jwCj KDQEnja/AI5Jpl7/lIMqL/nGiab16Kktr51ZiVwsVTPv06fBBqSpOzbVuY0ssWE8MItM K5ZBMdkXuLr+UL1YeoqdbbNeJcD3pCLqft+2B012Di3ZaLrxte/4FAAu/J7P7OLhd65m PlXA== X-Gm-Message-State: AOAM533QGSf3X8zJzb4TUSwlDP1au+VW5RZ9Ov8t/SnO8ozZdwfEQMwj CBvwNIhchTxzdfkRDYzrbTiiwllEVMKtv7aaaJc= X-Google-Smtp-Source: ABdhPJx5W+EG6Imi/BsTEK5b4uU8XiyQqDsHnzJt/lQiZh6HTwtAZ2chL3o1Z7jBaYi7O9yWUYE1Kg== X-Received: by 2002:ac2:4e05:0:b0:473:a581:b937 with SMTP id e5-20020ac24e05000000b00473a581b937mr7087405lfr.56.1651692173212; Wed, 04 May 2022 12:22:53 -0700 (PDT) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id q3-20020a2e2a03000000b0024f3d1daee0sm1684949ljq.104.2022.05.04.12.22.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 May 2022 12:22:52 -0700 (PDT) Received: by mail-lf1-f46.google.com with SMTP id i10so3990167lfg.13 for ; Wed, 04 May 2022 12:22:51 -0700 (PDT) X-Received: by 2002:a05:6512:b12:b0:44a:ba81:f874 with SMTP id w18-20020a0565120b1200b0044aba81f874mr15622518lfu.449.1651692171026; Wed, 04 May 2022 12:22:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Wed, 4 May 2022 12:22:34 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 02/14] tmpfs: fix regressions from wider use of ZERO_PAGE To: Borislav Petkov Cc: Mark Hemment , Andrew Morton , "the arch/x86 maintainers" , Peter Zijlstra , patrice.chotard@foss.st.com, Mikulas Patocka , Lukas Czerner , Christoph Hellwig , "Darrick J. Wong" , Chuck Lever , Hugh Dickins , patches@lists.linux.dev, Linux-MM , mm-commits@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=ehxpRxo5; dmarc=none; spf=pass (imf09.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.52 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 74720140084 X-Rspam-User: X-Stat-Signature: 9ndtgighppqn4b3ai3xe6erk7oje77bq X-HE-Tag: 1651692169-985449 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 Wed, May 4, 2022 at 11:56 AM Borislav Petkov wrote: > > Just to update folks here: I haven't forgotten about this - Mel and I > are running some benchmarks first and staring at results to see whether > all the hoopla is even worth it. Side note: the "do FSRM inline" would likely be a really good thing for "copy_to_user()", more so than the silly "clear_user()" that we realistically do almost nowhere. I doubt you can find "clear_user()" outside of benchmarks (but hey, people do odd things). But "copy_to_user()" is everywhere, and the I$ advantage of inlining it might be noticeable on some real loads. I remember some git profiles having copy_to_user very high due to fstat(), for example - cp_new_stat64 and friends. Of course, I haven't profiled git in ages, but I doubt that has changed. Many of those kinds of loads are all about name lookup and stat (basic things like "make" would be that too, if it weren't for the fact that it spends a _lot_ of its time in user space string handling). The inlining advantage would obviously only show up on CPUs that actually do FSRM. Which I think is currently only Ice Lake. I don't have access to one. Linus