[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <66053b82-18d8-217a-b8fd-91981f66f512@nvidia.com>
Date: Wed, 14 Aug 2019 14:51:02 -0700
From: Ralph Campbell <rcampbell@...dia.com>
To: Jason Gunthorpe <jgg@...pe.ca>, <linux-mm@...ck.org>
CC: Andrea Arcangeli <aarcange@...hat.com>,
Christoph Hellwig <hch@....de>,
John Hubbard <jhubbard@...dia.com>,
Jérôme Glisse <jglisse@...hat.com>,
"Kuehling, Felix" <Felix.Kuehling@....com>,
"Alex Deucher" <alexander.deucher@....com>,
Christian König <christian.koenig@....com>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
Dimitri Sivanich <sivanich@....com>,
<dri-devel@...ts.freedesktop.org>, <amd-gfx@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
<iommu@...ts.linux-foundation.org>,
<intel-gfx@...ts.freedesktop.org>,
Gavin Shan <shangw@...ux.vnet.ibm.com>,
Andrea Righi <andrea@...terlinux.com>,
Jason Gunthorpe <jgg@...lanox.com>
Subject: Re: [PATCH v3 hmm 05/11] hmm: use mmu_notifier_get/put for 'struct
hmm'
On 8/6/19 4:15 PM, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg@...lanox.com>
>
> This is a significant simplification, it eliminates all the remaining
> 'hmm' stuff in mm_struct, eliminates krefing along the critical notifier
> paths, and takes away all the ugly locking and abuse of page_table_lock.
>
> mmu_notifier_get() provides the single struct hmm per struct mm which
> eliminates mm->hmm.
>
> It also directly guarantees that no mmu_notifier op callback is callable
> while concurrent free is possible, this eliminates all the krefs inside
> the mmu_notifier callbacks.
>
> The remaining krefs in the range code were overly cautious, drivers are
> already not permitted to free the mirror while a range exists.
>
> Signed-off-by: Jason Gunthorpe <jgg@...lanox.com>
Looks good.
Reviewed-by: Ralph Campbell <rcampbell@...dia.com>
Powered by blists - more mailing lists