linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joao Martins <joao.m.martins@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-rdma@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Doug Ledford <dledford@redhat.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH v4 0/4] mm/gup: page unpining improvements
Date: Thu, 18 Feb 2021 15:33:39 +0000	[thread overview]
Message-ID: <a5f7d591-f3aa-1a54-569c-bd1abcb99334@oracle.com> (raw)
In-Reply-To: <20210218072432.GA325423@infradead.org>

On 2/18/21 7:24 AM, Christoph Hellwig wrote:
> On Fri, Feb 12, 2021 at 01:08:39PM +0000, Joao Martins wrote:
>> Hey,
>>
>> This series improves page unpinning, with an eye on improving MR
>> deregistration for big swaths of memory (which is bound by the page
>> unpining), particularly:
> 
> Can you also take a look at the (bdev and iomap) direct I/O code to
> make use of this?  It should really help there, with a much wieder use
> than RDMA.
> 
Perhaps by bdev and iomap direct I/O using this, you were thinking to replace
bio_release_pages() which operates on bvecs and hence releasing contiguous pages
in a bvec at once? e.g. something like from this:

        bio_for_each_segment_all(bvec, bio, iter_all) {
                if (mark_dirty && !PageCompound(bvec->bv_page))
                        set_page_dirty_lock(bvec->bv_page);
                put_page(bvec->bv_page);
        }

(...) to this instead:

	bio_for_each_bvec_all(bvec, bio, i)
		unpin_user_page_range_dirty_lock(bvec->bv_page,
			DIV_ROUND_UP(bvec->bv_len, PAGE_SIZE),
			mark_dirty && !PageCompound(bvec->bv_page));


  reply	other threads:[~2021-02-18 15:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 13:08 [PATCH v4 0/4] mm/gup: page unpining improvements Joao Martins
2021-02-12 13:08 ` [PATCH v4 1/4] mm/gup: add compound page list iterator Joao Martins
2021-02-12 13:08 ` [PATCH v4 2/4] mm/gup: decrement head page once for group of subpages Joao Martins
2021-02-12 13:08 ` [PATCH v4 3/4] mm/gup: add a range variant of unpin_user_pages_dirty_lock() Joao Martins
2021-02-12 13:08 ` [PATCH v4 4/4] RDMA/umem: batch page unpin in __ib_umem_release() Joao Martins
2021-02-18  7:24 ` [PATCH v4 0/4] mm/gup: page unpining improvements Christoph Hellwig
2021-02-18 15:33   ` Joao Martins [this message]
2021-02-18 16:01     ` Joao Martins
2021-02-22  7:52     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5f7d591-f3aa-1a54-569c-bd1abcb99334@oracle.com \
    --to=joao.m.martins@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=dledford@redhat.com \
    --cc=hch@infradead.org \
    --cc=jgg@ziepe.ca \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).