Re: [PATCH hmm 4/6] mm/hmm: remove HMM_FAULT_SNAPSHOT

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

 



On Fri, Mar 20, 2020 at 01:49:03PM -0300, Jason Gunthorpe wrote:
> +	struct hmm_range *range = hmm_vma_walk->range;
>  	unsigned int required_fault = 0;
>  	unsigned long i;
>  
> -	if (hmm_vma_walk->flags & HMM_FAULT_SNAPSHOT)
> +	/*
> +	 * If there is no way for valid to be set in hmm_pte_need_fault() then
> +	 * don't bother to call it.
> +	 */
> +	if (!(((range->flags[HMM_PFN_VALID] & range->pfn_flags_mask) |
> +	       range->default_flags) &
> +	      range->flags[HMM_PFN_VALID]))

I think this needs to be split out into a well documented helper
function, as it is pretty much unreadable all cramed into a complex
conditional.
_______________________________________________
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