[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201209084005.GC21968@infradead.org>
Date: Wed, 9 Dec 2020 08:40:05 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: Jens Axboe <axboe@...nel.dk>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, io-uring@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Matthew Wilcox <willy@...radead.org>,
Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH 2/2] block: no-copy bvec for direct IO
> + /*
> + * In practice groups of pages tend to be accessed/reclaimed/refaulted
> + * together. To not go over bvec for those who didn't set BIO_WORKINGSET
> + * approximate it by looking at the first page and inducing it to the
> + * whole bio
> + */
> + if (unlikely(PageWorkingset(iter->bvec->bv_page)))
> + bio_set_flag(bio, BIO_WORKINGSET);
IIRC the feedback was that we do not need to deal with BIO_WORKINGSET
at all for direct I/O.
> + bio_set_flag(bio, BIO_NO_PAGE_REF);
> +
> + iter->count = 0;
> + return 0;
> +}
This helper should go into bio.c, next to bio_iov_iter_get_pages.
And please convert the other callers of bio_iov_iter_get_pages to this
scheme as well.
Powered by blists - more mailing lists