Linux Kernel Mentees list
 help / color / mirror / Atom feed
From: mhocko at kernel.org (Michal Hocko)
Subject: [Linux-kernel-mentees] [PATCH v6 1/2] sgi-gru: Convert put_page() to put_user_page*()
Date: Tue, 20 Aug 2019 10:18:20 +0200	[thread overview]
Message-ID: <20190820081820.GI3111@dhcp22.suse.cz> (raw)
In-Reply-To: <0c2ad29b-934c-ec30-66c3-b153baf1fba5@nvidia.com>

On Mon 19-08-19 12:30:18, John Hubbard wrote:
> On 8/19/19 12:06 PM, Bharath Vedartham wrote:
> > On Mon, Aug 19, 2019 at 07:56:11AM -0500, Dimitri Sivanich wrote:
> > > Reviewed-by: Dimitri Sivanich <sivanich at hpe.com>
> > Thanks!
> > 
> > John, would you like to take this patch into your miscellaneous
> > conversions patch set?
> > 
> 
> (+Andrew and Michal, so they know where all this is going.)
> 
> Sure, although that conversion series [1] is on a brief hold, because
> there are additional conversions desired, and the API is still under
> discussion. Also, reading between the lines of Michal's response [2]
> about it, I think people would prefer that the next revision include
> the following, for each conversion site:
> 
> Conversion of gup/put_page sites:
> 
> Before:
> 
> 	get_user_pages(...);
> 	...
> 	for each page:
> 		put_page();
> 
> After:
> 	
> 	gup_flags |= FOLL_PIN; (maybe FOLL_LONGTERM in some cases)
> 	vaddr_pin_user_pages(...gup_flags...)

I was hoping that FOLL_PIN would be handled by vaddr_pin_user_pages.

> 	...
> 	vaddr_unpin_user_pages(); /* which invokes put_user_page() */
> 
> Fortunately, it's not harmful for the simpler conversion from put_page()
> to put_user_page() to happen first, and in fact those have usually led
> to simplifications, paving the way to make it easier to call
> vaddr_unpin_user_pages(), once it's ready. (And showing exactly what
> to convert, too.)

If that makes the later conversion easier then no real objections from
me. Assuming that the current put_user_page conversions are correct of
course (I have the mlock one and potentials that falls into the same
category in mind).
-- 
Michal Hocko
SUSE Labs

WARNING: multiple messages have this Message-ID (diff)
From: mhocko@kernel.org (Michal Hocko)
Subject: [Linux-kernel-mentees] [PATCH v6 1/2] sgi-gru: Convert put_page() to put_user_page*()
Date: Tue, 20 Aug 2019 10:18:20 +0200	[thread overview]
Message-ID: <20190820081820.GI3111@dhcp22.suse.cz> (raw)
Message-ID: <20190820081820.nFFHXMM59gPvTzUU4S_-bnvkrmGku0mNAJfMkUg8gr0@z> (raw)
In-Reply-To: <0c2ad29b-934c-ec30-66c3-b153baf1fba5@nvidia.com>

On Mon 19-08-19 12:30:18, John Hubbard wrote:
> On 8/19/19 12:06 PM, Bharath Vedartham wrote:
> > On Mon, Aug 19, 2019 at 07:56:11AM -0500, Dimitri Sivanich wrote:
> > > Reviewed-by: Dimitri Sivanich <sivanich at hpe.com>
> > Thanks!
> > 
> > John, would you like to take this patch into your miscellaneous
> > conversions patch set?
> > 
> 
> (+Andrew and Michal, so they know where all this is going.)
> 
> Sure, although that conversion series [1] is on a brief hold, because
> there are additional conversions desired, and the API is still under
> discussion. Also, reading between the lines of Michal's response [2]
> about it, I think people would prefer that the next revision include
> the following, for each conversion site:
> 
> Conversion of gup/put_page sites:
> 
> Before:
> 
> 	get_user_pages(...);
> 	...
> 	for each page:
> 		put_page();
> 
> After:
> 	
> 	gup_flags |= FOLL_PIN; (maybe FOLL_LONGTERM in some cases)
> 	vaddr_pin_user_pages(...gup_flags...)

I was hoping that FOLL_PIN would be handled by vaddr_pin_user_pages.

> 	...
> 	vaddr_unpin_user_pages(); /* which invokes put_user_page() */
> 
> Fortunately, it's not harmful for the simpler conversion from put_page()
> to put_user_page() to happen first, and in fact those have usually led
> to simplifications, paving the way to make it easier to call
> vaddr_unpin_user_pages(), once it's ready. (And showing exactly what
> to convert, too.)

If that makes the later conversion easier then no real objections from
me. Assuming that the current put_user_page conversions are correct of
course (I have the mlock one and potentials that falls into the same
category in mind).
-- 
Michal Hocko
SUSE Labs

  parent reply	other threads:[~2019-08-20  8:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-18 19:38 [Linux-kernel-mentees] [PATCH v6 0/2] get_user_pages changes linux.bhar
2019-08-18 19:38 ` Bharath Vedartham
2019-08-18 19:38 ` [Linux-kernel-mentees] [PATCH v6 1/2] sgi-gru: Convert put_page() to put_user_page*() linux.bhar
2019-08-18 19:38   ` Bharath Vedartham
2019-08-18 19:51   ` linux.bhar
2019-08-18 19:51     ` Bharath Vedartham
2019-08-19 12:56   ` sivanich
2019-08-19 12:56     ` Dimitri Sivanich
2019-08-19 19:06     ` linux.bhar
2019-08-19 19:06       ` Bharath Vedartham
2019-08-19 19:30       ` jhubbard
2019-08-19 19:30         ` John Hubbard
2019-08-20  8:18         ` mhocko [this message]
2019-08-20  8:18           ` Michal Hocko
2019-08-20 20:50           ` jhubbard
2019-08-20 20:50             ` John Hubbard
2019-08-20 16:24         ` linux.bhar
2019-08-20 16:24           ` Bharath Vedartham
2019-08-18 19:38 ` [Linux-kernel-mentees] [PATCH 2/2] sgi-gru: Remove uneccessary ifdef for CONFIG_HUGETLB_PAGE linux.bhar
2019-08-18 19:38   ` Bharath Vedartham
2019-08-18 19:51   ` linux.bhar
2019-08-18 19:51     ` Bharath Vedartham
2019-08-19 13:00   ` sivanich
2019-08-19 13:00     ` Dimitri Sivanich
2019-08-19 19:07     ` linux.bhar
2019-08-19 19:07       ` 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=20190820081820.GI3111@dhcp22.suse.cz \
    --to=linux-kernel-mentees@lists.linux-foundation.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