Re: [PATCHv2] Add per-process flag to control thp

From: Andrew Morton
Date: Mon Aug 05 2013 - 19:03:15 EST

On Fri, 2 Aug 2013 15:57:35 -0500 Alex Thorlton <athorlton@xxxxxxx> wrote:

> This patch implements functionality to allow processes to disable the use of
> transparent hugepages through the prctl syscall.
> We've determined that some jobs perform significantly better with thp disabled,
> and we needed a way to control thp on a per-process basis, without relying on
> madvise.

What everyone else said, plus...

I worry about the inherit-across-fork thing. A scenario we should
think about is where the user doesn't build his own executables. So he
writes a little wrapper which runs prctl(PR_SET_THP_DISABLED, 0) then
execs the third-party-app. But what happens if that app execs children
who *do* want THP? He has to hunt down and wrap those as well?

It all seems a bit unwieldy. I wonder if controlling it via the ELF
header would be more practical.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at