[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220409050638.GB17755@lst.de>
Date: Sat, 9 Apr 2022 07:06:38 +0200
From: Christoph Hellwig <hch@....de>
To: Hugh Dickins <hughd@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Chuck Lever III <chuck.lever@...cle.com>,
Mark Hemment <markhemm@...glemail.com>,
Patrice CHOTARD <patrice.chotard@...s.st.com>,
Mikulas Patocka <mpatocka@...hat.com>,
Lukas Czerner <lczerner@...hat.com>,
Christoph Hellwig <hch@....de>,
"Darrick J. Wong" <djwong@...nel.org>, linux-mm@...ck.org,
linux-nfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com, viro@...iv.linux.org.uk
Subject: Re: [PATCH] tmpfs: fix regressions from wider use of ZERO_PAGE
On Fri, Apr 08, 2022 at 01:38:41PM -0700, Hugh Dickins wrote:
> + } else if (iter_is_iovec(to)) {
> + /*
> + * Copy to user tends to be so well optimized, but
> + * clear_user() not so much, that it is noticeably
> + * faster to copy the zero page instead of clearing.
> + */
> + ret = copy_page_to_iter(ZERO_PAGE(0), offset, nr, to);
Is the offset and length guaranteed to be less than PAGE_SIZE here?
Either way I'd rather do this optimization in iov_iter_zero rather
than hiding it in tmpfs.
Powered by blists - more mailing lists