Re: [PATCH 1/2] mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct

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

 



On Thu 07-12-17 19:30:55, Dan Williams wrote:
> When device-dax is operating in huge-page mode we want it to behave like
> hugetlbfs and report the MMU page mapping size that is being enforced by
> the vma. Similar to commit 31383c6865a5 "mm, hugetlbfs: introduce
> ->split() to vm_operations_struct" it would be messy to teach
> vma_mmu_pagesize() about device-dax page mapping sizes in the same
> (hstate) way that hugetlbfs communicates this attribute.  Instead, these
> patches introduce a new ->pagesize() vm operation.
> 
> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Reported-by: Jane Chu <jane.chu@xxxxxxxxxx>
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>

My build battery choked on the following
In file included from drivers/infiniband/core/umem_odp.c:41:0:
./include/linux/hugetlb.h: In function 'vma_kernel_pagesize':
./include/linux/hugetlb.h:262:32: error: dereferencing pointer to incomplete type
  if (vma->vm_ops && vma->vm_ops->pagesize)
                                ^
./include/linux/hugetlb.h:263:21: error: dereferencing pointer to incomplete type
   return vma->vm_ops->pagesize(vma);

I thought that adding #include <linux/mm.h> into linux/hugetlb.h would
be sufficient but then it failed for powerpc defconfig which overrides
vma_kernel_pagesize
In file included from ./include/linux/hugetlb.h:452:0,
                 from arch/powerpc/mm/hugetlbpage.c:14:
./arch/powerpc/include/asm/hugetlb.h:131:26: error: redefinition of 'vma_mmu_pagesize'
 #define vma_mmu_pagesize vma_mmu_pagesize
                          ^
arch/powerpc/mm/hugetlbpage.c:563:15: note: in expansion of macro 'vma_mmu_pagesize'
 unsigned long vma_mmu_pagesize(struct vm_area_struct *vma)
               ^
In file included from arch/powerpc/mm/hugetlbpage.c:14:0:
./include/linux/hugetlb.h:275:29: note: previous definition of 'vma_mmu_pagesize' was here
 static inline unsigned long vma_mmu_pagesize(struct vm_area_struct *vma)

So it looks this needs something more laborous.
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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