From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751797Ab3LLVit (ORCPT ); Thu, 12 Dec 2013 16:38:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12801 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496Ab3LLVir (ORCPT ); Thu, 12 Dec 2013 16:38:47 -0500 Message-ID: <52AA2C87.5040509@redhat.com> Date: Thu, 12 Dec 2013 16:37:11 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Alex Thorlton , linux-mm@kvack.org CC: Andrew Morton , "Kirill A. Shutemov" , Benjamin Herrenschmidt , Wanpeng Li , Mel Gorman , Michel Lespinasse , Benjamin LaHaise , Oleg Nesterov , "Eric W. Biederman" , Andy Lutomirski , Al Viro , David Rientjes , Zhang Yanfei , Peter Zijlstra , Johannes Weiner , Michal Hocko , Jiang Liu , Cody P Schafer , Glauber Costa , Kamezawa Hiroyuki , Naoya Horiguchi , linux-kernel@vger.kernel.org, Andrea Arcangeli Subject: Re: [RFC PATCH 2/3] Add tunable to control THP behavior References: <20131212180050.GC134240@sgi.com> In-Reply-To: <20131212180050.GC134240@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/12/2013 01:00 PM, Alex Thorlton wrote: > This part of the patch adds a tunable to > /sys/kernel/mm/transparent_hugepage called threshold. This threshold > determines how many pages a user must fault in from a single node before > a temporary compound page is turned into a THP. > +++ b/mm/huge_memory.c > @@ -44,6 +44,9 @@ unsigned long transparent_hugepage_flags __read_mostly = > (1< (1< > +/* default to 1 page threshold for handing out thps; maintains old behavior */ > +static int transparent_hugepage_threshold = 1; I assume the motivation for writing all this code is that "1" was not a good value in your tests. That makes me wonder, why should 1 be the default value with your patches? If there is a better value, why should we not use that? What is the upside of using a better value? What is the downside? Is there a value that would to bound the downside, so it is almost always smaller than the upside?