mbox series

[0/3] sgi-gru: get_user_page changes

Message ID 1563724685-6540-1-git-send-email-linux.bhar@gmail.com (mailing list archive)
Headers show
Series sgi-gru: get_user_page changes | expand

Message

Bharath Vedartham July 21, 2019, 3:58 p.m. UTC
This patch series incorporates a few changes in the get_user_page usage 
of sgi-gru.

The main change is the first patch, which is a trivial one line change to 
convert put_page to put_user_page to enable tracking of get_user_pages.

The second patch removes an uneccessary ifdef of CONFIG_HUGETLB.

The third patch adds __get_user_pages_fast in atomic_pte_lookup to retrive
a physical user page in an atomic context instead of manually walking up
the page tables like the current code does. This patch should be subject to 
more review from the gup people.

drivers/misc/sgi-gru/* builds after this patch series. But I do not have the 
hardware to verify these changes. 

The first patch implements gup tracking in the current code. This is to be tested
as to check whether gup tracking works properly. Currently, in the upstream kernels
put_user_page simply calls put_page. But that is to change in the future. 
Any suggestions as to how to test this code?

The implementation of gup tracking is in:
https://github.com/johnhubbard/linux/tree/gup_dma_core

We could test it by applying the first patch to the above tree and test it.

More details are in the individual changelogs.

Bharath Vedartham (3):
  sgi-gru: Convert put_page() to get_user_page*()
  sgi-gru: Remove CONFIG_HUGETLB_PAGE ifdef
  sgi-gru: Use __get_user_pages_fast in atomic_pte_lookup

 drivers/misc/sgi-gru/grufault.c | 50 +++++++----------------------------------
 1 file changed, 8 insertions(+), 42 deletions(-)

Comments

Ira Weiny July 22, 2019, 4:49 a.m. UTC | #1
On Sun, Jul 21, 2019 at 09:28:02PM +0530, Bharath Vedartham wrote:
> This patch series incorporates a few changes in the get_user_page usage 
> of sgi-gru.
> 
> The main change is the first patch, which is a trivial one line change to 
> convert put_page to put_user_page to enable tracking of get_user_pages.
> 
> The second patch removes an uneccessary ifdef of CONFIG_HUGETLB.
> 
> The third patch adds __get_user_pages_fast in atomic_pte_lookup to retrive
> a physical user page in an atomic context instead of manually walking up
> the page tables like the current code does. This patch should be subject to 
> more review from the gup people.
> 
> drivers/misc/sgi-gru/* builds after this patch series. But I do not have the 
> hardware to verify these changes. 
> 
> The first patch implements gup tracking in the current code. This is to be tested
> as to check whether gup tracking works properly. Currently, in the upstream kernels
> put_user_page simply calls put_page. But that is to change in the future. 
> Any suggestions as to how to test this code?
> 
> The implementation of gup tracking is in:
> https://github.com/johnhubbard/linux/tree/gup_dma_core
> 
> We could test it by applying the first patch to the above tree and test it.
> 
> More details are in the individual changelogs.
> 
> Bharath Vedartham (3):

I don't have an opinion on the second patch regarding any performance concerns
since I'm not familiar with this hardware.

But from a GUP POV For the series.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

>   sgi-gru: Convert put_page() to get_user_page*()
>   sgi-gru: Remove CONFIG_HUGETLB_PAGE ifdef
>   sgi-gru: Use __get_user_pages_fast in atomic_pte_lookup
> 
>  drivers/misc/sgi-gru/grufault.c | 50 +++++++----------------------------------
>  1 file changed, 8 insertions(+), 42 deletions(-)
> 
> -- 
> 2.7.4
>