From: John Hubbard <jhubbard@nvidia.com>
To: Matt Sickler <Matt.Sickler@daktronics.com>,
Bharath Vedartham <linux.bhar@gmail.com>,
"ira.weiny@intel.com" <ira.weiny@intel.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"jglisse@redhat.com" <jglisse@redhat.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: kpc2000: Convert put_page() to put_user_page*()
Date: Mon, 15 Jul 2019 15:04:11 -0700 [thread overview]
Message-ID: <2278975b-6ea5-5417-eb0c-9d7debdf68ce@nvidia.com> (raw)
In-Reply-To: <82441723-f30e-5811-ab1c-dd9a4993d7df@nvidia.com>
On 7/15/19 3:01 PM, John Hubbard wrote:
> On 7/15/19 2:47 PM, Matt Sickler wrote:
...
> I agree: the PageReserved check looks unnecessary here, from my outside-the-kpc_2000-team
> perspective, anyway. Assuming that your analysis above is correct, you could collapse that
> whole think into just:
>
> @@ -211,17 +209,8 @@ void transfer_complete_cb(struct aio_cb_data *acd, size_t xfr_count, u32 flags)
> BUG_ON(acd->ldev == NULL);
> BUG_ON(acd->ldev->pldev == NULL);
>
> - for (i = 0 ; i < acd->page_count ; i++) {
> - if (!PageReserved(acd->user_pages[i])) {
> - set_page_dirty(acd->user_pages[i]);
> - }
> - }
> -
> dma_unmap_sg(&acd->ldev->pldev->dev, acd->sgt.sgl, acd->sgt.nents, acd->ldev->dir);
> -
> - for (i = 0 ; i < acd->page_count ; i++) {
> - put_page(acd->user_pages[i]);
> - }
> + put_user_pages_dirty(&acd->user_pages[i], acd->page_count);
Ahem, I typed too quickly. :) Please make that:
put_user_pages_dirty(acd->user_pages, acd->page_count);
thanks,
--
John Hubbard
NVIDIA
next prev parent reply other threads:[~2019-07-15 22:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 19:52 Bharath Vedartham
2019-07-15 20:14 ` John Hubbard
2019-07-15 20:52 ` Bharath Vedartham
2019-07-15 21:47 ` Matt Sickler
2019-07-15 22:01 ` John Hubbard
2019-07-15 22:04 ` John Hubbard [this message]
2019-07-16 10:28 ` Bharath Vedartham
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=2278975b-6ea5-5417-eb0c-9d7debdf68ce@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=Matt.Sickler@daktronics.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=jglisse@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux.bhar@gmail.com \
/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