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 601FFC433EF for ; Thu, 21 Apr 2022 17:22:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BADB66B0072; Thu, 21 Apr 2022 13:22:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B5C6D6B0073; Thu, 21 Apr 2022 13:22:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FD326B0074; Thu, 21 Apr 2022 13:22:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 8DDA76B0072 for ; Thu, 21 Apr 2022 13:22:54 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5C6A2375B for ; Thu, 21 Apr 2022 17:22:54 +0000 (UTC) X-FDA: 79381556268.31.D6E42A6 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by imf09.hostedemail.com (Postfix) with ESMTP id 5ECF814001F for ; Thu, 21 Apr 2022 17:22:52 +0000 (UTC) Received: by mail-lf1-f44.google.com with SMTP id w19so9880549lfu.11 for ; Thu, 21 Apr 2022 10:22:53 -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=y/AfDMww0ycBxrjvRQwLCHmq5YuufUqn+uMvN5LmZDY=; b=eJ9tArgvEbb4NPhUtQvUKRhsT1d0d9SHze4TnuOVVIm+ZG8tDkcqYaIu03Fpl9hdOG I0dLGKvUNniBBsOcYBUNHpO2BcjoONm6oWxDq25iThwDJ5Nd3KFjFKinZ5BREBOgqn/7 gZ5GmykMh/JFqZ17wisI6dOcFGCwNNv6dnJiY= 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=y/AfDMww0ycBxrjvRQwLCHmq5YuufUqn+uMvN5LmZDY=; b=6hUYeF414Lwvsqp3Ug0N7dzUmQ9XPm09CGpV9EvUCCvc8DHxg3OADnRHYqhve/jyF2 IWkeDp/7eYSoxnag9Sh7HeDlYvIgH5KPXNODPH+eUIweRHyTQg1hPrZ99czzbdOCwrHk PNI7KSQ/R6qAYSF7SicgXpMTSQrdvYqMXVNLemHJYcwHWrOX1PoRqKf74gINAHRGajqt AlhPidFXXK3pmedZb5x50c6tY6BqVO8AnyoXiF2DoCZIZosEgeH/dkFU5Sna5Vw7diai dkx5lGw68ZLpAi3o7xu/Ae06+THN9QJRph+/LGPX/wL/1LClqWGeGsXBDSlwXfvbKvI8 crzQ== X-Gm-Message-State: AOAM533rlPWAxdd0wT9zKoptfMdaqNrf0tXESm/KcVJi/Upt7Jwd4gIw jJOf9FgIre+3Zb5n1Sv5q69t7qzL/ABNv40Si8Y= X-Google-Smtp-Source: ABdhPJx6cZofzwNmCGlap/mGtcXcWU4M0sP5Q2PZD/prbCQ220TB+WgVek58Cn8wUMuOfgAi9TkUyg== X-Received: by 2002:a05:6512:31d6:b0:471:be25:422d with SMTP id j22-20020a05651231d600b00471be25422dmr306553lfe.583.1650561771981; Thu, 21 Apr 2022 10:22:51 -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 y6-20020a05651c020600b0024dd567d843sm619904ljn.35.2022.04.21.10.22.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Apr 2022 10:22:51 -0700 (PDT) Received: by mail-lf1-f41.google.com with SMTP id p12so4349684lfs.5 for ; Thu, 21 Apr 2022 10:22:49 -0700 (PDT) X-Received: by 2002:a05:6512:108b:b0:470:90b9:fb51 with SMTP id j11-20020a056512108b00b0047090b9fb51mr358743lfg.52.1650561768960; Thu, 21 Apr 2022 10:22:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Thu, 21 Apr 2022 10:22:32 -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=eJ9tArgv; dmarc=none; spf=pass (imf09.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.167.44 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 5ECF814001F X-Stat-Signature: yiakamof8ayyucus9iqusmtwtz5qn44q X-HE-Tag: 1650561772-991230 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 Thu, Apr 21, 2022 at 9:50 AM Linus Torvalds wrote: > > where that "read(..) = 16" is the important part. It correctly figured > out that it can only do 16 bytes (ok, 17, but we've always allowed the > user accessor functions to block). Bad choice of words - by "block" I meant "doing the accesses in blocks", in this case 64-bit words. Obviously the user accessors _also_ "block" in the sense of having to wait for page faults and IO. I think 'copy_{to,from}_user()' actually does go to the effort to try to do byte-exact results, though. In particular, see copy_user_handle_tail in arch/x86/lib/copy_user_64.S. But I think that we long ago ended up deciding it really wasn't worth doing it, and x86 ends up just going to unnecessary lengths for this case. Linus