All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mips@linux-mips.org
Subject: Re: [PATCH 1/3] MIPS: Add support for transparent huge page
Date: Tue, 24 Apr 2012 16:27:05 -0700	[thread overview]
Message-ID: <4F9736C9.8020003@gmail.com> (raw)
In-Reply-To: <CAJd=RBAXc+QSX+xnJ2W9vVwK64Etrzrr=iBqPkJXNvYgwujQ_Q@mail.gmail.com>

On 11/26/2011 06:35 AM, Hillf Danton wrote:
> This patchset adds THP support for MIPS.
>
> Two page-table-entry bits, namely huge and splitting, are required by THP.
> The huge bit is already defined and used for huge TLB, THP simply uses it.
>
> For the splitting bit, the present bit is selected, since for regular pmd
> entry pmd_present() is defined to be not directly related to the bit. If this
> selection is not sane, this work as a whole is a mess. So selected then the
> current work of huge TLB could also be used for THP, see next patch.
>
> Other pmd mangling primitives are added in a straight manner, and they are
> confined to a single file, asm/thp.h.
>
>
> Signed-off-by: Hillf Danton<dhillf@gmail.com>
> ---
>
> --- a/arch/mips/include/asm/pgtable-bits.h	Thu Nov 24 21:16:22 2011
> +++ b/arch/mips/include/asm/pgtable-bits.h	Sat Nov 26 20:49:31 2011
> @@ -94,7 +94,7 @@
>   /* set:pagecache unset:swap */
>   #define _PAGE_FILE		(_PAGE_MODIFIED)
>
> -#ifdef CONFIG_HUGETLB_PAGE
> +#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
>   /* huge tlb page */
>   #define _PAGE_HUGE_SHIFT	(_PAGE_MODIFIED_SHIFT + 1)
>   #define _PAGE_HUGE		(1<<  _PAGE_HUGE_SHIFT)
> --- a/arch/mips/include/asm/pgtable.h	Thu Nov 24 21:17:38 2011
> +++ b/arch/mips/include/asm/pgtable.h	Sat Nov 26 20:50:52 2011
> @@ -394,6 +394,9 @@ static inline int io_remap_pfn_range(str
>   		remap_pfn_range(vma, vaddr, pfn, size, prot)
>   #endif
>
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +#include<asm/thp.h>
> +#endif
>   #include<asm-generic/pgtable.h>
>
>   /*
> --- /dev/null	Sat Nov 26 21:04:52 2011
> +++ b/arch/mips/include/asm/thp.h	Sat Nov 26 21:02:52 2011
> @@ -0,0 +1,167 @@
> +#ifndef _ASM_PGTABLE_THP_H
> +#define _ASM_PGTABLE_THP_H
> +/*
> + * pmd primitives for transparent huge page
> + *
> + * Copyright (C) 2011 David Daney

I'm not sure where that copyright came from.


Other than that, these seem plausible.

David Daney

  reply	other threads:[~2012-04-24 23:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-26 14:35 [PATCH 1/3] MIPS: Add support for transparent huge page Hillf Danton
2012-04-24 23:27 ` David Daney [this message]
2012-04-25 13:58   ` Hillf Danton
2012-04-25 16:07     ` David Daney

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=4F9736C9.8020003@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhillf@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.