Re: [PATCH] thp: fix PARAVIRT x86 32bit noPAE

From: Minchan Kim
Date: Fri Jan 21 2011 - 22:18:23 EST


On Sat, Jan 22, 2011 at 11:12 AM, Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote:
> I reproduced your 32bit x86 problem with an initramfs with a hugepage
> benchmark placed as /init inside KVM (not exactly an extensive test
> but it was trivial to reproduce). I tested below fix with HIGHMEM4G
> and HIGHMEM64G with PARAVIRT=y (and verified setting PARAVIRT=n fixed
> it, in other email Minchan also verified that setting HIGHMEM64G=y
> also fixed it, to confirm my theory the problem was the below #ifdef).
>
> The stress test reaches exit() successfully now (before the fix it
> crashed in out_of_memory() instead of do_exit as expected):
>
> NMI watchdog disabled for cpu0: unable to create perf event: -2
> ïKernel panic - not syncing: Attempted to kill init!
> Pid: 1, comm: init Not tainted 2.6.37+ #17
> Call Trace:
> Â[<c14351d2>] ? panic+0x57/0x161
> Â[<c107439b>] ? trace_hardirqs_on+0xb/0x10
> Â[<c1045321>] ? do_exit+0x6b1/0x6e0
> Â[<c10728ab>] ? trace_hardirqs_off+0xb/0x10
> Â[<c1045389>] ? do_group_exit+0x39/0xa0
> Â[<c1045403>] ? sys_exit_group+0x13/0x20
> Â[<c1002d9c>] ? sysenter_do_call+0x12/0x3c
> QEMU 0.12.1 monitor - type 'help' for more information
> (qemu) quit
>
> ====
> Subject: thp: fix PARAVIRT x86 32bit noPAE
>
> From: Andrea Arcangeli <aarcange@xxxxxxxxxx>
>
> This fixes TRANSPARENT_HUGEPAGE=y with PARAVIRT=y and HIGHMEM64=n.
>
> The #ifdef that this patch removes was erratically introduced to fix a build
> error for noPAE (where pmd.pmd doesn't exist). So then the kernel built but it
> failed at runtime because set_pmd_at was a noop. This will correct it by
> enabling set_pmd_at for noPAE mode too.
>
> Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>

It works well in my system until kernel compile completed while dd
if=/dev/sda3 of=/dev/zero and really slow web browsing.

Thanks, Andrea.

Reported-by: Minchan Kim <minchan.kim@xxxxxxxxx>
Tested-by: Minchan Kim <minchan.kim@xxxxxxxxx>


--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/