Re: [PATCH 1/6] mm/huge_memory.c: rework the function vma_adjust_trans_huge()

2021-03-14 Thread Miaohe Lin
Hi: On 2021/3/14 4:03, Matthew Wilcox wrote: > On Sat, Mar 13, 2021 at 05:32:19AM -0500, Miaohe Lin wrote: >> +static inline void try_to_split_huge_pmd_address(struct vm_area_struct >> *vma, unsigned long address) >> +{ >> +if (address & ~HPAGE_PMD_MASK && >> +range_in_vma(vma,

Re: [PATCH 1/6] mm/huge_memory.c: rework the function vma_adjust_trans_huge()

2021-03-13 Thread Matthew Wilcox
On Sat, Mar 13, 2021 at 05:32:19AM -0500, Miaohe Lin wrote: > +static inline void try_to_split_huge_pmd_address(struct vm_area_struct *vma, > unsigned long address) > +{ > + if (address & ~HPAGE_PMD_MASK && > + range_in_vma(vma, address & HPAGE_PMD_MASK, > +

[PATCH 1/6] mm/huge_memory.c: rework the function vma_adjust_trans_huge()

2021-03-13 Thread Miaohe Lin
The current implementation of vma_adjust_trans_huge() contains some duplicated codes. Add helper function to get rid of these codes to make it more succinct. Signed-off-by: Miaohe Lin --- mm/huge_memory.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff