[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a01568b8-a10c-c260-a0fe-3161a8075dba@gmail.com>
Date: Sat, 7 Aug 2021 11:05:38 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs: optimise generic_write_check_limits()
On 8/6/21 2:28 PM, Matthew Wilcox wrote:
> On Fri, Aug 06, 2021 at 12:22:10PM +0100, Pavel Begunkov wrote:
>> Even though ->s_maxbytes is used by generic_write_check_limits() only in
>> case of O_LARGEFILE, the value is loaded unconditionally, which is heavy
>> and takes 4 indirect loads. Optimise it by not touching ->s_maxbytes,
>> if it's not going to be used.
>
> Is this "optimisation" actually worth anything? Look at how
> force_o_largefile() is used. I would suggest that on the vast majority
> of machines, O_LARGEFILE is always set.
Makes sense to leave it alone then, thanks
--
Pavel Begunkov
Powered by blists - more mailing lists