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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux