[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201120012017.GJ29991@casper.infradead.org>
Date: Fri, 20 Nov 2020 01:20:17 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: linux-fsdevel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] iov_iter: optimise iov_iter_npages for bvec
On Thu, Nov 19, 2020 at 11:24:38PM +0000, Pavel Begunkov wrote:
> The block layer spends quite a while in iov_iter_npages(), but for the
> bvec case the number of pages is already known and stored in
> iter->nr_segs, so it can be returned immediately as an optimisation
Er ... no, it doesn't. nr_segs is the number of bvecs. Each bvec can
store up to 4GB of contiguous physical memory.
Powered by blists - more mailing lists