Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752754Ab3HCRHM (ORCPT ); Sat, 3 Aug 2013 13:07:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44589 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752523Ab3HCRHJ (ORCPT ); Sat, 3 Aug 2013 13:07:09 -0400 Date: Sat, 3 Aug 2013 19:01:02 +0200 From: Oleg Nesterov To: Alex Thorlton Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andrew Morton , 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 , Srikar Dronamraju , Kees Cook , Robin Holt Subject: Re: [PATCHv2] Add per-process flag to control thp Message-ID: <20130803170102.GD32568@redhat.com> References: <20130802205735.GS26476@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130802205735.GS26476@sgi.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1035 Lines: 31 On 08/02, 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. Well, I think the changelog should explain why madvise() is bad. > @@ -1311,6 +1311,10 @@ static struct task_struct *copy_process(unsigned long clone_flags, > p->sequential_io_avg = 0; > #endif > > +#ifdef CONFIG_TRANSPARENT_HUGEPAGE > + p->thp_disabled = current->thp_disabled; > +#endif Unneeded. It will be copied by dup_task_struct() automagically. But I simply can't understand why this flag is per-thread. It should be mm flag, no? Oleg -- 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/