From: Andrea Arcangeli <aarcange@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
Hillf Danton <dhillf@gmail.com>,
David Rientjes <rientjes@google.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-next@vger.kernel.org
Subject: Re: [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
Date: Wed, 21 Mar 2012 23:58:13 +0100 [thread overview]
Message-ID: <20120321225813.GM24602@redhat.com> (raw)
In-Reply-To: <20120321154721.3b8884bd.akpm@linux-foundation.org>
Hi,
On Wed, Mar 21, 2012 at 03:47:21PM -0700, Andrew Morton wrote:
> On Wed, 21 Mar 2012 18:07:41 -0400
> Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
>
> > On Mon, Mar 12, 2012 at 6:30 PM, Naoya Horiguchi
> > <n-horiguchi@ah.jp.nec.com> wrote:
> > > These macros will be used in later patch, where all usage are expected
> > > to be optimized away without #ifdef CONFIG_TRANSPARENT_HUGEPAGE.
> > > But to detect unexpected usages, we convert existing BUG() to BUILD_BUG().
> >
> > Just a heads up that this showed up in linux-next today as the
> > cause of a new build failure for an ARM board:
> >
> > http://kisskb.ellerman.id.au/kisskb/buildresult/5930053/
>
> The internet started working again.
>
> mm/pgtable-generic.c: In function 'pmdp_clear_flush_young':
> mm/pgtable-generic.c:76: error: call to '__build_bug_failed' declared with attribute error: BUILD_BUG failed
>
> I guess we shouldn't be evaluating HPAGE_PMD_MASK at all if
> !CONFIG_TRANSPARENT_HUGEPAGE, so...
Yes. Either that or define __HAVE_ARCH_PMDP_CLEAR_YOUNG_FLUSH without
actually implementing the function to flush it away of the .text (is
it perhaps flushed away at vmlinux link time?). That
function never could be called by ARM. The BUG() is actually correct
even in the original position, just now it triggers at build time
because it doesn't know it can't be called.
>
> --- a/mm/pgtable-generic.c~thp-add-hpage_pmd_-definitions-for-config_transparent_hugepage-fix
> +++ a/mm/pgtable-generic.c
> @@ -70,10 +70,11 @@ int pmdp_clear_flush_young(struct vm_are
> unsigned long address, pmd_t *pmdp)
> {
> int young;
> -#ifndef CONFIG_TRANSPARENT_HUGEPAGE
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> + VM_BUG_ON(address & ~HPAGE_PMD_MASK);
> +#else
> BUG();
> #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
> - VM_BUG_ON(address & ~HPAGE_PMD_MASK);
> young = pmdp_test_and_clear_young(vma, address, pmdp);
> if (young)
> flush_tlb_range(vma, address, address + HPAGE_PMD_SIZE);
> _
>
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-03-21 22:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 22:30 [PATCH v4 1/3] memcg: clean up existing move charge code Naoya Horiguchi
2012-03-12 22:30 ` [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE Naoya Horiguchi
2012-03-21 22:07 ` Paul Gortmaker
2012-03-21 22:19 ` Andrew Morton
2012-03-21 22:36 ` Paul Gortmaker
2012-03-21 23:26 ` David Daney
2012-03-21 22:47 ` Andrew Morton
2012-03-21 22:58 ` Andrea Arcangeli [this message]
2012-03-12 22:30 ` [PATCH v4 3/3] memcg: avoid THP split in task migration Naoya Horiguchi
2012-03-13 5:47 ` KAMEZAWA Hiroyuki
2012-03-13 5:45 ` [PATCH v4 1/3] memcg: clean up existing move charge code KAMEZAWA Hiroyuki
2012-03-13 22:15 ` Naoya Horiguchi
2012-03-14 12:31 ` Hillf Danton
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=20120321225813.GM24602@redhat.com \
--to=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhillf@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=paul.gortmaker@windriver.com \
--cc=rientjes@google.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).