[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190724070553.GA2523@lst.de>
Date: Wed, 24 Jul 2019 09:05:53 +0200
From: Christoph Hellwig <hch@....de>
To: Ralph Campbell <rcampbell@...dia.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
Jérôme Glisse <jglisse@...hat.com>,
Jason Gunthorpe <jgg@...lanox.com>,
Christoph Hellwig <hch@....de>, Ben Skeggs <bskeggs@...hat.com>
Subject: Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
Looks good:
Reviewed-by: Christoph Hellwig <hch@....de>
One comment on a related cleanup:
> list_for_each_entry(mirror, &hmm->mirrors, list) {
> int rc;
>
> - rc = mirror->ops->sync_cpu_device_pagetables(mirror, &update);
> + rc = mirror->ops->sync_cpu_device_pagetables(mirror, nrange);
> if (rc) {
> - if (WARN_ON(update.blockable || rc != -EAGAIN))
> + if (WARN_ON(mmu_notifier_range_blockable(nrange) ||
> + rc != -EAGAIN))
> continue;
> ret = -EAGAIN;
> break;
This magic handling of error seems odd. I think we should merge rc and
ret into one variable and just break out if any error happens instead
or claiming in the comments -EAGAIN is the only valid error and then
ignoring all others here.
Powered by blists - more mailing lists