From mboxrd@z Thu Jan 1 00:00:00 1970 From: Balbir Singh Subject: Re: [PATCH -mm -v6 2/9] mm, memcg: Support to charge/uncharge multiple swap entries Date: Wed, 08 Mar 2017 22:37:56 +1100 Message-ID: <1488973076.13674.5.camel@gmail.com> References: <20170308072613.17634-1-ying.huang@intel.com> <20170308072613.17634-3-ying.huang@intel.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=7a9xFlCgiwbvXAEdN3gdDJqWvjSPPrn3CSYL5tF+mNU=; b=ItLl79uuM4/q9fy6a3kwB58W05dJAer9s+jaYfmfsRoIXP944J2Mstz+RcRYlyTFNT SrgV+HKvzFzmYORgLB9rECK1Z65I3Wh9KzNGZGSiPj16bjX/quq5aFgSU0GCJJFiKSJ2 30t/PB+C9CZzrA7ITqCQcplXw4Yk0vTNSLGb7Tpyg4zPPpRXS0KpGALjYy/wl4o3V4us z4cylyY7FINIR5jFnWsQXxbSqfJhrVRkuZL1GCTVsrfV0Lgq4TWkpAyBL/oN36kNMRwW rTvVYEVblD8kR7U8AXL2e+xC61iuEno7cUSE+uJCZbxKWm8eCQT4LGCV3UvVdU157b+3 1IXg== In-Reply-To: <20170308072613.17634-3-ying.huang@intel.com> Sender: owner-linux-mm@kvack.org List-ID: Content-Type: text/plain; charset="utf-8" To: "Huang, Ying" , Andrew Morton Cc: 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 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) 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 Return-Path: Received: from mail-pg0-f69.google.com (mail-pg0-f69.google.com [74.125.83.69]) by kanga.kvack.org (Postfix) with ESMTP id 6CF22831D3 for ; Wed, 8 Mar 2017 06:38:34 -0500 (EST) Received: by mail-pg0-f69.google.com with SMTP id q126so52394689pga.0 for ; Wed, 08 Mar 2017 03:38:34 -0800 (PST) Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com. [2607:f8b0:400e:c00::244]) by mx.google.com with ESMTPS id v26si3024234pfa.151.2017.03.08.03.38.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 03:38:33 -0800 (PST) Received: by mail-pf0-x244.google.com with SMTP id v190so3545092pfb.0 for ; Wed, 08 Mar 2017 03:38:33 -0800 (PST) Message-ID: <1488973076.13674.5.camel@gmail.com> Subject: Re: [PATCH -mm -v6 2/9] mm, memcg: Support to charge/uncharge multiple swap entries From: Balbir Singh Date: Wed, 08 Mar 2017 22:37:56 +1100 In-Reply-To: <20170308072613.17634-3-ying.huang@intel.com> References: <20170308072613.17634-1-ying.huang@intel.com> <20170308072613.17634-3-ying.huang@intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-linux-mm@kvack.org List-ID: To: "Huang, Ying" , Andrew Morton Cc: 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 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) 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 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752844AbdCHLkU (ORCPT ); Wed, 8 Mar 2017 06:40:20 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33366 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbdCHLkM (ORCPT ); Wed, 8 Mar 2017 06:40:12 -0500 Message-ID: <1488973076.13674.5.camel@gmail.com> Subject: Re: [PATCH -mm -v6 2/9] mm, memcg: Support to charge/uncharge multiple swap entries From: Balbir Singh To: "Huang, Ying" , Andrew Morton Cc: 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 Date: Wed, 08 Mar 2017 22:37:56 +1100 In-Reply-To: <20170308072613.17634-3-ying.huang@intel.com> References: <20170308072613.17634-1-ying.huang@intel.com> <20170308072613.17634-3-ying.huang@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.5-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) Balbir Singh