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 43FB7C433EF for ; Tue, 12 Apr 2022 23:22:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 739B16B0072; Tue, 12 Apr 2022 19:22:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E9CA6B0073; Tue, 12 Apr 2022 19:22:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B2156B0074; Tue, 12 Apr 2022 19:22:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0022.hostedemail.com [216.40.44.22]) by kanga.kvack.org (Postfix) with ESMTP id 4C2686B0072 for ; Tue, 12 Apr 2022 19:22:25 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id E4476183E39A1 for ; Tue, 12 Apr 2022 23:22:24 +0000 (UTC) X-FDA: 79349803008.29.2167D1F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id 50E46140006 for ; Tue, 12 Apr 2022 23:22:24 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6E58E6124E; Tue, 12 Apr 2022 23:22:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9ADCAC385A1; Tue, 12 Apr 2022 23:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1649805743; bh=LhsrzMk77NQcPYdzCX5hauu5G7NVYwkJ4kIRPOYv+jk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OUPqbvxsOygFrdjKnucWtXRA6pZ58t4BbVh6aJItY6VIkO0ECkmgTLNww9ch3/54L /cgUn+gNN3s6PE28IRe52XAJ1cKjhDDVt6/4sGzmDIbG5elo2++1OewvsV5XqSxRYr Wea5kCBi12XMe7idooeG7FBpQy+8iPUMmt4Xga7M= Date: Tue, 12 Apr 2022 16:22:21 -0700 From: Andrew Morton To: Hugh Dickins Cc: 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: <20220412162221.7c55379548017bab61ea5103@linux-foundation.org> In-Reply-To: References: <9a978571-8648-e830-5735-1f4748ce2e30@google.com> <20220409050638.GB17755@lst.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: zc8e9rnjck5xb5tf9y11fp9qnhmskcy3 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 50E46140006 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=OUPqbvxs; dmarc=none; spf=pass (imf23.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspam-User: X-HE-Tag: 1649805744-897181 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, 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?