From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932948AbcBZKwg (ORCPT ); Fri, 26 Feb 2016 05:52:36 -0500 Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:35238 "EHLO outbound-smtp05.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754270AbcBZKwe (ORCPT ); Fri, 26 Feb 2016 05:52:34 -0500 Date: Fri, 26 Feb 2016 10:52:30 +0000 From: Mel Gorman To: Johannes Weiner Cc: Andrew Morton , Vlastimil Babka , Rik van Riel , Andrea Arcangeli , Linux-MM , LKML Subject: Re: [PATCH 1/1] mm: thp: Redefine default THP defrag behaviour disable it by default Message-ID: <20160226105230.GA2854@techsingularity.net> References: <1456420339-29709-1-git-send-email-mgorman@techsingularity.net> <20160225194524.GA3370@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20160225194524.GA3370@cmpxchg.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2016 at 02:45:24PM -0500, Johannes Weiner wrote: > > THP gives impressive gains in some cases but only if they are quickly > > available. We're not going to reach the point where they are completely > > free so lets take the costs out of the fast paths finally and defer the > > cost to kswapd, kcompactd and khugepaged where it belongs. > > > > Signed-off-by: Mel Gorman > > Acked-by: Johannes Weiner > > The cornercases Rik pointed out aside, if the mapping isn't long-lived > enough that it can wait for khugepaged, what are the odds that the > defrag work will be offset by the TLB savings? However, for mappings > where it would pay off, having to do the same defrag work but doing it > at a later time is actually a net loss. Should we consider keeping > direct reclaim and compaction as a configurable option as least? > Yes, I think so. I've a prototype now that makes it configurable and am running some tests. I'll preserve your and Rik's ack in V2 as the patch will be different but the default behaviour will be very similar. -- Mel Gorman SUSE Labs