* Re: [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
[not found] ` <1331591456-20769-2-git-send-email-n-horiguchi@ah.jp.nec.com>
@ 2012-03-21 22:07 ` Paul Gortmaker
2012-03-21 22:19 ` Andrew Morton
2012-03-21 22:47 ` Andrew Morton
0 siblings, 2 replies; 6+ messages in thread
From: Paul Gortmaker @ 2012-03-21 22:07 UTC (permalink / raw)
To: Naoya Horiguchi
Cc: Andrew Morton, Andrea Arcangeli, KAMEZAWA Hiroyuki,
Daisuke Nishimura, Hillf Danton, David Rientjes, linux-kernel,
linux-mm, linux-next
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/
Paul.
--
git bisect start
# good: [fde7d9049e55ab85a390be7f415d74c9f62dd0f9] Linux 3.3-rc7
git bisect good fde7d9049e55ab85a390be7f415d74c9f62dd0f9
# bad: [9166d6581d1ca6795bcd38506c7d29bf39402a7d] Add linux-next
specific files for 20120321
git bisect bad 9166d6581d1ca6795bcd38506c7d29bf39402a7d
# good: [e863be5cac0a857302ccc0129326ca3634c1136a] Merge
remote-tracking branch 'net-next/master'
git bisect good e863be5cac0a857302ccc0129326ca3634c1136a
# good: [2ac4846c531fc33783999e8819a66d0f3e36058f] Merge
remote-tracking branch 'spi/spi/next'
git bisect good 2ac4846c531fc33783999e8819a66d0f3e36058f
# good: [a3ebef77540d27811aab7514b9aeaab13c573b46] Merge
remote-tracking branch 'oprofile/for-next'
git bisect good a3ebef77540d27811aab7514b9aeaab13c573b46
# good: [3ee174051be0246173ba8a386bb7a2d20d9e27c3] [arm-soc internal]
add back contents file
git bisect good 3ee174051be0246173ba8a386bb7a2d20d9e27c3
# good: [cc61a2762110efb0868bc326be52f3ecd22c4e99] Merge
remote-tracking branch 'dma-buf/for-next'
git bisect good cc61a2762110efb0868bc326be52f3ecd22c4e99
# bad: [dd09ea75ddb4d712abe5ec8a9b37619a99d4554c] kernel/watchdog.c:
add comment to watchdog() exit path
git bisect bad dd09ea75ddb4d712abe5ec8a9b37619a99d4554c
# good: [a80d01212507a57d48912f08ca22de039f4470b8] rmap: remove
__anon_vma_link() declaration
git bisect good a80d01212507a57d48912f08ca22de039f4470b8
# good: [dfac39f6a2daa212de0eb80bf14c76a2bee23dc4] memcg: remove
PCG_CACHE page_cgroup flag
git bisect good dfac39f6a2daa212de0eb80bf14c76a2bee23dc4
# bad: [8887892fd3354617e63be2399e286a86d0f9279c] alpha: use
set_current_blocked() and block_sigmask()
git bisect bad 8887892fd3354617e63be2399e286a86d0f9279c
# good: [0d7a67d6525414f8541f4a61084d783b4b53b8ec] memcg: remove
PCG_FILE_MAPPED fix cosmetic fix
git bisect good 0d7a67d6525414f8541f4a61084d783b4b53b8ec
# good: [ea20bf604adaab3a4ffb887083e62e7d76eb5d53] memcg: clean up
existing move charge code
git bisect good ea20bf604adaab3a4ffb887083e62e7d76eb5d53
# bad: [0709378dc1d716112e10de7f687af4993e69df7b] frv: use
set_current_blocked() and block_sigmask()
git bisect bad 0709378dc1d716112e10de7f687af4993e69df7b
# bad: [3135be0275c89f28c352554a0ec1874ea7cd3c3a] memcg: avoid THP
split in task migration
git bisect bad 3135be0275c89f28c352554a0ec1874ea7cd3c3a
# bad: [92c36300cf69f6ea1267d0bba7af708560c116d7] thp: add HPAGE_PMD_*
definitions for !CONFIG_TRANSPARENT_HUGEPAGE
git bisect bad 92c36300cf69f6ea1267d0bba7af708560c116d7
paul@yow-lpgnfs-02:~/git/linux-head$
>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> Acked-by: Hillf Danton <dhillf@gmail.com>
> Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Acked-by: David Rientjes <rientjes@google.com>
> ---
> include/linux/huge_mm.h | 11 ++++++-----
> 1 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git linux-next-20120307.orig/include/linux/huge_mm.h linux-next-20120307/include/linux/huge_mm.h
> index f56cacb..c8af7a2 100644
> --- linux-next-20120307.orig/include/linux/huge_mm.h
> +++ linux-next-20120307/include/linux/huge_mm.h
> @@ -51,6 +51,9 @@ extern pmd_t *page_check_address_pmd(struct page *page,
> unsigned long address,
> enum page_check_address_pmd_flag flag);
>
> +#define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
> +#define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER)
> +
> #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> #define HPAGE_PMD_SHIFT HPAGE_SHIFT
> #define HPAGE_PMD_MASK HPAGE_MASK
> @@ -102,8 +105,6 @@ extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd);
> BUG_ON(pmd_trans_splitting(*____pmd) || \
> pmd_trans_huge(*____pmd)); \
> } while (0)
> -#define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
> -#define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER)
> #if HPAGE_PMD_ORDER > MAX_ORDER
> #error "hugepages can't be allocated by the buddy allocator"
> #endif
> @@ -158,9 +159,9 @@ static inline struct page *compound_trans_head(struct page *page)
> return page;
> }
> #else /* CONFIG_TRANSPARENT_HUGEPAGE */
> -#define HPAGE_PMD_SHIFT ({ BUG(); 0; })
> -#define HPAGE_PMD_MASK ({ BUG(); 0; })
> -#define HPAGE_PMD_SIZE ({ BUG(); 0; })
> +#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
> +#define HPAGE_PMD_MASK ({ BUILD_BUG(); 0; })
> +#define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; })
>
> #define hpage_nr_pages(x) 1
>
> --
> 1.7.7.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
2012-03-21 22:07 ` [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE Paul Gortmaker
@ 2012-03-21 22:19 ` Andrew Morton
2012-03-21 22:36 ` Paul Gortmaker
2012-03-21 22:47 ` Andrew Morton
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2012-03-21 22:19 UTC (permalink / raw)
To: Paul Gortmaker
Cc: Naoya Horiguchi, Andrea Arcangeli, KAMEZAWA Hiroyuki,
Daisuke Nishimura, Hillf Danton, David Rientjes, linux-kernel,
linux-mm, linux-next
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:
Dammit.
> http://kisskb.ellerman.id.au/kisskb/buildresult/5930053/
Site is dead. What was failure, please?
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
2012-03-21 22:19 ` Andrew Morton
@ 2012-03-21 22:36 ` Paul Gortmaker
2012-03-21 23:26 ` David Daney
0 siblings, 1 reply; 6+ messages in thread
From: Paul Gortmaker @ 2012-03-21 22:36 UTC (permalink / raw)
To: Andrew Morton
Cc: Naoya Horiguchi, Andrea Arcangeli, KAMEZAWA Hiroyuki,
Daisuke Nishimura, Hillf Danton, David Rientjes, linux-kernel,
linux-mm, linux-next
On 12-03-21 06:19 PM, 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:
>
> Dammit.
>
>> http://kisskb.ellerman.id.au/kisskb/buildresult/5930053/
>
> Site is dead. What was failure, please?
Odd, I just reloaded the above link and it seems alive?
Anyway here is where it goes off the rails.
mm/pgtable-generic.c: In function 'pmdp_clear_flush_young':
mm/pgtable-generic.c:76:136: error: call to '__build_bug_failed' declared with attribute error: BUILD_BUG failed
make[2]: *** [mm/pgtable-generic.o] Error 1
Build was for ARM, tct_hammer_defconfig
Paul.
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
2012-03-21 22:07 ` [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE Paul Gortmaker
2012-03-21 22:19 ` Andrew Morton
@ 2012-03-21 22:47 ` Andrew Morton
2012-03-21 22:58 ` Andrea Arcangeli
1 sibling, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2012-03-21 22:47 UTC (permalink / raw)
To: Paul Gortmaker
Cc: Naoya Horiguchi, Andrea Arcangeli, KAMEZAWA Hiroyuki,
Daisuke Nishimura, Hillf Danton, David Rientjes, linux-kernel,
linux-mm, linux-next
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...
--- 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);
_
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
2012-03-21 22:47 ` Andrew Morton
@ 2012-03-21 22:58 ` Andrea Arcangeli
0 siblings, 0 replies; 6+ messages in thread
From: Andrea Arcangeli @ 2012-03-21 22:58 UTC (permalink / raw)
To: Andrew Morton
Cc: Paul Gortmaker, Naoya Horiguchi, KAMEZAWA Hiroyuki,
Daisuke Nishimura, Hillf Danton, David Rientjes, linux-kernel,
linux-mm, linux-next
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE
2012-03-21 22:36 ` Paul Gortmaker
@ 2012-03-21 23:26 ` David Daney
0 siblings, 0 replies; 6+ messages in thread
From: David Daney @ 2012-03-21 23:26 UTC (permalink / raw)
To: Paul Gortmaker
Cc: Andrew Morton, Naoya Horiguchi, Andrea Arcangeli,
KAMEZAWA Hiroyuki, Daisuke Nishimura, Hillf Danton,
David Rientjes, linux-kernel, linux-mm, linux-next
On 03/21/2012 03:36 PM, Paul Gortmaker wrote:
> On 12-03-21 06:19 PM, 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:
>>
>> Dammit.
>>
>>> http://kisskb.ellerman.id.au/kisskb/buildresult/5930053/
>>
>> Site is dead. What was failure, please?
>
> Odd, I just reloaded the above link and it seems alive?
> Anyway here is where it goes off the rails.
>
> mm/pgtable-generic.c: In function 'pmdp_clear_flush_young':
> mm/pgtable-generic.c:76:136: error: call to '__build_bug_failed' declared with attribute error: BUILD_BUG failed
> make[2]: *** [mm/pgtable-generic.o] Error 1
>
This is just another instance of:
https://lkml.org/lkml/2011/12/16/507
There was some discussion in that thread of how it might be fixed.
David Daney
> Build was for ARM, tct_hammer_defconfig
>
> Paul.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-21 23:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1331591456-20769-1-git-send-email-n-horiguchi@ah.jp.nec.com>
[not found] ` <1331591456-20769-2-git-send-email-n-horiguchi@ah.jp.nec.com>
2012-03-21 22:07 ` [PATCH v4 2/3] thp: add HPAGE_PMD_* definitions for !CONFIG_TRANSPARENT_HUGEPAGE 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox