Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939871AbdD1NQj (ORCPT ); Fri, 28 Apr 2017 09:16:39 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34695 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939659AbdD1NQc (ORCPT ); Fri, 28 Apr 2017 09:16:32 -0400 Date: Fri, 28 Apr 2017 16:16:28 +0300 From: "Kirill A. Shutemov" To: Johannes Weiner Cc: "Huang, Ying" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -mm -v10 3/3] mm, THP, swap: Enable THP swap optimization only if has compound map Message-ID: <20170428131628.vsiapdgm7e6yddsb@node.shutemov.name> References: <20170425125658.28684-1-ying.huang@intel.com> <20170425125658.28684-4-ying.huang@intel.com> <20170425214618.GB6841@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170425214618.GB6841@cmpxchg.org> User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 827 Lines: 23 On Tue, Apr 25, 2017 at 05:46:18PM -0400, Johannes Weiner wrote: > On Tue, Apr 25, 2017 at 08:56:58PM +0800, Huang, Ying wrote: > > From: Huang Ying > > > > If there is no compound map for a THP (Transparent Huge Page), it is > > possible that the map count of some sub-pages of the THP is 0. So it > > is better to split the THP before swapping out. In this way, the > > sub-pages not mapped will be freed, and we can avoid the unnecessary > > swap out operations for these sub-pages. > > > > Cc: Johannes Weiner > > Signed-off-by: "Huang, Ying" > > Acked-by: Johannes Weiner > > CC Kirill to double check the reasoning here Looks good to me: Acked-by: Kirill A. Shutemov -- Kirill A. Shutemov