linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2 3/3] sgi-gru: Use __get_user_pages_fast in atomic_pte_lookup
@ 2019-07-24 16:09 Christoph Hellwig
  2019-07-24 19:34 ` Bharath Vedartham
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2019-07-24 16:09 UTC (permalink / raw)
  To: Bharath Vedartham
  Cc: sivanich, arnd, jhubbard, ira.weiny, jglisse, gregkh,
	william.kucharski, linux-kernel, linux-mm

I think the atomic_pte_lookup / non_atomic_pte_lookup helpers
should simply go away.  Most of the setup code is common now and should
be in the caller where it can be shared.  Then just do a:

	if (atomic) {
		__get_user_pages_fast()
	} else {
		get_user_pages_fast();
	}

and we actually have an easy to understand piece of code.

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH v2 0/3] sgi-gru: get_user_page changes
@ 2019-07-24 11:41 Bharath Vedartham
  2019-07-24 11:41 ` [PATCH v2 3/3] sgi-gru: Use __get_user_pages_fast in atomic_pte_lookup Bharath Vedartham
  0 siblings, 1 reply; 3+ messages in thread
From: Bharath Vedartham @ 2019-07-24 11:41 UTC (permalink / raw)
  To: sivanich, arnd, jhubbard
  Cc: ira.weiny, jglisse, gregkh, william.kucharski, linux-kernel,
	linux-mm, Bharath Vedartham

This is version 2 of the patch series with a few non-functional changes.
Changes are described in the individual changelog.

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 | 73 ++++++++++++++---------------------------
 1 file changed, 24 insertions(+), 49 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-24 20:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 16:09 [PATCH v2 3/3] sgi-gru: Use __get_user_pages_fast in atomic_pte_lookup Christoph Hellwig
2019-07-24 19:34 ` Bharath Vedartham
  -- strict thread matches above, loose matches on Subject: below --
2019-07-24 11:41 [PATCH v2 0/3] sgi-gru: get_user_page changes Bharath Vedartham
2019-07-24 11:41 ` [PATCH v2 3/3] sgi-gru: Use __get_user_pages_fast in atomic_pte_lookup Bharath Vedartham

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).