linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Dan Williams <dan.j.williams@intel.com>, akpm@linux-foundation.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	linux-mm@kvack.org, linux-nvdimm@lists.01.org
Subject: Re: [PATCH v3 1/3] mm, powerpc: use vma_kernel_pagesize() in vma_mmu_pagesize()
Date: Fri, 02 Mar 2018 20:36:26 +1100	[thread overview]
Message-ID: <87lgfa95ut.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <151996254179.27922.2213728278535578744.stgit@dwillia2-desk3.amr.corp.intel.com>

Dan Williams <dan.j.williams@intel.com> writes:

> The current powerpc definition of vma_mmu_pagesize() open codes looking
> up the page size via hstate. It is identical to the generic
> vma_kernel_pagesize() implementation.
>
> Now, vma_kernel_pagesize() is growing support for determining the
> page size of Device-DAX vmas in addition to the existing Hugetlbfs page
> size determination.
>
> Ideally, if the powerpc vma_mmu_pagesize() used vma_kernel_pagesize() it
> would automatically benefit from any new vma-type support that is added
> to vma_kernel_pagesize(). However, the powerpc vma_mmu_pagesize() is
> prevented from calling vma_kernel_pagesize() due to a circular header
> dependency that requires vma_mmu_pagesize() to be defined before
> including <linux/hugetlb.h>.
>
> Break this circular dependency by defining the default
> vma_mmu_pagesize() as a __weak symbol to be overridden by the powerpc
> version.
>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  arch/powerpc/include/asm/hugetlb.h |    6 ------
>  arch/powerpc/mm/hugetlbpage.c      |    5 +----
>  mm/hugetlb.c                       |    8 +++-----
>  3 files changed, 4 insertions(+), 15 deletions(-)

This looks OK to me. I was worried switching to a weak symbol would mean
it doesn't get inlined, but it's not inlined today anyway!

Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)

cheers

--
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:[~2018-03-02  9:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02  3:48 [PATCH v3 0/3] mm, smaps: MMUPageSize for device-dax Dan Williams
2018-03-02  3:49 ` [PATCH v3 1/3] mm, powerpc: use vma_kernel_pagesize() in vma_mmu_pagesize() Dan Williams
2018-03-02  9:36   ` Michael Ellerman [this message]
2018-03-02  3:49 ` [PATCH v3 2/3] mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct Dan Williams
2018-03-02 22:39   ` Andrew Morton
2018-03-02  3:49 ` [PATCH v3 3/3] 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=87lgfa95ut.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --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