Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2870484lqt; Tue, 23 Apr 2024 04:24:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXn/Xdz79IzJWm1ezDoyfssptl63NLfW7hF9NjFRcBhOcr6xznputU6VRhv1BX0tSKuvXrM+pR33KRTJoluV+dZHQ9VafPdw1VkoHJV6g== X-Google-Smtp-Source: AGHT+IGEyftRpqQYZSGUKOHMn0QjSGP5ZFFXJ2Dy8a8maM165E6KGWmZq8RgkWBn1tFpRD1BrNHY X-Received: by 2002:a17:902:ce91:b0:1e5:5bd7:e2b7 with SMTP id f17-20020a170902ce9100b001e55bd7e2b7mr15939670plg.34.1713871485853; Tue, 23 Apr 2024 04:24:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713871485; cv=pass; d=google.com; s=arc-20160816; b=uzTOS+ONxgsMa1f0kAC6cKq3zTkjVP1TOErVIm5pq2L38ctQiHvFAXOov5RaX94UBV 3hDwShTJ3Q7ZcATMi+erAhbLggrcfv+KSqZRYalkJJv0dAA6cs5ieT87sY4LVSKCaHWa zrJfBT0J6wHKsglEBnxcoJ4ezwqUrVb4rNqtiV3DnPzilckyXSRORRD27fPVxJ6Kvt4n U4or5WOdozGP0WWwoPO9CsJ/Fx2SPZasjJMXODML+b22CS5LtdpW5sAZo6rJSpJCE8zs SocsC6bFS3jACgZckbluR4h4KY0oDnSTyTGNinCZKRCA0rbVdFAez1+7MR4BmazzDOAg Wpvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=OCS8fRpekX+YjGc4xeW0Y4W18c0mRC7QxqGPnQI7/MY=; fh=3pj151/dKvIHwqqBZ0GshOo89+LmAwXPrN3NEW6pkhE=; b=LsZSdhURyJMR+9wij7dEtxzXlYN/Hf19B0DlU4sFa8+Q3aI9+8t3wrmHMEQWCnyj89 OX+2dXN/IccfGlWUd4/UttyAefDt/QzW/l9CEtb7G7E6HlHOTRZIDuUILPwtHaZzr5qZ rZUUFIdnmHyvf6BbDFLLLgGyo09lesVUukAQ0uzMt40A1d38PNxUcjANk7MAvzl/tjq1 A2j756FXq616eNZvKIyjpztCU4oi8YibNJYJ+idMBRcNZQ194vFp0z/JCNjwX5QhagkI I8N/QgFsyAaHDPwyktJ9T9YEiDduAw/1SGHcRv0h4XjiHegS9EKh6k5w0JXcUZf7gvCQ 3VZg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="NeMrtA/d"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-154971-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154971-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q12-20020a170902dacc00b001e7e0f108b9si9676546plx.199.2024.04.23.04.24.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 04:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154971-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="NeMrtA/d"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-154971-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154971-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4CAD6284040 for ; Tue, 23 Apr 2024 11:23:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 684C57E116; Tue, 23 Apr 2024 11:23:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NeMrtA/d" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 230BEE576 for ; Tue, 23 Apr 2024 11:23:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713871384; cv=none; b=M7GwmdLBIijUjQT/Rc8L47OF79T/qRL7QvwbYvPyCBB3/hZvD0zM31OqxBUDPpZ3fMB8DqCVCSnq3qEquTxTycp/utez5dHE5lu0agxSXrbxX73B1+55CQEDaVRkOqJA/ZOMs4IFC/2dyrfNiAPYQBzFzV/VUjqAb187a/m3Xj4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713871384; c=relaxed/simple; bh=obOctvhGEIuk1UNtkz6Iwi+t7WMEzW7Fgp1pbQVcO28=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=KSZbUX/NEQ+7KQuTMEKylruRhYF6/uZLD1sFHKhXAqjRtcG22UX0ASasZspDCrSOSCXOJDtQiYtgZOuPVkhPF+bxh6vYbL9zRD8zkIWLtn5fdBJLQj4n32X5/+lPEpICXTCh4qUtgPf57kn+kS4CFEclXFT6e3QtFEgDLuQDi3U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NeMrtA/d; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d87660d5c9so58451971fa.2 for ; Tue, 23 Apr 2024 04:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713871381; x=1714476181; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OCS8fRpekX+YjGc4xeW0Y4W18c0mRC7QxqGPnQI7/MY=; b=NeMrtA/dFTWIp1gFOmL1Gqgza8j7UkWp5+30BeB5lRd44kUeLLB0dglp5TbNL/TS9R b+drmvMCYxV+8OuQE1DhwzbG4gZI6bNh6UyknZep9ll6GBXvqO0cBUU6RQuJRnE+JzJc bdROKzl1vatoi8UrUXO/PKsSq842kb44HJsrBBRtX2VwHYvb+JWZjOr47jQ2LFFRs9kV 2QJalAZqdglMcPvTThKJPW46lBwyF+3FYTIPb8MhWcpNRaEs9agPyjDHmTLNo3+MN3g5 bjSQlxUECjayqlzuVzTorxx9q7HIT33wbQvzxgR9fYVeIfVkmKDQX3xsHkngeAU9sZq0 //Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713871381; x=1714476181; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OCS8fRpekX+YjGc4xeW0Y4W18c0mRC7QxqGPnQI7/MY=; b=hSIkDTssP5MFn24RA3VACV7bOOWWy0+XiWBI6FQTTnCo9bIBmtSV04FFe6Y2/Te1UJ 2qI8aOfRXsAxJfp4NWeZTfPu7UuxhVLuRLP4HJaPBXOH/A+HbpH8gYDRw/wsIzUtb7it gCP2HwM51CoRSKmTCUwu6UbIFDqgYzOynauxdy9pvAwrk28K1lhM6g5sbgZc7UEIAjOu RGJPZipe+Df5GqA9aL6S4xKzyNyPJzw51pBg0FoGbx0Lu1rvkdMLEtOzmwjzWpQ7uavc iBl6Ok34E1oOI1Hg6/L3ujWN1ox1EGPIOQYiSYwZinbwGy3f9+hFIMmhQzAG6GYk2JF3 5XzQ== X-Forwarded-Encrypted: i=1; AJvYcCXNpaMHdqe/EKWaeSpkO8MW0B6ki5xtvjKdw3/3pETs4OpgJTYVbUEVuFLkl152GXDjLFJG0gpfnqpKQro8QstvTNQ/wNf4462qgyLE X-Gm-Message-State: AOJu0YyhiB8Pu3JveZQmQEGIm0wJESTP1NaKH0cIsA0MQ1ejOVysH6WH KTu4h5fa8cH/dSBAZj9lMGnah0xJlo6uCkZ2r6CS51nAi2BJNXTt5jqdNuq8DR9R1BbgciGStHS YkoPlfhWk1pxq2DoyYRu5I8LRW1c= X-Received: by 2002:a2e:9e45:0:b0:2da:b1fc:7b8f with SMTP id g5-20020a2e9e45000000b002dab1fc7b8fmr10732453ljk.9.1713871381053; Tue, 23 Apr 2024 04:23:01 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240423094502.4080-1-ioworker0@gmail.com> In-Reply-To: <20240423094502.4080-1-ioworker0@gmail.com> From: Lance Yang Date: Tue, 23 Apr 2024 19:22:47 +0800 Message-ID: Subject: Re: [RFC PATCH 5/5] mm: shmem: add anonymous share mTHP counters To: baolin.wang@linux.alibaba.com 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 5:46=E2=80=AFPM Lance Yang wr= ote: > > 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. Thanks, Lance