From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78C9C148832 for ; Thu, 31 Oct 2024 08:29:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730363350; cv=none; b=tWBN0d0lIa1u0s4o6djtvUeSvlyl04W50XU6GivOZS3WtGhadY44zmKiH7Qin/nWJM/LskcZE76RaEiEZRD4fvFx52DsKzks5rURLOiH0WnMPoMx8jzpRo84Hd2YFBhUwdeiNaMrMv4HYM1OZMWjcresQVWdJQc5msSxSKuda78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730363350; c=relaxed/simple; bh=PMU0uMcMcWAKRKv+7T1kQKvTf9dp6QsnhlSRXNzeDls=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=aepjIrFi9GBlDIvk0BP26l+lMsvzCLZsTEvRj/cIf9wPA4/NPpDebVqSSBTw3u0REvFBPTSZ314MdLLPw8jjnYbSk2hKCqnOT9UHBIUv4MWzIwfD7s6dEJsMn/Ke5Dpy0UilEYX1xEHjCX69WyR0fDQoS+tKKgLIdUs89uomEtM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Wqn+JHSa; arc=none smtp.client-ip=198.175.65.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Wqn+JHSa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1730363348; x=1761899348; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=PMU0uMcMcWAKRKv+7T1kQKvTf9dp6QsnhlSRXNzeDls=; b=Wqn+JHSa4NY2eL9m/TcXDK3wcl+XxDpgdrANGYCGBt/+oRhvhF1U6EDi Vh7jgl+UfdI4GDnkwRZ4bzphMvbuTljqulvyJ9Hu/atbwwog98C83/ENw tBQ19KL6e+bYUhVtxGz8aP8ViqnRSQDy1IxMN464BhIBt46QaGTdZt/py ndrBt7Nu7I3Uw7FVvTRSMOQ1zjd5etoiiLh3L7lnVL24qXx/VUnJgu5Np X5jN1o6+80j+9OViutTvnV7lPYj1smLV0uvqMEDH+LqhDHInVxQFra5Ch Xo59yiIX5mpVadgwOVYB6JHBN3nElTohBHT5BlSbcHn4IAfOWnLaO6Dyx w==; X-CSE-ConnectionGUID: 2jfaCbhBR56EPyfzgcv7aQ== X-CSE-MsgGUID: hUhES1fJSa2VuFvLjdcfGA== X-IronPort-AV: E=McAfee;i="6700,10204,11241"; a="33878357" X-IronPort-AV: E=Sophos;i="6.11,247,1725346800"; d="scan'208";a="33878357" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2024 01:29:07 -0700 X-CSE-ConnectionGUID: N/dIxb3sTHmvY/EFOAgiIg== X-CSE-MsgGUID: koFOiFCLQAO4jPWqYR72Yw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,247,1725346800"; d="scan'208";a="82721743" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2024 01:29:04 -0700 From: "Huang, Ying" To: Barry Song <21cnbao@gmail.com> Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Barry Song , Baolin Wang , David Hildenbrand , Chris Li , Yosry Ahmed , Kairui Song , Ryan Roberts , Kanchana P Sridhar , Usama Arif Subject: Re: [PATCH v3] mm: add per-order mTHP swpin counters In-Reply-To: (Barry Song's message of "Thu, 31 Oct 2024 21:21:24 +1300") References: <20241031075325.1037-1-21cnbao@gmail.com> <874j4sae8y.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Thu, 31 Oct 2024 16:25:31 +0800 Message-ID: <87zfmk8yro.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Barry Song <21cnbao@gmail.com> writes: > On Thu, Oct 31, 2024 at 9:09=E2=80=AFPM Huang, Ying wrote: >> >> Barry Song <21cnbao@gmail.com> writes: >> >> > From: Barry Song >> > >> > This helps profile the sizes of folios being swapped in. Currently, >> > only mTHP swap-out is being counted. >> > The new interface can be found at: >> > /sys/kernel/mm/transparent_hugepage/hugepages-/stats/swpin >> > For example, >> > $ cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/swpin >> > 12809 >> > $ cat /sys/kernel/mm/transparent_hugepage/hugepages-32kB/stats/swpin >> > 4763 >> > >> > Signed-off-by: Barry Song >> > Reviewed-by: Baolin Wang >> > Acked-by: David Hildenbrand >> > Cc: Chris Li >> > Cc: Yosry Ahmed >> > Cc: "Huang, Ying" >> > Cc: Kairui Song >> > Cc: Ryan Roberts >> > Cc: Kanchana P Sridhar >> > Cc: Usama Arif >> > --- >> > -v3: minor refine changelog per Huang, Ying. thanks! >> > >> > Documentation/admin-guide/mm/transhuge.rst | 4 ++++ >> > include/linux/huge_mm.h | 1 + >> > mm/huge_memory.c | 3 +++ >> > mm/page_io.c | 3 +++ >> > 4 files changed, 11 insertions(+) >> > >> > diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentatio= n/admin-guide/mm/transhuge.rst >> > index 2a171ed5206e..5caa3fb2feb1 100644 >> > --- a/Documentation/admin-guide/mm/transhuge.rst >> > +++ b/Documentation/admin-guide/mm/transhuge.rst >> > @@ -534,6 +534,10 @@ zswpout >> > is incremented every time a huge page is swapped out to zswap in= one >> > piece without splitting. >> > >> > +swpin >> > + is incremented every time a huge page is swapped in from a non-z= swap >> > + swap device in one piece. >> > + >> > swpout >> > is incremented every time a huge page is swapped out to a non-zs= wap >> > swap device in one piece without splitting. >> >> In Documentation/ABI/testing/sysfs-kernel-mm-transparent-hugepage, I >> found >> >> " >> What: /sys/kernel/mm/transparent_hugepage/ >> Date: April 2024 >> Contact: Linux memory management mailing list >> Description: >> /sys/kernel/mm/transparent_hugepage/ contains a number o= f files and >> subdirectories, >> >> - defrag >> - enabled >> - hpage_pmd_size >> - khugepaged >> - shmem_enabled >> - use_zero_page >> - subdirectories of the form hugepages-kB,= where >> is the page size of the hugepages supported by= the kernel/CPU >> combination. >> >> See Documentation/admin-guide/mm/transhuge.rst for detai= ls. >> " >> >> So, Documentation/admin-guide/mm/transhuge.rst will be used as ABI >> document? > > Yes. this follows: > > sysfs-kernel-mm-hugepages: See > Documentation/admin-guide/mm/hugetlbpage.rst for details. > sysfs-kernel-mm-ksm: See Documentation/mm/ksm.rst for more > information. > sysfs-kernel-mm-transparent-hugepage: See > Documentation/admin-guide/mm/transhuge.rst for details. > Got it! Thanks! Feel free to add Acked-by: "Huang, Ying" in the future versions. -- Best Regards, Huang, Ying