From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 642EDC433EF for ; Mon, 20 Jun 2022 08:15:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03DCC8E0001; Mon, 20 Jun 2022 04:15:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F2EFC6B0074; Mon, 20 Jun 2022 04:15:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E1E408E0001; Mon, 20 Jun 2022 04:15:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id D434A6B0073 for ; Mon, 20 Jun 2022 04:15:21 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id AE78780B50 for ; Mon, 20 Jun 2022 08:15:21 +0000 (UTC) X-FDA: 79597904442.04.FFC3B2E Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by imf17.hostedemail.com (Postfix) with ESMTP id 0E0274000C for ; Mon, 20 Jun 2022 08:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1655712921; x=1687248921; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xq6zEn6uVMYjR4CpQtb8F3SebvExuhNNdlj7lnspcBY=; b=H4EYbsnBDZ2W1assWHlqOkzj4AFqjuypNohUuuSAO+vi1DH5MROA+vpA ZMgP3i5wmuFDfwrb8gY5nsjuxWI+iCl9O1Lv3kHalh8J6woSdDB0PDGbt EgRvPasABRAr3mAUQjxs9mfkt1U4BWFwYuWQybstY+KX0t9W10E80N0SZ dAwzEE4o1sweGT2g2mGWkn8LJtbLQD852FN9O6i/l6tkc9XzR/mDSloV1 Vh3T3o71Dbt5b+bfv2LKFK2/8VdLtxBzxy5OawtttS6VLHsTwjn7quyJN YJ7yr1riH6rvJxz4bHj9lrlAOxC6Vj2fblxbYS9xAtrtpPi3yI7n8mokX g==; Date: Mon, 20 Jun 2022 10:15:19 +0200 From: Vincent Whitchurch To: "akpm@linux-foundation.org" , Jonathan Corbet CC: kernel , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-doc@vger.kernel.org" Subject: Re: [PATCH v2] mm/smaps: add Pss_Dirty Message-ID: <20220620081518.GA26066@axis.com> References: <20220620081251.2928103-1-vincent.whitchurch@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220620081251.2928103-1-vincent.whitchurch@axis.com> User-Agent: Mutt/1.10.1 (2018-07-13) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655712921; a=rsa-sha256; cv=none; b=7XuVgweGezy6EmdsCogqoU6loaroln5xfiIQ8zN20QGzTI0HjQowJdTISn+RBbEwm3OcAk nu5REHnpdDTwnxrsv2U/Oy5C5dN7DHtqJo3LL9O458mce5OhsPRLG7btBQWI20RCRlOw7L BWapB5G+Rn5dXnffzTh4SKMUwF8IrEs= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=axis.com header.s=axis-central1 header.b=H4EYbsnB; dmarc=pass (policy=none) header.from=axis.com; spf=pass (imf17.hostedemail.com: domain of Vincent.Whitchurch@axis.com designates 195.60.68.17 as permitted sender) smtp.mailfrom=Vincent.Whitchurch@axis.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655712921; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xq6zEn6uVMYjR4CpQtb8F3SebvExuhNNdlj7lnspcBY=; b=f95e5OEdm9tLftcKTkNkQuPsMOLJPGig+91aAaCsuq2UpLidOOe6WfQEu/F6urbeGKq/wr jXUfrD6ftHfYCrodTBZg604gJIiYoXuAeAkeIb0N7W5YGWRHV/slMzi2JT9Y8WlLpkRVQl kG5/7fni3NC+ZTWlWwWHI/KE3jTRfWM= X-Rspamd-Server: rspam01 X-Rspam-User: Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=axis.com header.s=axis-central1 header.b=H4EYbsnB; dmarc=pass (policy=none) header.from=axis.com; spf=pass (imf17.hostedemail.com: domain of Vincent.Whitchurch@axis.com designates 195.60.68.17 as permitted sender) smtp.mailfrom=Vincent.Whitchurch@axis.com X-Stat-Signature: ypko4uoc5h3wg35fq3se3qzeaxhse3kb X-Rspamd-Queue-Id: 0E0274000C X-HE-Tag: 1655712920-659194 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001241, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 20, 2022 at 10:12:50AM +0200, Vincent Whitchurch wrote: > Pss is the sum of the sizes of clean and dirty private pages, and the > proportional sizes of clean and dirty shared pages: > > Private = Private_Dirty + Private_Clean > Shared_Proportional = Shared_Dirty_Proportional + Shared_Clean_Proportional > Pss = Private + Shared_Proportional > > The Shared*Proportional fields are not present in smaps, so it is not > always possible to determine how much of the Pss is from dirty pages and > how much is from clean pages. This information can be useful for > measuring memory usage for the purpose of optimisation, since clean > pages can usually be discarded by the kernel immediately while dirty > pages cannot. > > The smaps routines in the kernel already have access to this data, so > add a Pss_Dirty to show it to userspace. Pss_Clean is not added since > it can be calculated from Pss and Pss_Dirty. > > Signed-off-by: Vincent Whitchurch > --- I forgot to include the changelog: v2: - Update Documentation/ABI/testing/procfs-smaps_rollup and Documentation/filesystems/proc.rst. - Move Pss_Dirty next to Pss so that the location is consistent between non-rollup and rollup (since the later has some extra Pss* fields).