Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp178827lqd; Tue, 23 Apr 2024 20:52:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXe3glOsVhcx938hONllfazV0GxMymzVNM+7l+aYr6jjsF1R5qgHSIOh5qFPl4WqxLoMhPZ8ADYzZ6xdmmR1SXS/6Gljzb/fMdtDbEjBw== X-Google-Smtp-Source: AGHT+IES4KaaM6etanlNPb2B+JR8eWoGNou14jSUmKjVL/aa5W/g+arhscjWA9Z+SVTUyRlgRT/M X-Received: by 2002:ac8:5984:0:b0:43a:387:a005 with SMTP id e4-20020ac85984000000b0043a0387a005mr1423367qte.57.1713930778393; Tue, 23 Apr 2024 20:52:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713930778; cv=pass; d=google.com; s=arc-20160816; b=osnfFjSeRouSkOu60ArDRkXRPOjv8Kpmzcs9lqn06kqAHheSaJzbW86YoLUzvd3Xpc rlkox02fUWEX1ZYpYQMTuFnwWmWqCExk9nDowx8d38kzcyugQNvKPKjSyQPVx4PDakes M1zlrElXSB8YB3x81IfFthp9mA5t3naAJWcbJoHO4j8+zm0mwbqVHQWhEITwZ7eIQyB5 WDRpkXqERiz4K8Bm1ChOCKhH5fzJQzY03L1xA6SJZY1TbNuGboPRBLCsHYbiiWZWc/rQ FqWDO3qWIqLzeeGqrWpQIPmrAzd7oHXzcG44Y72bSgLfunQ4c5u6IF4+/pGRnmCV1F6H hYUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id:dkim-signature; bh=ZvxFBpP6Srhkt4fBNm1R3664oVz/K43/BSO9nAVF7Rw=; fh=dgsYxuZw6/HiUMhgytEj/BtPTPt/oSZW1lAl9PiYVBI=; b=Vsol+Ple4agEnaa/inVpcuyIvnyO5nYkVr+BcoIgd2wiZmS5odavyJGqo4OZ7JyNeB cpiYJcfcQkjB4c9+JAhF1xDZeN5xxA71J/2zL5PmlH/fkbqBkrS6CaetZ8/Ytwe4qRR7 V/i9MZ3ekY2tpzQ7Sdv13BTmR153052/JqcT+4ujgfnsG3j0qxp7lu5ZkStwk0fJYxVE 8oSQ1hdi+vsJxzlwf6pN5knRpa3rKj0tnIaqtd81KL0OItPvgfbUqx3jZQezxwry/uJW En5U5OzXTk1dBXMUws4RQ9G3WNKRlwkKHO+OokrOAFznWYFpIJ2dd7rey3oYVeeLJoLO f1qQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=ALyi8zv6; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-156250-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156250-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v33-20020a05622a18a100b0043784e9d609si14604981qtc.16.2024.04.23.20.52.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 20:52:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156250-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=ALyi8zv6; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-156250-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156250-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AD95F1C22D80 for ; Wed, 24 Apr 2024 03:52:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4B3613D8AA; Wed, 24 Apr 2024 03:49:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="ALyi8zv6" Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) (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 6FD9114389F for ; Wed, 24 Apr 2024 03:49:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.119 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713930556; cv=none; b=up7+l26KRcSGCSskA7OVFITazMfKk3pkkTYcCI9RR9rJ1v7R5bUssEbW+R0w9Z2Ck0fw1q9sRQJya04mDvFdYGnweSjVG0TA/Z5GwQT6xXlimY8YpqRKDFkKQSnTofjs/aEtImEgHIF9S0yvrA2cq8U1Kn6ARqZ3SMMwdD4FCAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713930556; c=relaxed/simple; bh=MC5b24qmRWGMif1/e9SVwA1RDF2UvmCagUxnkyjCM9c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=QGru8mDlt3GIhWeDUZoz0Wijg9avViV02yYjd8w6prxnfMTUCL8JFZoLQUowFqNPrFMYkzyvXr96Ca2NbsQLRs0L8ry8TJEMHRxbTXLXskGHdTJHp3ffYYUh160DXtv0zH7OH8d4/6hseXP/cRRZlswyBQWHrvVINPrBlCJ0Fls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=ALyi8zv6; arc=none smtp.client-ip=115.124.30.119 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1713930551; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=ZvxFBpP6Srhkt4fBNm1R3664oVz/K43/BSO9nAVF7Rw=; b=ALyi8zv6WGpL6MiZ04cRVHjzMGNBFWOOJe+BO6EgRHWPan0PkPGD3TaXgNAjA9eVI3ttrf7puZGu9WlX1ifRtdCIw9cY8gewlz0NdyskaMhh7g/hcmkzGB/nWV0rVFqzmyWFkdfDvVhj9JYy7V8X/bEZi5TjiVrltZr8GNyBaMI= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033022160150;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0W5AlpPx_1713930506; Received: from 30.97.56.58(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0W5AlpPx_1713930506) by smtp.aliyun-inc.com; Wed, 24 Apr 2024 11:49:09 +0800 Message-ID: Date: Wed, 24 Apr 2024 11:49:08 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 5/5] mm: shmem: add anonymous share mTHP counters To: Lance Yang Cc: 21cnbao@gmail.com, akpm@linux-foundation.org, david@redhat.com, hughd@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, ryan.roberts@arm.com, shy828301@gmail.com, wangkefeng.wang@huawei.com, willy@infradead.org, ying.huang@intel.com, ziy@nvidia.com References: <20240423094502.4080-1-ioworker0@gmail.com> From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/4/23 19:22, Lance Yang wrote: > On Tue, Apr 23, 2024 at 5:46 PM Lance Yang wrote: >> >> On 2024/4/23 09:17, Barry Song wrote: >> [...] >>>> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h >>>> index 26b6fa98d8ac..67b9c1acad31 100644 >>>> --- a/include/linux/huge_mm.h >>>> +++ b/include/linux/huge_mm.h >>>> @@ -270,6 +270,8 @@ enum mthp_stat_item { >>>> MTHP_STAT_ANON_SWPOUT, >>>> MTHP_STAT_ANON_SWPOUT_FALLBACK, >>>> MTHP_STAT_ANON_SWPIN_REFAULT, >>>> + MTHP_STAT_SHMEM_ANON_ALLOC, >>>> + MTHP_STAT_SHMEM_ANON_ALLOC_FALLBACK, > > Seems like you forgot to add the FILE_FALLBACK_CHARGE counter > in this patch :) > > IIUC, you've excluded the THP_FILE_FALLBACK_CHARGE counter > for PTE-mapped mTHP that size < PMD in patch3. Yes, will add in next version.