dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Run a dedicated hmm.git for 5.3
       [not found]                 ` <20190524064051.GA28855@infradead.org>
@ 2019-05-24 12:44                   ` Jason Gunthorpe
  2019-05-24 16:27                     ` Daniel Vetter
  2019-05-25 22:52                     ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Jason Gunthorpe @ 2019-05-24 12:44 UTC (permalink / raw)
  To: Christoph Hellwig, akpm, Dave Airlie, Linus Torvalds,
	Daniel Vetter
  Cc: Jerome Glisse, linux-kernel, linux-rdma, Leon Romanovsky,
	Doug Ledford, Artemy Kovalyov, Moni Shoua, Mike Marciniszyn,
	Kaike Wan, Dennis Dalessandro, linux-mm, dri-devel

On Thu, May 23, 2019 at 11:40:51PM -0700, Christoph Hellwig wrote:
> On Thu, May 23, 2019 at 04:10:38PM -0300, Jason Gunthorpe wrote:
> > 
> > On Thu, May 23, 2019 at 02:24:58PM -0400, Jerome Glisse wrote:
> > > I can not take mmap_sem in range_register, the READ_ONCE is fine and
> > > they are no race as we do take a reference on the hmm struct thus
> > 
> > Of course there are use after free races with a READ_ONCE scheme, I
> > shouldn't have to explain this.
> > 
> > If you cannot take the read mmap sem (why not?), then please use my
> > version and push the update to the driver through -mm..
> 
> I think it would really help if we queue up these changes in a git tree
> that can be pulled into the driver trees.  Given that you've been
> doing so much work to actually make it usable I'd nominate rdma for the
> "lead" tree.

Sure, I'm willing to do that. RDMA has experience successfully running
shared git trees with netdev. It can work very well, but requires
discipline and understanding of the limitations.

I really want to see the complete HMM solution from Jerome (ie the
kconfig fixes, arm64, api fixes, etc) in one cohesive view, not
forced to be sprinkled across multiple kernel releases to work around
a submission process/coordination problem.

Now that -mm merged the basic hmm API skeleton I think running like
this would get us quickly to the place we all want: comprehensive in tree
users of hmm.

Andrew, would this be acceptable to you?

Dave, would you be willing to merge a clean HMM tree into DRM if it is
required for DRM driver work in 5.3?

I'm fine to merge a tree like this for RDMA, we already do this
pattern with netdev.

Background: The issue that is motivating this is we want to make
changes to some of the API's for hmm, which mean changes in existing
DRM, changes in to-be-accepted RDMA code, and to-be-accepted DRM
driver code. Coordintating the mm/hmm.c, RDMA and DRM changes is best
done with the proven shared git tree pattern. As CH explains I would
run a clean/minimal hmm tree that can be merged into driver trees as
required, and I will commit to sending a PR to Linus for this tree
very early in the merge window so that driver PR's are 'clean'.

The tree will only contain uncontroversial hmm related commits, bug
fixes, etc.

Obviouisly I will also commit to providing review for patches flowing
through this tree.

Regards,
Jason
(rdma subsystem co-maintainer, FWIW)

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

* Re: RFC: Run a dedicated hmm.git for 5.3
  2019-05-24 12:44                   ` RFC: Run a dedicated hmm.git for 5.3 Jason Gunthorpe
@ 2019-05-24 16:27                     ` Daniel Vetter
  2019-05-24 16:53                       ` Jason Gunthorpe
  2019-05-25 22:52                     ` Andrew Morton
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2019-05-24 16:27 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Christoph Hellwig, akpm, Dave Airlie, Linus Torvalds,
	Daniel Vetter, Jerome Glisse, linux-kernel, linux-rdma,
	Leon Romanovsky, Doug Ledford, Artemy Kovalyov, Moni Shoua,
	Mike Marciniszyn, Kaike Wan, Dennis Dalessandro, linux-mm,
	dri-devel

On Fri, May 24, 2019 at 09:44:55AM -0300, Jason Gunthorpe wrote:
> On Thu, May 23, 2019 at 11:40:51PM -0700, Christoph Hellwig wrote:
> > On Thu, May 23, 2019 at 04:10:38PM -0300, Jason Gunthorpe wrote:
> > > 
> > > On Thu, May 23, 2019 at 02:24:58PM -0400, Jerome Glisse wrote:
> > > > I can not take mmap_sem in range_register, the READ_ONCE is fine and
> > > > they are no race as we do take a reference on the hmm struct thus
> > > 
> > > Of course there are use after free races with a READ_ONCE scheme, I
> > > shouldn't have to explain this.
> > > 
> > > If you cannot take the read mmap sem (why not?), then please use my
> > > version and push the update to the driver through -mm..
> > 
> > I think it would really help if we queue up these changes in a git tree
> > that can be pulled into the driver trees.  Given that you've been
> > doing so much work to actually make it usable I'd nominate rdma for the
> > "lead" tree.
> 
> Sure, I'm willing to do that. RDMA has experience successfully running
> shared git trees with netdev. It can work very well, but requires
> discipline and understanding of the limitations.
> 
> I really want to see the complete HMM solution from Jerome (ie the
> kconfig fixes, arm64, api fixes, etc) in one cohesive view, not
> forced to be sprinkled across multiple kernel releases to work around
> a submission process/coordination problem.
> 
> Now that -mm merged the basic hmm API skeleton I think running like
> this would get us quickly to the place we all want: comprehensive in tree
> users of hmm.
> 
> Andrew, would this be acceptable to you?
> 
> Dave, would you be willing to merge a clean HMM tree into DRM if it is
> required for DRM driver work in 5.3?
> 
> I'm fine to merge a tree like this for RDMA, we already do this
> pattern with netdev.
> 
> Background: The issue that is motivating this is we want to make
> changes to some of the API's for hmm, which mean changes in existing
> DRM, changes in to-be-accepted RDMA code, and to-be-accepted DRM
> driver code. Coordintating the mm/hmm.c, RDMA and DRM changes is best
> done with the proven shared git tree pattern. As CH explains I would
> run a clean/minimal hmm tree that can be merged into driver trees as
> required, and I will commit to sending a PR to Linus for this tree
> very early in the merge window so that driver PR's are 'clean'.
> 
> The tree will only contain uncontroversial hmm related commits, bug
> fixes, etc.
> 
> Obviouisly I will also commit to providing review for patches flowing
> through this tree.

Sure topic branch sounds fine, we do that all the time with various
subsystems all over. We have ready made scripts for topic branches and
applying pulls from all over, so we can even soak test everything in our
integration tree. In case there's conflicts or just to make sure
everything works, before we bake the topic branch into permanent history
(the main drm.git repo just can't be rebased, too much going on and too
many people involvd).

If Jerome is ok with wrestling with our scripting we could even pull these
updates in while the hmm.git tree is evolving.

Cheers, Daniel
(drm co-maintainer fwiw)
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: RFC: Run a dedicated hmm.git for 5.3
  2019-05-24 16:27                     ` Daniel Vetter
@ 2019-05-24 16:53                       ` Jason Gunthorpe
  2019-05-24 16:59                         ` Daniel Vetter
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2019-05-24 16:53 UTC (permalink / raw)
  To: Christoph Hellwig, akpm, Dave Airlie, Linus Torvalds,
	Jerome Glisse, linux-kernel, linux-rdma, Leon Romanovsky,
	Doug Ledford, Artemy Kovalyov, Moni Shoua, Mike Marciniszyn,
	Kaike Wan, Dennis Dalessandro, linux-mm, dri-devel

On Fri, May 24, 2019 at 06:27:09PM +0200, Daniel Vetter wrote:
> Sure topic branch sounds fine, we do that all the time with various
> subsystems all over. We have ready made scripts for topic branches and
> applying pulls from all over, so we can even soak test everything in our
> integration tree. In case there's conflicts or just to make sure
> everything works, before we bake the topic branch into permanent history
> (the main drm.git repo just can't be rebased, too much going on and too
> many people involvd).

We don't rebase rdma.git either for the same reasons and nor does
netdev

So the usual flow for a shared topic branch is also no-rebase -
testing/etc needs to be done before things get applied to it.

Cheers,
Jason

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

* Re: RFC: Run a dedicated hmm.git for 5.3
  2019-05-24 16:53                       ` Jason Gunthorpe
@ 2019-05-24 16:59                         ` Daniel Vetter
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2019-05-24 16:59 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Christoph Hellwig, Andrew Morton, Dave Airlie, Linus Torvalds,
	Jerome Glisse, Linux Kernel Mailing List, linux-rdma,
	Leon Romanovsky, Doug Ledford, Artemy Kovalyov, Moni Shoua,
	Mike Marciniszyn, Kaike Wan, Dennis Dalessandro, Linux MM,
	dri-devel

On Fri, May 24, 2019 at 6:53 PM Jason Gunthorpe <jgg@ziepe.ca> wrote:
>
> On Fri, May 24, 2019 at 06:27:09PM +0200, Daniel Vetter wrote:
> > Sure topic branch sounds fine, we do that all the time with various
> > subsystems all over. We have ready made scripts for topic branches and
> > applying pulls from all over, so we can even soak test everything in our
> > integration tree. In case there's conflicts or just to make sure
> > everything works, before we bake the topic branch into permanent history
> > (the main drm.git repo just can't be rebased, too much going on and too
> > many people involvd).
>
> We don't rebase rdma.git either for the same reasons and nor does
> netdev
>
> So the usual flow for a shared topic branch is also no-rebase -
> testing/etc needs to be done before things get applied to it.

Rebasing before it gets baked into any tree is still ok. And for
something like this we do need a test branch first, which might need a
fixup patch squashed in. On the drm side we have a drm-local
integration tree for this stuff (like linux-next, but without all the
other stuff that's not relevant for graphics). But yeah that's just
details, easy to figure out.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

* Re: RFC: Run a dedicated hmm.git for 5.3
  2019-05-24 12:44                   ` RFC: Run a dedicated hmm.git for 5.3 Jason Gunthorpe
  2019-05-24 16:27                     ` Daniel Vetter
@ 2019-05-25 22:52                     ` Andrew Morton
  2019-05-27 19:12                       ` Jason Gunthorpe
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2019-05-25 22:52 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Mike Marciniszyn, Doug Ledford, linux-mm, linux-rdma,
	Daniel Vetter, Dennis Dalessandro, linux-kernel, dri-devel,
	Kaike Wan, Christoph Hellwig, Leon Romanovsky, Jerome Glisse,
	Moni Shoua, Artemy Kovalyov, Dave Airlie, Linus Torvalds

On Fri, 24 May 2019 09:44:55 -0300 Jason Gunthorpe <jgg@ziepe.ca> wrote:

> Now that -mm merged the basic hmm API skeleton I think running like
> this would get us quickly to the place we all want: comprehensive in tree
> users of hmm.
> 
> Andrew, would this be acceptable to you?

Sure.  Please take care not to permit this to reduce the amount of
exposure and review which the core HMM pieces get.

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: RFC: Run a dedicated hmm.git for 5.3
  2019-05-25 22:52                     ` Andrew Morton
@ 2019-05-27 19:12                       ` Jason Gunthorpe
  2019-06-06 15:25                         ` Jason Gunthorpe
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2019-05-27 19:12 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, Dave Airlie, Linus Torvalds, Daniel Vetter,
	Jerome Glisse, linux-kernel, linux-rdma, Leon Romanovsky,
	Doug Ledford, Artemy Kovalyov, Moni Shoua, Mike Marciniszyn,
	Kaike Wan, Dennis Dalessandro, linux-mm, dri-devel

On Sat, May 25, 2019 at 03:52:10PM -0700, Andrew Morton wrote:
> On Fri, 24 May 2019 09:44:55 -0300 Jason Gunthorpe <jgg@ziepe.ca> wrote:
> 
> > Now that -mm merged the basic hmm API skeleton I think running like
> > this would get us quickly to the place we all want: comprehensive in tree
> > users of hmm.
> > 
> > Andrew, would this be acceptable to you?
> 
> Sure.  Please take care not to permit this to reduce the amount of
> exposure and review which the core HMM pieces get.

Certainly, thanks all

Jerome: I started a HMM branch on v5.2-rc2 in the rdma.git here:

git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=hmm

Please send a series with the initial cross tree stuff:
 - kconfig fixing patches
 - The full removal of all the 'temporary for merging' APIs
 - Fixing the API of hmm_range_register to accept a mirror

When these are ready I'll send a hmm PR to DRM so everyone is on the
same API page.

I'll also move the hugetlb patch that Andrew picked up into this git
so we don't have a merge conflict risk

In parallel let us also finish revising the mirror API and going
through the ODP stuff.

Regards,
Jason

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

* Re: RFC: Run a dedicated hmm.git for 5.3
  2019-05-27 19:12                       ` Jason Gunthorpe
@ 2019-06-06 15:25                         ` Jason Gunthorpe
  2019-06-06 19:53                           ` Stephen Rothwell
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Gunthorpe @ 2019-06-06 15:25 UTC (permalink / raw)
  To: Andrew Morton, Stephen Rothwell
  Cc: Christoph Hellwig, Dave Airlie, Linus Torvalds, Daniel Vetter,
	Jerome Glisse, linux-kernel@vger.kernel.org,
	linux-rdma@vger.kernel.org, Leon Romanovsky, Doug Ledford,
	Artemy Kovalyov, Moni Shoua, Mike Marciniszyn, Kaike Wan,
	Dennis Dalessandro, linux-mm@kvack.org, dri-devel

On Mon, May 27, 2019 at 04:12:47PM -0300, Jason Gunthorpe wrote:
> On Sat, May 25, 2019 at 03:52:10PM -0700, Andrew Morton wrote:
> > On Fri, 24 May 2019 09:44:55 -0300 Jason Gunthorpe <jgg@ziepe.ca> wrote:
> > 
> > > Now that -mm merged the basic hmm API skeleton I think running like
> > > this would get us quickly to the place we all want: comprehensive in tree
> > > users of hmm.
> > > 
> > > Andrew, would this be acceptable to you?
> > 
> > Sure.  Please take care not to permit this to reduce the amount of
> > exposure and review which the core HMM pieces get.
> 
> Certainly, thanks all
> 
> Jerome: I started a HMM branch on v5.2-rc2 in the rdma.git here:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
> https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=hmm

I did a first round of collecting patches for hmm.git

Andrew, I'm checking linux-next and to stay co-ordinated, I see the
patches below are in your tree and now also in hmm.git. Can you please
drop them from your tree? 

5b693741de2ace mm/hmm.c: suppress compilation warnings when CONFIG_HUGETLB_PAGE is not set
b2870fb882599a mm/hmm.c: only set FAULT_FLAG_ALLOW_RETRY for non-blocking
dff7babf8ae9f1 mm/hmm.c: support automatic NUMA balancing

I checked that the other two patches in -next also touching hmm.c are
best suited to go through your tree:

a76b9b318a7180 mm/devm_memremap_pages: fix final page put race
fc64c058d01b98 mm/memremap: rename and consolidate SECTION_SIZE

StephenR: Can you pick up the hmm branch from rdma.git for linux-next for
this cycle? As above we are moving the patches from -mm to hmm.git, so
there will be a conflict in -next until Andrew adjusts his tree,
thanks!

Regards,
Jason
(hashes are from today's linux-next)

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

* Re: RFC: Run a dedicated hmm.git for 5.3
  2019-06-06 15:25                         ` Jason Gunthorpe
@ 2019-06-06 19:53                           ` Stephen Rothwell
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Rothwell @ 2019-06-06 19:53 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Mike Marciniszyn, Doug Ledford, linux-mm@kvack.org,
	linux-rdma@vger.kernel.org, Daniel Vetter, Dennis Dalessandro,
	linux-kernel@vger.kernel.org, dri-devel, Kaike Wan,
	Christoph Hellwig, Leon Romanovsky, Jerome Glisse, Moni Shoua,
	Artemy Kovalyov, Dave Airlie, Andrew Morton, Linus Torvalds


[-- Attachment #1.1: Type: text/plain, Size: 2940 bytes --]

Hi Jason,

On Thu, 6 Jun 2019 15:25:49 +0000 Jason Gunthorpe <jgg@mellanox.com> wrote:
>
> On Mon, May 27, 2019 at 04:12:47PM -0300, Jason Gunthorpe wrote:
> > On Sat, May 25, 2019 at 03:52:10PM -0700, Andrew Morton wrote:  
> > > On Fri, 24 May 2019 09:44:55 -0300 Jason Gunthorpe <jgg@ziepe.ca> wrote:
> > >   
> > > > Now that -mm merged the basic hmm API skeleton I think running like
> > > > this would get us quickly to the place we all want: comprehensive in tree
> > > > users of hmm.
> > > > 
> > > > Andrew, would this be acceptable to you?  
> > > 
> > > Sure.  Please take care not to permit this to reduce the amount of
> > > exposure and review which the core HMM pieces get.  
> > 
> > Certainly, thanks all
> > 
> > Jerome: I started a HMM branch on v5.2-rc2 in the rdma.git here:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
> > https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=hmm  
> 
> I did a first round of collecting patches for hmm.git
> 
> Andrew, I'm checking linux-next and to stay co-ordinated, I see the
> patches below are in your tree and now also in hmm.git. Can you please
> drop them from your tree? 
> 
> 5b693741de2ace mm/hmm.c: suppress compilation warnings when CONFIG_HUGETLB_PAGE is not set
> b2870fb882599a mm/hmm.c: only set FAULT_FLAG_ALLOW_RETRY for non-blocking
> dff7babf8ae9f1 mm/hmm.c: support automatic NUMA balancing
> 
> I checked that the other two patches in -next also touching hmm.c are
> best suited to go through your tree:
> 
> a76b9b318a7180 mm/devm_memremap_pages: fix final page put race
> fc64c058d01b98 mm/memremap: rename and consolidate SECTION_SIZE
> 
> StephenR: Can you pick up the hmm branch from rdma.git for linux-next for
> this cycle? As above we are moving the patches from -mm to hmm.git, so
> there will be a conflict in -next until Andrew adjusts his tree,
> thanks!

I have added the hmm branch from today with currently just you as the
contact.  I also removed the three commits above from Andrew's tree.

Thanks for adding your subsystem tree as a participant of linux-next.  As
you may know, this is not a judgement of your code.  The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window. 

You will need to ensure that the patches/commits in your tree/series have
been:
     * submitted under GPL v2 (or later) and include the Contributor's
        Signed-off-by,
     * posted to the relevant mailing list,
     * reviewed by you (or another maintainer of your subsystem tree),
     * successfully unit tested, and 
     * destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him
to fetch).  It is allowed to be rebased if you deem it necessary.

-- 
Cheers,
Stephen Rothwell 
sfr@canb.auug.org.au

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-06-06 19:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190522235737.GD15389@ziepe.ca>
     [not found] ` <20190523150432.GA5104@redhat.com>
     [not found]   ` <20190523154149.GB12159@ziepe.ca>
     [not found]     ` <20190523155207.GC5104@redhat.com>
     [not found]       ` <20190523163429.GC12159@ziepe.ca>
     [not found]         ` <20190523173302.GD5104@redhat.com>
     [not found]           ` <20190523175546.GE12159@ziepe.ca>
     [not found]             ` <20190523182458.GA3571@redhat.com>
     [not found]               ` <20190523191038.GG12159@ziepe.ca>
     [not found]                 ` <20190524064051.GA28855@infradead.org>
2019-05-24 12:44                   ` RFC: Run a dedicated hmm.git for 5.3 Jason Gunthorpe
2019-05-24 16:27                     ` Daniel Vetter
2019-05-24 16:53                       ` Jason Gunthorpe
2019-05-24 16:59                         ` Daniel Vetter
2019-05-25 22:52                     ` Andrew Morton
2019-05-27 19:12                       ` Jason Gunthorpe
2019-06-06 15:25                         ` Jason Gunthorpe
2019-06-06 19:53                           ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox