On 09/12/2020 08:33, Christoph Hellwig wrote:
> On Thu, Dec 03, 2020 at 11:48:56AM +, Pavel Begunkov wrote:
>> It's inlined and the on-stack iter is completely optimised out. Frankly,
>> I'd rather not open-code bvec_iter_advance(), at least for this chunk to
>> be findable from bvec.h, e.g. gr
On Thu, Dec 03, 2020 at 11:48:56AM +, Pavel Begunkov wrote:
> It's inlined and the on-stack iter is completely optimised out. Frankly,
> I'd rather not open-code bvec_iter_advance(), at least for this chunk to
> be findable from bvec.h, e.g. grep bvec_iter and bvec_for_each. Though,
> I don't l
On 03/12/2020 09:14, Christoph Hellwig wrote:
>> @@ -1077,6 +1077,20 @@ void iov_iter_advance(struct iov_iter *i, size_t size)
>> i->count -= size;
>> return;
>> }
>> +if (iov_iter_is_bvec(i)) {
>> +struct bvec_iter bi;
>> +
>> +bi.bi_size
> @@ -1077,6 +1077,20 @@ void iov_iter_advance(struct iov_iter *i, size_t size)
> i->count -= size;
> return;
> }
> + if (iov_iter_is_bvec(i)) {
> + struct bvec_iter bi;
> +
> + bi.bi_size = i->count;
> + bi.bi_bvec_done = i-
iov_iter_advance() is heavily used, but implemented through generic
iteration. As bvecs have a specifically crafted advance() function, i.e.
bvec_iter_advance(), which is faster and slimmer, use it instead.
Signed-off-by: Pavel Begunkov
---
lib/iov_iter.c | 14 ++
1 file changed, 14
5 matches
Mail list logo