[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4eb4a426-8180-ec2a-974b-2b8cdd5f285c@kernel.dk>
Date: Tue, 3 Dec 2019 07:37:04 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Pavel Begunkov <asml.silence@...il.com>, nivedita@...m.mit.edu,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] block: optimise bvec_iter_advance()
On 11/30/19 1:23 PM, Pavel Begunkov wrote:
> bvec_iter_advance() is quite popular, but compilers fail to do proper
> alias analysis and optimise it good enough. The assembly is checked
> for gcc 9.2, x86-64.
>
> - remove @iter->bi_size from min(...), as it's always less than @bytes.
> Modify at the beginning and forget about it.
>
> - the compiler isn't able to collapse memory dependencies and remove
> writes in the loop. Help it by explicitely using local vars.
Applied, thanks.
--
Jens Axboe
Powered by blists - more mailing lists