Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp612478pxb; Wed, 27 Jan 2021 16:46:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2tb6LcwiFAGNAAdRfcnYkGBJOa3RdXIVjXH+r9JvKdhsNJLRnHaGiDyW3SApexdBKcqgu X-Received: by 2002:a17:906:c09:: with SMTP id s9mr8738383ejf.539.1611794776904; Wed, 27 Jan 2021 16:46:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611794776; cv=none; d=google.com; s=arc-20160816; b=OZ/JB1bSxe48XUgSPOjX9LZvmSH9noMRIfk3sDy+aYMNiCbQffsIrebPIyCQzSTcgi SyVPiJSyioI88lnYX6pTuCaUTNGtuJxQRWe5f6G0u0nj4+IvZhk7ZPUyV1HJEKB4afdZ cWlbgCaxF8GxCc1TfDz2wLHacgtvP6HdMjmElASrbsHr8HmEjXY1R72hFtkgQHoKxEYP lRf/oEdmQlVHfh6JN4D2xGP2sw8K7Grrhko5DlJ8qK/yxcWAbJdFxF0wG2NZIW0rLpIb gaSBy3Qc34b60U1rCyblQKI0kiqjNUv8DDVQ35ADyXjk8O5c8X47UDALLMyxYfqtOgZB 3f9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=kZWSNPqEKQx9oaCAZI/IANPCF8QkzWgu1zUqU8OXMEY=; b=CVR84xgsBjFpT8kQeNy/fjioeIc1yofvrhUuNfdKyJXlvcyTcDoHHvsXmcy+GffY7V RFnJH4iS9zHW+3gI8s+7UhRg1DPkrxthz1/Ud/ZY3wFQAxFsnVoE2K5Bthr6i3kNxl8Y wtySx+JnnNS2K7uft8rzB/XrfFkhEMmH8/K0aIOUBGHdpePs46Onod+ZGwZWLIao0mQY h4xQbKhENFfaBDRYfUn+w5SPNJTv97Bla7ox5pKoUsefBmFbsNUhDG0g+BLcyPGTOaaY yDhyBlhDDXcWjJgAfcQ98eDz5049M6ZAJbNW2qsHO53a564PuiFtDjbp4oaeDKWJo6Lc oCuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=ifvVOVVx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si1544255ejb.499.2021.01.27.16.45.52; Wed, 27 Jan 2021 16:46:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=ifvVOVVx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233433AbhA0XFG (ORCPT + 99 others); Wed, 27 Jan 2021 18:05:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233495AbhA0XBC (ORCPT ); Wed, 27 Jan 2021 18:01:02 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47FABC061573 for ; Wed, 27 Jan 2021 15:00:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=kZWSNPqEKQx9oaCAZI/IANPCF8QkzWgu1zUqU8OXMEY=; b=ifvVOVVxYfXfYKhM2Xa7zGG/lC Pff/1FS4RmBAAFrFurrQziXiY9iOvKmr7LGry9j5CL4Dtc/ln2o43Bdp1zynC1KlX/PO/xpmzW2VQ 6VWTEcUvJUr8q6DekcJ7dszjGk1Nqdr+9PLERVgv6wubgOE+ahLlv719Cpy+splY1tUrSomb1jMQO awd2nHVL1CBlLVh20CbFPnOCrUw83pRnQaskIxvf9MvQIab1H66KvIL92chOic/lcgATqmJB+6TUR qDX3mm2uHRO0QwGzhI9Zb4O/C0KnuBVgMZI2m/P6HlpZjVAO0Bh4tfeSQZyjZpprlxicH1B2SzV8x zUvqrcfQ==; Received: from [2601:1c0:6280:3f0::7650] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1l4tnN-0007rY-D7; Wed, 27 Jan 2021 23:00:17 +0000 Subject: Re: [PATCH V3] x86/mm: Tracking linear mapping split events To: Saravanan D , x86@kernel.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com References: <20210127225059.246646-1-saravanand@fb.com> From: Randy Dunlap Message-ID: <9ea21e39-5642-cc84-ab2d-a813cdb773cd@infradead.org> Date: Wed, 27 Jan 2021 15:00:11 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20210127225059.246646-1-saravanand@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/21 2:50 PM, Saravanan D wrote: > To help with debugging the sluggishness caused by TLB miss/reload, > we introduce monotonic lifetime hugepage split event counts since > system state: SYSTEM_RUNNING to be displayed as part of > /proc/vmstat in x86 servers > > The lifetime split event information will be displayed at the bottom of > /proc/vmstat > .... > swap_ra 0 > swap_ra_hit 0 > direct_map_2M_splits 167 > direct_map_1G_splits 6 > nr_unstable 0 > .... > > One of the many lasting (as we don't coalesce back) sources for huge page > splits is tracing as the granular page attribute/permission changes would > force the kernel to split code segments mapped to huge pages to smaller > ones thereby increasing the probability of TLB miss/reload even after > tracing has been stopped. > > Signed-off-by: Saravanan D > --- > arch/x86/mm/pat/set_memory.c | 18 ++++++++++++++++++ > include/linux/vm_event_item.h | 8 ++++++++ > mm/vmstat.c | 8 ++++++++ > 3 files changed, 34 insertions(+) Documenation/ update, please. -- ~Randy