From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932141AbdCIBaL (ORCPT ); Wed, 8 Mar 2017 20:30:11 -0500 Received: from mga03.intel.com ([134.134.136.65]:48815 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbdCIBaJ (ORCPT ); Wed, 8 Mar 2017 20:30:09 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,266,1486454400"; d="scan'208";a="57911770" From: "Huang\, Ying" To: Balbir Singh Cc: "Huang\, Ying" , Andrew Morton , , , Andrea Arcangeli , "Kirill A . Shutemov" , Vladimir Davydov , Johannes Weiner , Michal Hocko , Tejun Heo , Subject: Re: [PATCH -mm -v6 2/9] mm, memcg: Support to charge/uncharge multiple swap entries References: <20170308072613.17634-1-ying.huang@intel.com> <20170308072613.17634-3-ying.huang@intel.com> <1488973076.13674.5.camel@gmail.com> Date: Thu, 09 Mar 2017 09:28:52 +0800 In-Reply-To: <1488973076.13674.5.camel@gmail.com> (Balbir Singh's message of "Wed, 8 Mar 2017 22:37:56 +1100") Message-ID: <87o9xbi6gb.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Balbir Singh writes: > On Wed, 2017-03-08 at 15:26 +0800, Huang, Ying wrote: >> From: Huang Ying >>  >> This patch make it possible to charge or uncharge a set of continuous >> swap entries in the swap cgroup.  The number of swap entries is >> specified via an added parameter. >>  >> This will be used for the THP (Transparent Huge Page) swap support. >> Where a swap cluster backing a THP may be allocated and freed as a >> whole.  So a set of (HPAGE_PMD_NR) continuous swap entries backing one >> THP need to be charged or uncharged together.  This will batch the >> cgroup operations for the THP swap too. > > A quick look at the patches makes it look sane. I wonder if we would > make sense to track THP swapout separately as well > (from a memory.stat perspective) The patchset is just the first step of THP swap optimization. So the THP will still be split after putting the THP into the swap cache. This makes it unnecessary to change mem_cgroup_swapout(). I am working on a following up patchset to further delaying THP splitting after swapping out the THP to the disk. In that patchset, I will change mem_cgroup_swapout() too. Best Regards, Huang, Ying > Balbir Singh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 38A42831FE for ; Wed, 8 Mar 2017 20:28:57 -0500 (EST) Received: by mail-pf0-f200.google.com with SMTP id l66so87011204pfl.6 for ; Wed, 08 Mar 2017 17:28:57 -0800 (PST) Received: from mga05.intel.com (mga05.intel.com. [192.55.52.43]) by mx.google.com with ESMTPS id x126si4830596pgx.184.2017.03.08.17.28.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 17:28:56 -0800 (PST) From: "Huang\, Ying" Subject: Re: [PATCH -mm -v6 2/9] mm, memcg: Support to charge/uncharge multiple swap entries References: <20170308072613.17634-1-ying.huang@intel.com> <20170308072613.17634-3-ying.huang@intel.com> <1488973076.13674.5.camel@gmail.com> Date: Thu, 09 Mar 2017 09:28:52 +0800 In-Reply-To: <1488973076.13674.5.camel@gmail.com> (Balbir Singh's message of "Wed, 8 Mar 2017 22:37:56 +1100") Message-ID: <87o9xbi6gb.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: Balbir Singh Cc: "Huang, Ying" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrea Arcangeli , "Kirill A . Shutemov" , Vladimir Davydov , Johannes Weiner , Michal Hocko , Tejun Heo , cgroups@vger.kernel.org Balbir Singh writes: > On Wed, 2017-03-08 at 15:26 +0800, Huang, Ying wrote: >> From: Huang Ying >>A >> This patch make it possible to charge or uncharge a set of continuous >> swap entries in the swap cgroup.A A The number of swap entries is >> specified via an added parameter. >>A >> This will be used for the THP (Transparent Huge Page) swap support. >> Where a swap cluster backing a THP may be allocated and freed as a >> whole.A A So a set of (HPAGE_PMD_NR) continuous swap entries backing one >> THP need to be charged or uncharged together.A A This will batch the >> cgroup operations for the THP swap too. > > A quick look at the patches makes it look sane. I wonder if we would > make sense to track THP swapout separately as well > (from a memory.stat perspective) The patchset is just the first step of THP swap optimization. So the THP will still be split after putting the THP into the swap cache. This makes it unnecessary to change mem_cgroup_swapout(). I am working on a following up patchset to further delaying THP splitting after swapping out the THP to the disk. In that patchset, I will change mem_cgroup_swapout() too. Best Regards, Huang, Ying > Balbir Singh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Huang\, Ying" Subject: Re: [PATCH -mm -v6 2/9] mm, memcg: Support to charge/uncharge multiple swap entries Date: Thu, 09 Mar 2017 09:28:52 +0800 Message-ID: <87o9xbi6gb.fsf@yhuang-dev.intel.com> References: <20170308072613.17634-1-ying.huang@intel.com> <20170308072613.17634-3-ying.huang@intel.com> <1488973076.13674.5.camel@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <1488973076.13674.5.camel@gmail.com> (Balbir Singh's message of "Wed, 8 Mar 2017 22:37:56 +1100") Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="utf-8" To: Balbir Singh Cc: "Huang, Ying" , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrea Arcangeli , "Kirill A . Shutemov" , Vladimir Davydov , Johannes Weiner , Michal Hocko , Tejun Heo , cgroups@vger.kernel.org Balbir Singh writes: > On Wed, 2017-03-08 at 15:26 +0800, Huang, Ying wrote: >> From: Huang Ying >>  >> This patch make it possible to charge or uncharge a set of continuous >> swap entries in the swap cgroup.  The number of swap entries is >> specified via an added parameter. >>  >> This will be used for the THP (Transparent Huge Page) swap support. >> Where a swap cluster backing a THP may be allocated and freed as a >> whole.  So a set of (HPAGE_PMD_NR) continuous swap entries backing one >> THP need to be charged or uncharged together.  This will batch the >> cgroup operations for the THP swap too. > > A quick look at the patches makes it look sane. I wonder if we would > make sense to track THP swapout separately as well > (from a memory.stat perspective) The patchset is just the first step of THP swap optimization. So the THP will still be split after putting the THP into the swap cache. This makes it unnecessary to change mem_cgroup_swapout(). I am working on a following up patchset to further delaying THP splitting after swapping out the THP to the disk. In that patchset, I will change mem_cgroup_swapout() too. Best Regards, Huang, Ying > Balbir Singh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org