linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Steve Capper <steve.capper@linaro.org>
To: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk,
	linux-mm@kvack.org, will.deacon@arm.com, catalin.marinas@arm.com,
	arnd@arndb.de, dsaxena@linaro.org, robherring2@gmail.com
Subject: Re: [PATCH 1/5] mm: hugetlb: Introduce huge_pte_{page,present,young}
Date: Tue, 4 Mar 2014 08:26:15 +0000	[thread overview]
Message-ID: <20140304082615.GA5952@linaro.org> (raw)
In-Reply-To: <5314c4e5.d0128c0a.2ad9.ffffeb8dSMTPIN_ADDED_BROKEN@mx.google.com>

On Mon, Mar 03, 2014 at 01:07:07PM -0500, Naoya Horiguchi wrote:
> Hi Steve,
>

Hi Naoya,

 
> On Tue, Feb 18, 2014 at 03:27:11PM +0000, Steve Capper wrote:
> > Introduce huge pte versions of pte_page, pte_present and pte_young.
> > This allows ARM (without LPAE) to use alternative pte processing logic
> > for huge ptes.
> > 
> > Where these functions are not defined by architectural code they
> > fallback to the standard functions.
> > 
> > Signed-off-by: Steve Capper <steve.capper@linaro.org>
> > ---
> >  include/linux/hugetlb.h | 12 ++++++++++++
> >  mm/hugetlb.c            | 22 +++++++++++-----------
> >  2 files changed, 23 insertions(+), 11 deletions(-)

Thanks for taking a look at this.

> 
> How about replacing other archs' arch-dependent code with new functions?
> 

In the cases below, the huge_pte_ functions will always resolve to the
standard pte_ functions (unless the arch code changes); so I decided to
only change the core code as that's where the meanings of huge_pte_
can vary.

>   [~/dev]$ find arch/ -name "hugetlbpage.c" | xargs grep pte_page
>   arch/s390/mm/hugetlbpage.c:             pmd_val(pmd) |= pte_page(pte)[1].index;
>   arch/powerpc/mm/hugetlbpage.c:  page = pte_page(*ptep);
>   arch/powerpc/mm/hugetlbpage.c:  head = pte_page(pte);
>   arch/x86/mm/hugetlbpage.c:      page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)];
>   arch/ia64/mm/hugetlbpage.c:     page = pte_page(*ptep);
>   arch/mips/mm/hugetlbpage.c:     page = pte_page(*(pte_t *)pmd);
>   arch/tile/mm/hugetlbpage.c:     page = pte_page(*(pte_t *)pmd);
>   arch/tile/mm/hugetlbpage.c:     page = pte_page(*(pte_t *)pud);
>   [~/dev]$ find arch/ -name "hugetlbpage.c" | xargs grep pte_present
>   arch/s390/mm/hugetlbpage.c:     if (pte_present(pte)) {
>   arch/sparc/mm/hugetlbpage.c:    if (!pte_present(*ptep) && pte_present(entry))
>   arch/sparc/mm/hugetlbpage.c:    if (pte_present(entry))
>   arch/tile/mm/hugetlbpage.c:     if (!pte_present(*ptep) && huge_shift[level] != 0) {
>   arch/tile/mm/hugetlbpage.c:             if (pte_present(pte) && pte_super(pte))
>   arch/tile/mm/hugetlbpage.c:     if (!pte_present(*pte))
> 

Cheers,
-- 
Steve

> Thanks,
> Naoya Horiguchi

--
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>

  parent reply	other threads:[~2014-03-04  8:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 15:27 [PATCH 0/5] Huge pages for short descriptors on ARM Steve Capper
2014-02-18 15:27 ` [PATCH 1/5] mm: hugetlb: Introduce huge_pte_{page,present,young} Steve Capper
2014-03-03  8:01   ` Steve Capper
2014-03-03 18:07   ` Naoya Horiguchi
2014-03-03 18:07   ` Naoya Horiguchi
     [not found]   ` <5314c4e5.d0128c0a.2ad9.ffffeb8dSMTPIN_ADDED_BROKEN@mx.google.com>
2014-03-04  8:26     ` Steve Capper [this message]
2014-02-18 15:27 ` [PATCH 2/5] arm: mm: Adjust the parameters for __sync_icache_dcache Steve Capper
2014-02-18 15:27 ` [PATCH 3/5] arm: mm: Make mmu_gather aware of huge pages Steve Capper
2014-02-18 15:27 ` [PATCH 4/5] arm: mm: HugeTLB support for non-LPAE systems Steve Capper
2014-02-18 15:27 ` [PATCH 5/5] arm: mm: Add Transparent HugePage support for non-LPAE Steve Capper

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=20140304082615.GA5952@linaro.org \
    --to=steve.capper@linaro.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=dsaxena@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=robherring2@gmail.com \
    --cc=will.deacon@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).