[PATCH hmm 4/6] mm/hmm: remove HMM_FAULT_SNAPSHOT
Christoph Hellwig
hch at lst.de
Sat Mar 21 08:40:12 UTC 2020
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.
More information about the amd-gfx
mailing list