[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.20.1603291549230.27602@blueforge.nvidia.com>
Date: Tue, 29 Mar 2016 15:58:30 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Jérôme Glisse <jglisse@...hat.com>
CC: <akpm@...ux-foundation.org>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
<joro@...tes.org>, Mel Gorman <mgorman@...e.de>,
"H. Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Johannes Weiner <jweiner@...hat.com>,
Larry Woodman <lwoodman@...hat.com>,
Rik van Riel <riel@...hat.com>,
Dave Airlie <airlied@...hat.com>,
Brendan Conoboy <blc@...hat.com>,
Joe Donohue <jdonohue@...hat.com>,
Christophe Harle <charle@...dia.com>,
Duncan Poole <dpoole@...dia.com>,
Sherry Cheung <SCheung@...dia.com>,
Subhash Gutti <sgutti@...dia.com>,
Mark Hairgrove <mhairgrove@...dia.com>,
Lucien Dunning <ldunning@...dia.com>,
Cameron Buschardt <cabuschardt@...dia.com>,
Arvind Gopalakrishnan <arvindg@...dia.com>,
Haggai Eran <haggaie@...lanox.com>,
Shachar Raindel <raindel@...lanox.com>,
Liran Liss <liranl@...lanox.com>,
Roland Dreier <roland@...estorage.com>,
Ben Sander <ben.sander@....com>,
Greg Stoner <Greg.Stoner@....com>,
John Bridgman <John.Bridgman@....com>,
Michael Mantor <Michael.Mantor@....com>,
Paul Blinzer <Paul.Blinzer@....com>,
Leonid Shamis <Leonid.Shamis@....com>,
Laurent Morichetti <Laurent.Morichetti@....com>,
Alexander Deucher <Alexander.Deucher@....com>,
Jatin Kumar <jakumar@...dia.com>
Subject: Re: [PATCH v12 07/29] HMM: add per mirror page table v4.
On Tue, 8 Mar 2016, Jérôme Glisse wrote:
> This patch add the per mirror page table. It also propagate CPU page
> table update to this per mirror page table using mmu_notifier callback.
> All update are contextualized with an HMM event structure that convey
> all information needed by device driver to take proper actions (update
> its own mmu to reflect changes and schedule proper flushing).
>
> Core HMM is responsible for updating the per mirror page table once
> the device driver is done with its update. Most importantly HMM will
> properly propagate HMM page table dirty bit to underlying page.
>
> Changed since v1:
> - Removed unused fence code to defer it to latter patches.
>
> Changed since v2:
> - Use new bit flag helper for mirror page table manipulation.
> - Differentiate fork event with HMM_FORK from other events.
>
> Changed since v3:
> - Get rid of HMM_ISDIRTY and rely on write protect instead.
> - Adapt to HMM page table changes
>
> Signed-off-by: Jérôme Glisse <jglisse@...hat.com>
> Signed-off-by: Sherry Cheung <SCheung@...dia.com>
> Signed-off-by: Subhash Gutti <sgutti@...dia.com>
> Signed-off-by: Mark Hairgrove <mhairgrove@...dia.com>
> Signed-off-by: John Hubbard <jhubbard@...dia.com>
> Signed-off-by: Jatin Kumar <jakumar@...dia.com>
> ---
> include/linux/hmm.h | 83 ++++++++++++++++++++
> mm/hmm.c | 221 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 304 insertions(+)
>
> diff --git a/include/linux/hmm.h b/include/linux/hmm.h
> index b559c0b..5488fa9 100644
> --- a/include/linux/hmm.h
> +++ b/include/linux/hmm.h
> @@ -46,6 +46,7 @@
> #include <linux/mmu_notifier.h>
> #include <linux/workqueue.h>
> #include <linux/mman.h>
> +#include <linux/hmm_pt.h>
>
>
> struct hmm_device;
> @@ -53,6 +54,38 @@ struct hmm_mirror;
> struct hmm;
>
>
> +/*
> + * hmm_event - each event is described by a type associated with a struct.
> + */
> +enum hmm_etype {
> + HMM_NONE = 0,
> + HMM_FORK,
> + HMM_MIGRATE,
> + HMM_MUNMAP,
> + HMM_DEVICE_RFAULT,
> + HMM_DEVICE_WFAULT,
Hi Jerome,
Just a tiny thing I noticed, while connecting HMM to NVIDIA's upcoming
device driver: the last two enum items above should probably be named
like this:
HMM_DEVICE_READ_FAULT,
HMM_DEVICE_WRITE_FAULT,
instead of _WFAULT / _RFAULT. (Earlier code reviewers asked for more
clarity on these types of names.)
thanks,
John Hubbard
> + HMM_WRITE_PROTECT,
> +};
> +
Powered by blists - more mailing lists