[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191112234549.GX21728@mellanox.com>
Date: Tue, 12 Nov 2019 23:45:52 +0000
From: Jason Gunthorpe <jgg@...lanox.com>
To: Ralph Campbell <rcampbell@...dia.com>
CC: Christoph Hellwig <hch@....de>,
Andrew Morton <akpm@...ux-foundation.org>,
Jerome Glisse <jglisse@...hat.com>,
John Hubbard <jhubbard@...dia.com>,
Shuah Khan <shuah@...nel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v4 2/2] mm/hmm/test: add self tests for HMM
On Tue, Nov 12, 2019 at 01:51:11PM -0800, Ralph Campbell wrote:
> > > +static int dmirror_invalidate_range_start(struct mmu_notifier *mn,
> > > + const struct mmu_notifier_range *update)
> > > +{
> > > + struct dmirror *dmirror = container_of(mn, struct dmirror, notifier);
> > > +
> > > + if (mmu_notifier_range_blockable(update))
> > > + mutex_lock(&dmirror->mutex);
> > > + else if (!mutex_trylock(&dmirror->mutex))
> > > + return -EAGAIN;
> > > +
> > > + dmirror_do_update(dmirror, update->start, update->end);
> > > + mutex_unlock(&dmirror->mutex);
> > > + return 0;
> > > +}
> >
> > Can we adopts this to Jasons new interval tree invalidate?
>
> Well, it would mean registering for the whole process address space.
> I'll give it a try.
I'm not sure it makes much sense that this testing is essentially
modeled after nouveau's usage which is very strange compared to the
other drivers.
Jason
Powered by blists - more mailing lists