mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@mellanox.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: Ralph Campbell <rcampbell@nvidia.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Jerome Glisse <jglisse@redhat.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Christoph Hellwig <hch@lst.de>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm/hmm: remove redundant check non_swap_entry()
Date: Fri, 12 Jun 2020 16:42:04 -0300	[thread overview]
Message-ID: <20200612194204.GM65026@mellanox.com> (raw)
In-Reply-To: <20200612193524.GL8681@bombadil.infradead.org>

On Fri, Jun 12, 2020 at 12:35:24PM -0700, Matthew Wilcox wrote:
> On Fri, Jun 12, 2020 at 12:26:18PM -0700, Ralph Campbell wrote:
> > In zap_pte_range(), the check for non_swap_entry() and
> > is_device_private_entry() is redundant since the latter is a subset of the
> > former. Remove the redundant check to simplify the code and for clarity.
> 
> That is highly configuration dependent.
> 
> #else /* CONFIG_DEVICE_PRIVATE */
> ...
> static inline bool is_device_private_entry(swp_entry_t entry)
> {
>         return false;
> }

The commit message might be a bit confusing, as it is not a subset, I
would say that device_private_entry alone is sufficient to tell if the
entry is private or not.

For the !CONFIG_DEVICE_PRIVATE case having it wired to false is
right.

Jason

  reply	other threads:[~2020-06-12 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 19:26 Ralph Campbell
2020-06-12 19:33 ` Jason Gunthorpe
2020-06-12 19:48   ` Ralph Campbell
2020-06-12 19:35 ` Matthew Wilcox
2020-06-12 19:42   ` Jason Gunthorpe [this message]
2020-06-12 19:53     ` Ralph Campbell
2020-06-12 19:55       ` Jason Gunthorpe

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=20200612194204.GM65026@mellanox.com \
    --to=jgg@mellanox.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=jglisse@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rcampbell@nvidia.com \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®