linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Zi Yan <ziy@nvidia.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Jerome Glisse <jglisse@redhat.com>,
	"Ralph Campbell" <rcampbell@nvidia.com>, <linux-mm@kvack.org>
Subject: Re: [PATCH 1/5] mm: don't provide a stub for hmm_range_fault
Date: Mon, 16 Mar 2020 10:37:41 -0400	[thread overview]
Message-ID: <27343039-37F4-440B-8BF0-EC59CE2E2A53@nvidia.com> (raw)
In-Reply-To: <20200316135310.899364-2-hch@lst.de>

[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]

On 16 Mar 2020, at 9:53, Christoph Hellwig wrote:

> All callers of hmm_range_fault depend on CONFIG_HMM_MIRROR, so
> don't bother with a stub.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  include/linux/hmm.h | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/include/linux/hmm.h b/include/linux/hmm.h
> index ddf9f7144c43..c102e359b59d 100644
> --- a/include/linux/hmm.h
> +++ b/include/linux/hmm.h
> @@ -225,17 +225,10 @@ static inline uint64_t hmm_device_entry_from_pfn(const struct hmm_range *range,
>  /* Don't fault in missing PTEs, just snapshot the current state. */
>  #define HMM_FAULT_SNAPSHOT		(1 << 1)
>
> -#ifdef CONFIG_HMM_MIRROR
>  /*
>   * Please see Documentation/vm/hmm.rst for how to use the range API.
>   */
>  long hmm_range_fault(struct hmm_range *range, unsigned int flags);
> -#else
> -static inline long hmm_range_fault(struct hmm_range *range, unsigned int flags)
> -{
> -	return -EOPNOTSUPP;
> -}
> -#endif
>
>  /*
>   * HMM_RANGE_DEFAULT_TIMEOUT - default timeout (ms) when waiting for a range
> -- 
> 2.24.1

LGTM. It compiles with and without CONFIG_HMM_MIRROR.

Reviewed-by: Zi Yan <ziy@nvidia.com>

—
Best Regards,
Yan Zi

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 854 bytes --]

  reply	other threads:[~2020-03-16 14:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-16 13:53 misc hmm cleanups Christoph Hellwig
2020-03-16 13:53 ` [PATCH 1/5] mm: don't provide a stub for hmm_range_fault Christoph Hellwig
2020-03-16 14:37   ` Zi Yan [this message]
2020-03-16 16:45   ` Jason Gunthorpe
2020-03-16 13:53 ` [PATCH 2/5] mm: remove the unused HMM_FAULT_ALLOW_RETRY flag Christoph Hellwig
2020-03-16 16:44   ` Jason Gunthorpe
2020-03-16 13:53 ` [PATCH 3/5] mm: simplify hmm_vma_walk_hugetlb_entry Christoph Hellwig
2020-03-16 16:43   ` Jason Gunthorpe
2020-03-16 13:53 ` [PATCH 4/5] mm: don't handle the non-fault case in hmm_vma_walk_hole_ Christoph Hellwig
2020-03-16 16:43   ` Jason Gunthorpe
2020-03-16 13:53 ` [PATCH 5/5] mm: merge hmm_vma_do_fault into into hmm_vma_walk_hole_ Christoph Hellwig
2020-03-16 16:41   ` Jason Gunthorpe
2020-03-16 16:51     ` Christoph Hellwig
2020-03-16 18:01       ` Christoph Hellwig
2020-03-17 18:38 ` misc hmm cleanups Jason Gunthorpe
2020-03-17 18:55   ` Christoph Hellwig
2020-03-19  0:27     ` 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=27343039-37F4-440B-8BF0-EC59CE2E2A53@nvidia.com \
    --to=ziy@nvidia.com \
    --cc=hch@lst.de \
    --cc=jgg@ziepe.ca \
    --cc=jglisse@redhat.com \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox