From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx172.postini.com [74.125.245.172]) by kanga.kvack.org (Postfix) with SMTP id 6A2FA6B0044 for ; Mon, 9 Apr 2012 03:55:13 -0400 (EDT) Received: from m4.gw.fujitsu.co.jp (unknown [10.0.50.74]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id B75063EE0B6 for ; Mon, 9 Apr 2012 16:55:11 +0900 (JST) Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 952C045DE50 for ; Mon, 9 Apr 2012 16:55:11 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 7D21545DE4E for ; Mon, 9 Apr 2012 16:55:11 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 6F39FE18003 for ; Mon, 9 Apr 2012 16:55:11 +0900 (JST) Received: from ml13.s.css.fujitsu.com (ml13.s.css.fujitsu.com [10.240.81.133]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 2A3EE1DB8037 for ; Mon, 9 Apr 2012 16:55:11 +0900 (JST) Message-ID: <4F829575.4020704@jp.fujitsu.com> Date: Mon, 09 Apr 2012 16:53:25 +0900 From: KAMEZAWA Hiroyuki MIME-Version: 1.0 Subject: Re: [PATCH 2/2] huge-memory: Use fast mm counters for transparent huge pages References: <1333202997-19550-1-git-send-email-andi@firstfloor.org> <1333202997-19550-3-git-send-email-andi@firstfloor.org> In-Reply-To: <1333202997-19550-3-git-send-email-andi@firstfloor.org> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Andi Kleen Cc: linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, linux-mm@kvack.org, Andi Kleen , aarcange@redhat.com (2012/03/31 23:09), Andi Kleen wrote: > From: Andi Kleen > > We found that the mm struct anon page counter cache line is much hotter > with transparent huge pages compared to small pages. > > Small pages use a special fast counter mechanism in task_struct, but huge pages > didn't. The huge pages are larger than the normal 64 entry threshold for the > fast counter, so it cannot be directly used. Use a new special counter for huge > pages to handle them efficiently. > > Any users just calculate the correct total. > > The only special case is transferring the large page count to small pages > when splitting. I put it somewhat arbitarily into the tricky split > sequence. Some review on this part is appreciated. > > [An alternative would be to not do that, but that could lead to > negative counters. These should still give the correct result] > > Contains a fix for a problem found by Andrea in review. > > Cc: aarcange@redhat.com > Signed-off-by: Andi Kleen Acked-by: KAMEZAWA Hiroyuki -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ 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 S1755316Ab2DIHzO (ORCPT ); Mon, 9 Apr 2012 03:55:14 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:41502 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753569Ab2DIHzM (ORCPT ); Mon, 9 Apr 2012 03:55:12 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <4F829575.4020704@jp.fujitsu.com> Date: Mon, 09 Apr 2012 16:53:25 +0900 From: KAMEZAWA Hiroyuki User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Andi Kleen CC: linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, linux-mm@kvack.org, Andi Kleen , aarcange@redhat.com Subject: Re: [PATCH 2/2] huge-memory: Use fast mm counters for transparent huge pages References: <1333202997-19550-1-git-send-email-andi@firstfloor.org> <1333202997-19550-3-git-send-email-andi@firstfloor.org> In-Reply-To: <1333202997-19550-3-git-send-email-andi@firstfloor.org> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (2012/03/31 23:09), Andi Kleen wrote: > From: Andi Kleen > > We found that the mm struct anon page counter cache line is much hotter > with transparent huge pages compared to small pages. > > Small pages use a special fast counter mechanism in task_struct, but huge pages > didn't. The huge pages are larger than the normal 64 entry threshold for the > fast counter, so it cannot be directly used. Use a new special counter for huge > pages to handle them efficiently. > > Any users just calculate the correct total. > > The only special case is transferring the large page count to small pages > when splitting. I put it somewhat arbitarily into the tricky split > sequence. Some review on this part is appreciated. > > [An alternative would be to not do that, but that could lead to > negative counters. These should still give the correct result] > > Contains a fix for a problem found by Andrea in review. > > Cc: aarcange@redhat.com > Signed-off-by: Andi Kleen Acked-by: KAMEZAWA Hiroyuki