Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-13 Thread Jerome Glisse
On Wed, Mar 13, 2019 at 09:06:04AM -0700, Andrew Morton wrote: > On Tue, 12 Mar 2019 20:10:19 -0400 Jerome Glisse wrote: > > > > You're correct. We chose to go this way because the HMM code is so > > > large and all-over-the-place that developing it in a standalone tree > > > seemed impractical

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-13 Thread Andrew Morton
On Tue, 12 Mar 2019 20:10:19 -0400 Jerome Glisse wrote: > > You're correct. We chose to go this way because the HMM code is so > > large and all-over-the-place that developing it in a standalone tree > > seemed impractical - better to feed it into mainline piecewise. > > > > This decision very

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Dan Williams
On Tue, Mar 12, 2019 at 1:34 PM Dave Chinner wrote: > > On Tue, Mar 12, 2019 at 12:30:52PM -0700, Dan Williams wrote: > > On Tue, Mar 12, 2019 at 12:06 PM Jerome Glisse wrote: > > > On Tue, Mar 12, 2019 at 09:06:12AM -0700, Dan Williams wrote: > > > > On Tue, Mar 12, 2019 at 8:26 AM Jerome

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Jerome Glisse
On Tue, Mar 12, 2019 at 05:46:51PM -0700, Dan Williams wrote: > On Tue, Mar 12, 2019 at 5:10 PM Jerome Glisse wrote: > > > > On Tue, Mar 12, 2019 at 02:52:14PM -0700, Andrew Morton wrote: > > > On Tue, 12 Mar 2019 12:30:52 -0700 Dan Williams > > > wrote: > > > > > > > On Tue, Mar 12, 2019 at

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Dan Williams
On Tue, Mar 12, 2019 at 5:10 PM Jerome Glisse wrote: > > On Tue, Mar 12, 2019 at 02:52:14PM -0700, Andrew Morton wrote: > > On Tue, 12 Mar 2019 12:30:52 -0700 Dan Williams > > wrote: > > > > > On Tue, Mar 12, 2019 at 12:06 PM Jerome Glisse wrote: > > > > On Tue, Mar 12, 2019 at 09:06:12AM

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Jerome Glisse
On Tue, Mar 12, 2019 at 02:52:14PM -0700, Andrew Morton wrote: > On Tue, 12 Mar 2019 12:30:52 -0700 Dan Williams > wrote: > > > On Tue, Mar 12, 2019 at 12:06 PM Jerome Glisse wrote: > > > On Tue, Mar 12, 2019 at 09:06:12AM -0700, Dan Williams wrote: > > > > On Tue, Mar 12, 2019 at 8:26 AM

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Andrew Morton
On Tue, 12 Mar 2019 12:30:52 -0700 Dan Williams wrote: > On Tue, Mar 12, 2019 at 12:06 PM Jerome Glisse wrote: > > On Tue, Mar 12, 2019 at 09:06:12AM -0700, Dan Williams wrote: > > > On Tue, Mar 12, 2019 at 8:26 AM Jerome Glisse wrote: > [..] > > > > Spirit of the rule is better than blind

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Dave Chinner
On Tue, Mar 12, 2019 at 12:30:52PM -0700, Dan Williams wrote: > On Tue, Mar 12, 2019 at 12:06 PM Jerome Glisse wrote: > > On Tue, Mar 12, 2019 at 09:06:12AM -0700, Dan Williams wrote: > > > On Tue, Mar 12, 2019 at 8:26 AM Jerome Glisse wrote: > [..] > > > > Spirit of the rule is better than

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Dan Williams
On Tue, Mar 12, 2019 at 12:06 PM Jerome Glisse wrote: > On Tue, Mar 12, 2019 at 09:06:12AM -0700, Dan Williams wrote: > > On Tue, Mar 12, 2019 at 8:26 AM Jerome Glisse wrote: [..] > > > Spirit of the rule is better than blind application of rule. > > > > Again, I fail to see why HMM is suddenly

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Jerome Glisse
On Tue, Mar 12, 2019 at 09:06:12AM -0700, Dan Williams wrote: > On Tue, Mar 12, 2019 at 8:26 AM Jerome Glisse wrote: > > > > On Mon, Mar 11, 2019 at 08:13:53PM -0700, Dan Williams wrote: > > > On Thu, Mar 7, 2019 at 10:56 AM Jerome Glisse wrote: > > > > > > > > On Thu, Mar 07, 2019 at 09:46:54AM

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Dan Williams
On Tue, Mar 12, 2019 at 8:26 AM Jerome Glisse wrote: > > On Mon, Mar 11, 2019 at 08:13:53PM -0700, Dan Williams wrote: > > On Thu, Mar 7, 2019 at 10:56 AM Jerome Glisse wrote: > > > > > > On Thu, Mar 07, 2019 at 09:46:54AM -0800, Andrew Morton wrote: > > > > On Tue, 5 Mar 2019 20:20:10 -0800 Dan

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-12 Thread Jerome Glisse
On Mon, Mar 11, 2019 at 08:13:53PM -0700, Dan Williams wrote: > On Thu, Mar 7, 2019 at 10:56 AM Jerome Glisse wrote: > > > > On Thu, Mar 07, 2019 at 09:46:54AM -0800, Andrew Morton wrote: > > > On Tue, 5 Mar 2019 20:20:10 -0800 Dan Williams > > > wrote: > > > > > > > My hesitation would be

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-11 Thread Dan Williams
On Thu, Mar 7, 2019 at 10:56 AM Jerome Glisse wrote: > > On Thu, Mar 07, 2019 at 09:46:54AM -0800, Andrew Morton wrote: > > On Tue, 5 Mar 2019 20:20:10 -0800 Dan Williams > > wrote: > > > > > My hesitation would be drastically reduced if there was a plan to > > > avoid dangling unconsumed

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-07 Thread Jerome Glisse
On Thu, Mar 07, 2019 at 09:46:54AM -0800, Andrew Morton wrote: > On Tue, 5 Mar 2019 20:20:10 -0800 Dan Williams > wrote: > > > My hesitation would be drastically reduced if there was a plan to > > avoid dangling unconsumed symbols and functionality. Specifically one > > or more of the following

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-07 Thread Andrew Morton
On Tue, 5 Mar 2019 20:20:10 -0800 Dan Williams wrote: > My hesitation would be drastically reduced if there was a plan to > avoid dangling unconsumed symbols and functionality. Specifically one > or more of the following suggestions: > > * EXPORT_SYMBOL_GPL on all exports to avoid a growing

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-06 Thread Jerome Glisse
On Wed, Mar 06, 2019 at 02:18:20PM -0800, Andrew Morton wrote: > On Wed, 6 Mar 2019 10:49:04 -0500 Jerome Glisse wrote: > > > On Tue, Mar 05, 2019 at 02:16:35PM -0800, Andrew Morton wrote: > > > On Wed, 30 Jan 2019 21:44:46 -0800 Dan Williams > > > wrote: > > > > > > > > > > > > > > Another

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-06 Thread Andrew Morton
On Wed, 6 Mar 2019 10:49:04 -0500 Jerome Glisse wrote: > On Tue, Mar 05, 2019 at 02:16:35PM -0800, Andrew Morton wrote: > > On Wed, 30 Jan 2019 21:44:46 -0800 Dan Williams > > wrote: > > > > > > > > > > > Another way to help allay these worries is commit to no new exports > > > > > without

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-06 Thread Dan Williams
On Wed, Mar 6, 2019 at 8:03 AM Jerome Glisse wrote: > > On Wed, Mar 06, 2019 at 07:57:30AM -0800, Dan Williams wrote: > > On Wed, Mar 6, 2019 at 7:51 AM Jerome Glisse wrote: > > > > > > On Tue, Mar 05, 2019 at 08:20:10PM -0800, Dan Williams wrote: > > > > On Tue, Mar 5, 2019 at 2:16 PM Andrew

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-06 Thread Jerome Glisse
On Wed, Mar 06, 2019 at 07:57:30AM -0800, Dan Williams wrote: > On Wed, Mar 6, 2019 at 7:51 AM Jerome Glisse wrote: > > > > On Tue, Mar 05, 2019 at 08:20:10PM -0800, Dan Williams wrote: > > > On Tue, Mar 5, 2019 at 2:16 PM Andrew Morton > > > wrote: > > > > > > > > On Wed, 30 Jan 2019 21:44:46

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-06 Thread Dan Williams
On Wed, Mar 6, 2019 at 7:51 AM Jerome Glisse wrote: > > On Tue, Mar 05, 2019 at 08:20:10PM -0800, Dan Williams wrote: > > On Tue, Mar 5, 2019 at 2:16 PM Andrew Morton > > wrote: > > > > > > On Wed, 30 Jan 2019 21:44:46 -0800 Dan Williams > > > wrote: > > > > > > > > > > > > > > Another way to

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-06 Thread Jerome Glisse
On Tue, Mar 05, 2019 at 08:20:10PM -0800, Dan Williams wrote: > On Tue, Mar 5, 2019 at 2:16 PM Andrew Morton > wrote: > > > > On Wed, 30 Jan 2019 21:44:46 -0800 Dan Williams > > wrote: > > > > > > > > > > > Another way to help allay these worries is commit to no new exports > > > > > without

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-06 Thread Jerome Glisse
On Tue, Mar 05, 2019 at 02:16:35PM -0800, Andrew Morton wrote: > On Wed, 30 Jan 2019 21:44:46 -0800 Dan Williams > wrote: > > > > > > > > Another way to help allay these worries is commit to no new exports > > > > without in-tree users. In general, that should go without saying for > > > > any

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-05 Thread Dan Williams
On Tue, Mar 5, 2019 at 2:16 PM Andrew Morton wrote: > > On Wed, 30 Jan 2019 21:44:46 -0800 Dan Williams > wrote: > > > > > > > > Another way to help allay these worries is commit to no new exports > > > > without in-tree users. In general, that should go without saying for > > > > any core

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-03-05 Thread Andrew Morton
On Wed, 30 Jan 2019 21:44:46 -0800 Dan Williams wrote: > > > > > Another way to help allay these worries is commit to no new exports > > > without in-tree users. In general, that should go without saying for > > > any core changes for new or future hardware. > > > > I always intend to have an

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-30 Thread Dan Williams
On Wed, Jan 30, 2019 at 8:17 PM Jerome Glisse wrote: > On Wed, Jan 30, 2019 at 07:28:12PM -0800, Dan Williams wrote: [..] > > > Again HMM API can evolve, i am happy to help with any such change, given > > > it provides benefit to either mm or device driver (ie changing the HMM > > > just for the

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-30 Thread Jerome Glisse
On Wed, Jan 30, 2019 at 07:28:12PM -0800, Dan Williams wrote: > On Wed, Jan 30, 2019 at 10:36 AM Jerome Glisse wrote: > [..] > > > > This > > > > is one of the motivation behind HMM ie have it as an impedence layer > > > > between mm and device drivers so that mm folks do not have to under- > > >

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-30 Thread Dan Williams
On Wed, Jan 30, 2019 at 10:36 AM Jerome Glisse wrote: [..] > > > This > > > is one of the motivation behind HMM ie have it as an impedence layer > > > between mm and device drivers so that mm folks do not have to under- > > > stand every single device driver but only have to understand the > > >

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-30 Thread Jerome Glisse
On Wed, Jan 30, 2019 at 09:25:21AM -0800, Dan Williams wrote: > On Tue, Jan 29, 2019 at 7:03 PM Jerome Glisse wrote: > [..] > > > > 1) Convert ODP to use HMM underneath so that we share code between > > > > infiniband ODP and GPU drivers. ODP do support DAX today so i can > > > > not

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-30 Thread Dan Williams
On Tue, Jan 29, 2019 at 7:03 PM Jerome Glisse wrote: [..] > > > 1) Convert ODP to use HMM underneath so that we share code between > > > infiniband ODP and GPU drivers. ODP do support DAX today so i can > > > not convert ODP to HMM without also supporting DAX in HMM otherwise > > >

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-29 Thread Jerome Glisse
On Tue, Jan 29, 2019 at 06:32:56PM -0800, Dan Williams wrote: > On Tue, Jan 29, 2019 at 1:21 PM Jerome Glisse wrote: > > > > On Tue, Jan 29, 2019 at 12:51:25PM -0800, Dan Williams wrote: > > > On Tue, Jan 29, 2019 at 11:32 AM Jerome Glisse wrote: > > > > > > > > On Tue, Jan 29, 2019 at

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-29 Thread Dan Williams
On Tue, Jan 29, 2019 at 1:21 PM Jerome Glisse wrote: > > On Tue, Jan 29, 2019 at 12:51:25PM -0800, Dan Williams wrote: > > On Tue, Jan 29, 2019 at 11:32 AM Jerome Glisse wrote: > > > > > > On Tue, Jan 29, 2019 at 10:41:23AM -0800, Dan Williams wrote: > > > > On Tue, Jan 29, 2019 at 8:54 AM

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-29 Thread Jerome Glisse
On Tue, Jan 29, 2019 at 12:51:25PM -0800, Dan Williams wrote: > On Tue, Jan 29, 2019 at 11:32 AM Jerome Glisse wrote: > > > > On Tue, Jan 29, 2019 at 10:41:23AM -0800, Dan Williams wrote: > > > On Tue, Jan 29, 2019 at 8:54 AM wrote: > > > > > > > > From: Jérôme Glisse > > > > > > > > This add

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-29 Thread Dan Williams
On Tue, Jan 29, 2019 at 11:32 AM Jerome Glisse wrote: > > On Tue, Jan 29, 2019 at 10:41:23AM -0800, Dan Williams wrote: > > On Tue, Jan 29, 2019 at 8:54 AM wrote: > > > > > > From: Jérôme Glisse > > > > > > This add support to mirror vma which is an mmap of a file which is on > > > a filesystem

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-29 Thread Jerome Glisse
On Tue, Jan 29, 2019 at 10:41:23AM -0800, Dan Williams wrote: > On Tue, Jan 29, 2019 at 8:54 AM wrote: > > > > From: Jérôme Glisse > > > > This add support to mirror vma which is an mmap of a file which is on > > a filesystem that using a DAX block device. There is no reason not to > > support

Re: [PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-29 Thread Dan Williams
On Tue, Jan 29, 2019 at 8:54 AM wrote: > > From: Jérôme Glisse > > This add support to mirror vma which is an mmap of a file which is on > a filesystem that using a DAX block device. There is no reason not to > support that case. > The reason not to support it would be if it gets in the way of

[PATCH 09/10] mm/hmm: allow to mirror vma of a file on a DAX backed filesystem

2019-01-29 Thread jglisse
From: Jérôme Glisse This add support to mirror vma which is an mmap of a file which is on a filesystem that using a DAX block device. There is no reason not to support that case. Note that unlike GUP code we do not take page reference hence when we back-off we have nothing to undo.