All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ralph Campbell <rcampbell@nvidia.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Jason Gunthorpe" <jgg@mellanox.com>,
	"Christoph Hellwig" <hch@lst.de>,
	"Ben Skeggs" <bskeggs@redhat.com>
Subject: Re: [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range
Date: Wed, 24 Jul 2019 09:05:53 +0200	[thread overview]
Message-ID: <20190724070553.GA2523@lst.de> (raw)
In-Reply-To: <20190723210506.25127-1-rcampbell@nvidia.com>

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.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.

  reply	other threads:[~2019-07-24  7:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 21:05 [PATCH] mm/hmm: replace hmm_update with mmu_notifier_range Ralph Campbell
2019-07-23 21:05 ` Ralph Campbell
2019-07-24  7:05 ` Christoph Hellwig [this message]
2019-07-24 15:28   ` Jason Gunthorpe
2019-07-24 15:28     ` Jason Gunthorpe
2019-07-24 15:33     ` Christoph Hellwig
2019-07-24 18:00       ` Michal Hocko
2019-07-24 18:01       ` Jason Gunthorpe
2019-07-24 17:58     ` Michal Hocko
     [not found]       ` <20190724175858.GC6410-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org>
2019-07-24 18:08         ` Jason Gunthorpe
2019-07-24 18:08           ` Jason Gunthorpe
2019-07-24 18:56           ` Michal Hocko
2019-07-24 18:59             ` Michal Hocko
2019-07-24 19:21               ` Jason Gunthorpe
2019-07-24 19:48                 ` Christoph Hellwig
2019-07-24 20:18                   ` Jason Gunthorpe
     [not found] ` <20190723210506.25127-1-rcampbell-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2019-07-25  1:14   ` Jason Gunthorpe
2019-07-25  1:14     ` Jason Gunthorpe
     [not found]     ` <20190725011424.GA377-uk2M96/98Pc@public.gmane.org>
2019-07-25 17:53       ` Ralph Campbell
2019-07-25 17:53         ` Ralph Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190724070553.GA2523@lst.de \
    --to=hch@lst.de \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgg@mellanox.com \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rcampbell@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.