linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: akpm@linux-foundation.org, Jane Chu <jane.chu@oracle.com>,
	linux-nvdimm@lists.01.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linux-mm@kvack.org, Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [PATCH 1/2] mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct
Date: Sun, 10 Dec 2017 12:37:15 +0100	[thread overview]
Message-ID: <20171210113715.GE20234@dhcp22.suse.cz> (raw)
In-Reply-To: <151270385525.21215.16828596212056611775.stgit@dwillia2-desk3.amr.corp.intel.com>

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@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Reported-by: Jane Chu <jane.chu@oracle.com>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-12-10 11:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  3:30 [PATCH 0/2] mm, smaps: MMUPageSize for device-dax Dan Williams
2017-12-08  3:30 ` [PATCH 1/2] mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct Dan Williams
2017-12-10 11:37   ` Michal Hocko [this message]
2017-12-13 13:07     ` Michael Ellerman
2017-12-08  3:31 ` [PATCH 2/2] device-dax: implement ->pagesize() for smaps to report MMUPageSize Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171210113715.GE20234@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=dan.j.williams@intel.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox