From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758327AbcIHI2v (ORCPT ); Thu, 8 Sep 2016 04:28:51 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51137 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758304AbcIHI2t (ORCPT ); Thu, 8 Sep 2016 04:28:49 -0400 X-IBM-Helo: d23dlp01.au.ibm.com X-IBM-MailFrom: khandual@linux.vnet.ibm.com X-IBM-RcptTo: cgroups@vger.kernel.org;linux-kernel@vger.kernel.org Date: Thu, 08 Sep 2016 13:58:36 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Huang, Ying" , Andrew Morton CC: tim.c.chen@intel.com, dave.hansen@intel.com, andi.kleen@intel.com, aaron.lu@intel.com, 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 Subject: Re: [PATCH -v3 03/10] mm, memcg: Support to charge/uncharge multiple swap entries References: <1473266769-2155-1-git-send-email-ying.huang@intel.com> <1473266769-2155-4-git-send-email-ying.huang@intel.com> In-Reply-To: <1473266769-2155-4-git-send-email-ying.huang@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16090808-1617-0000-0000-00000154AE9C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16090808-1618-0000-0000-000046AA020B Message-Id: <57D12134.40604@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-08_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1609080123 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/07/2016 10:16 PM, 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 continuous swap entries (512 on x86_64) backing one Please use HPAGE_SIZE / PAGE_SIZE instead of hard coded number like 512.