Re: [PATCH v2 hmm 4/9] mm/hmm: remove HMM_FAULT_SNAPSHOT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 27, 2020 at 05:00:16PM -0300, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> 
> Now that flags are handled on a fine-grained per-page basis this global
> flag is redundant and has a confusing overlap with the pfn_flags_mask and
> default_flags.
> 
> Normalize the HMM_FAULT_SNAPSHOT behavior into one place. Callers needing
> the SNAPSHOT behavior should set a pfn_flags_mask and default_flags that
> always results in a cleared HMM_PFN_VALID. Then no pages will be faulted,
> and HMM_FAULT_SNAPSHOT is not a special flow that overrides the masking
> mechanism.
> 
> As this is the last flag, also remove the flags argument. If future flags
> are needed they can be part of the struct hmm_range function arguments.
> 
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> ---
>  Documentation/vm/hmm.rst                | 12 +++++-------
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |  2 +-
>  drivers/gpu/drm/nouveau/nouveau_svm.c   |  2 +-
>  include/linux/hmm.h                     |  5 +----
>  mm/hmm.c                                | 17 +++++++++--------
>  5 files changed, 17 insertions(+), 21 deletions(-)

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux