From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755337Ab3HEXDL (ORCPT ); Mon, 5 Aug 2013 19:03:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44670 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754629Ab3HEXDJ (ORCPT ); Mon, 5 Aug 2013 19:03:09 -0400 Date: Mon, 5 Aug 2013 16:03:06 -0700 From: Andrew Morton To: Alex Thorlton Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Mel Gorman , "Kirill A. Shutemov" , Rik van Riel , Johannes Weiner , "Eric W. Biederman" , Sedat Dilek , Frederic Weisbecker , Dave Jones , Michael Kerrisk , "Paul E. McKenney" , David Howells , Thomas Gleixner , Al Viro , Oleg Nesterov , Srikar Dronamraju , Kees Cook , Robin Holt Subject: Re: [PATCHv2] Add per-process flag to control thp Message-Id: <20130805160306.a620c88ba9098b98a0f93665@linux-foundation.org> In-Reply-To: <20130802205735.GS26476@sgi.com> References: <20130802205735.GS26476@sgi.com> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2 Aug 2013 15:57:35 -0500 Alex Thorlton 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.