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 BAB65C433EF for ; Wed, 13 Apr 2022 16:41:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5680F6B0072; Wed, 13 Apr 2022 12:41:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 517946B0073; Wed, 13 Apr 2022 12:41:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3E1326B0074; Wed, 13 Apr 2022 12:41:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 2F2E86B0072 for ; Wed, 13 Apr 2022 12:41:33 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 03C982278B for ; Wed, 13 Apr 2022 16:41:32 +0000 (UTC) X-FDA: 79352421666.13.62700E5 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf22.hostedemail.com (Postfix) with ESMTP id 6328DC0002 for ; Wed, 13 Apr 2022 16:41:32 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id D83DA68C7B; Wed, 13 Apr 2022 18:41:28 +0200 (CEST) Date: Wed, 13 Apr 2022 18:41:28 +0200 From: Christoph Hellwig To: Andrew Morton Cc: Hugh Dickins , Christoph Hellwig , Chuck Lever III , Mark Hemment , Patrice CHOTARD , Mikulas Patocka , Lukas Czerner , "Darrick J. Wong" , "Jason A. Donenfeld" , Borislav Petkov , linux-mm@kvack.org, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, viro@zeniv.linux.org.uk Subject: Re: [PATCH] tmpfs: fix regressions from wider use of ZERO_PAGE Message-ID: <20220413164128.GD31487@lst.de> References: <9a978571-8648-e830-5735-1f4748ce2e30@google.com> <20220409050638.GB17755@lst.de> <20220412162221.7c55379548017bab61ea5103@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220412162221.7c55379548017bab61ea5103@linux-foundation.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Stat-Signature: s4wzthqrpkgj893i19nzxjzqjxetwdoy Authentication-Results: imf22.hostedemail.com; dkim=none; spf=none (imf22.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 6328DC0002 X-HE-Tag: 1649868092-94639 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 Tue, Apr 12, 2022 at 04:22:21PM -0700, Andrew Morton wrote: > On Fri, 8 Apr 2022 23:08:29 -0700 (PDT) Hugh Dickins wrote: > > > > > > > Either way I'd rather do this optimization in iov_iter_zero rather > > > than hiding it in tmpfs. > > > > Let's see what others say. I think we would all prefer clear_user() to be > > enhanced, and hack around it neither here in tmpfs nor in iov_iter_zero(). > > But that careful work won't get done by magic, nor by me. > > > > And iov_iter_zero() has to deal with a wider range of possibilities, > > when pulling in cache lines of ZERO_PAGE(0) will be less advantageous, > > than in tmpfs doing a large dd - the case I'm aiming not to regress here > > (tmpfs has been copying ZERO_PAGE(0) like this for years). > > We do need something to get 5.18 fixed. Christoph, do you think we > should proceed with this patch for 5.18? Well, let's queue it up then.