From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758290AbcC2W6e (ORCPT ); Tue, 29 Mar 2016 18:58:34 -0400 Received: from hqemgate15.nvidia.com ([216.228.121.64]:5740 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753254AbcC2W6c (ORCPT ); Tue, 29 Mar 2016 18:58:32 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 29 Mar 2016 15:57:16 -0700 Date: Tue, 29 Mar 2016 15:58:30 -0700 From: John Hubbard To: =?ISO-8859-15?Q?J=E9r=F4me_Glisse?= CC: , , , Linus Torvalds , , Mel Gorman , "H. Peter Anvin" , Peter Zijlstra , Andrea Arcangeli , Johannes Weiner , Larry Woodman , Rik van Riel , Dave Airlie , Brendan Conoboy , Joe Donohue , Christophe Harle , Duncan Poole , Sherry Cheung , Subhash Gutti , Mark Hairgrove , Lucien Dunning , Cameron Buschardt , Arvind Gopalakrishnan , Haggai Eran , Shachar Raindel , Liran Liss , Roland Dreier , Ben Sander , Greg Stoner , John Bridgman , Michael Mantor , Paul Blinzer , Leonid Shamis , Laurent Morichetti , Alexander Deucher , Jatin Kumar Subject: Re: [PATCH v12 07/29] HMM: add per mirror page table v4. In-Reply-To: <1457469802-11850-8-git-send-email-jglisse@redhat.com> Message-ID: References: <1457469802-11850-1-git-send-email-jglisse@redhat.com> <1457469802-11850-8-git-send-email-jglisse@redhat.com> User-Agent: Alpine 2.20 (LNX 67 2015-01-07) X-NVConfidentiality: public MIME-Version: 1.0 X-Originating-IP: [172.17.160.221] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: multipart/mixed; boundary="296541600-260365134-1459292310=:27602" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --296541600-260365134-1459292310=:27602 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT 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 > Signed-off-by: Sherry Cheung > Signed-off-by: Subhash Gutti > Signed-off-by: Mark Hairgrove > Signed-off-by: John Hubbard > Signed-off-by: Jatin Kumar > --- > 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 > #include > #include > +#include > > > 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, > +}; > + --296541600-260365134-1459292310=:27602-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by kanga.kvack.org (Postfix) with ESMTP id 9D72A6B0005 for ; Tue, 29 Mar 2016 18:58:32 -0400 (EDT) Received: by mail-pa0-f41.google.com with SMTP id zm5so24977866pac.0 for ; Tue, 29 Mar 2016 15:58:32 -0700 (PDT) Received: from hqemgate15.nvidia.com (hqemgate15.nvidia.com. [216.228.121.64]) by mx.google.com with ESMTPS id z12si1475827pas.77.2016.03.29.15.58.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2016 15:58:31 -0700 (PDT) Date: Tue, 29 Mar 2016 15:58:30 -0700 From: John Hubbard Subject: Re: [PATCH v12 07/29] HMM: add per mirror page table v4. In-Reply-To: <1457469802-11850-8-git-send-email-jglisse@redhat.com> Message-ID: References: <1457469802-11850-1-git-send-email-jglisse@redhat.com> <1457469802-11850-8-git-send-email-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="296541600-260365134-1459292310=:27602" Sender: owner-linux-mm@kvack.org List-ID: To: =?ISO-8859-15?Q?J=E9r=F4me_Glisse?= Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , joro@8bytes.org, Mel Gorman , "H. Peter Anvin" , Peter Zijlstra , Andrea Arcangeli , Johannes Weiner , Larry Woodman , Rik van Riel , Dave Airlie , Brendan Conoboy , Joe Donohue , Christophe Harle , Duncan Poole , Sherry Cheung , Subhash Gutti , Mark Hairgrove , Lucien Dunning , Cameron Buschardt , Arvind Gopalakrishnan , Haggai Eran , Shachar Raindel , Liran Liss , Roland Dreier , Ben Sander , Greg Stoner , John Bridgman , Michael Mantor , Paul Blinzer , Leonid Shamis , Laurent Morichetti , Alexander Deucher , Jatin Kumar --296541600-260365134-1459292310=:27602 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT On Tue, 8 Mar 2016, JA(C)rA'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: JA(C)rA'me Glisse > Signed-off-by: Sherry Cheung > Signed-off-by: Subhash Gutti > Signed-off-by: Mark Hairgrove > Signed-off-by: John Hubbard > Signed-off-by: Jatin Kumar > --- > 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 > #include > #include > +#include > > > 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, > +}; > + --296541600-260365134-1459292310=:27602-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org