Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2415408pxj; Mon, 31 May 2021 01:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBoVgsX4Ij66QGHOBPFsvl8Yvylb+pPwTDOGjlN9cihOnRWaxFNevN6qeiomoXJVHp4Mrg X-Received: by 2002:a17:906:6d45:: with SMTP id a5mr2577986ejt.399.1622449225139; Mon, 31 May 2021 01:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622449225; cv=none; d=google.com; s=arc-20160816; b=DH2+0DzFS+GdUz0VMRJKkMW0neO6f/RSJFosl2GHmViZIUL9LjDhS4cQGDZHxIKT/n QdgT133YKLKLmpc82kgQqp9Pb2+QVia7S1WSZlklXPnWEGP1NNXU2INxprv5Zda//Y34 XgLv3kUeIDU9WU0F1ZUtRFDNXo6Jk7BXS4jvSJqEEiT2+23pQGuPrVaFUVJrNEpQBziu w7WQVmaJx9TvAvyfCgdAQgKvMm8qobrxffdOuRPPUD3V8RfqMqrFSg4X3o1UP7ul4En+ hViq+ccsFfxVxtAE4TU3tD7VM70xZVUsYIQkADrp/UW+IgSQLuvPNvsi9Pw2M6vM+znC aBsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OVp+wPFCFyJ+KzFwSbEA0g+1392ap9nudUknWsgT4Fw=; b=MG1hknMXZLtV6EMhAqUL9rbU1Hlj2+/+40+kqfGkoOEDlZ9syPBkkSFcxxAutpEfsX Z+/bjGdbtMsUvlnWFMcdvBGryo5q7rghAKuOl5R1gB2ogBilz/6rla5+mJcDFEEP1wTn RNfbzaZtaS2x8BXRWlWfnnjOkDLvSDr1L0tBd+Snt1WEzy2Vf1v4g5jPAi364TzVM1fs SmoFvXlMhaKwuJALCAFUyK3qRoivDVuXvZkqxOlM/GKNLventh9YwCaFGbp/uEa3x55Y hrVO8PU4wK9uXM3bkQRcN7sUsB9dzTUJY5TcOOWhpWSwpMJx7dtv56qIi0vPaN0+Ze7B 5MgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=i9aZOtW9; 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 f25si14051106ejh.126.2021.05.31.01.20.01; Mon, 31 May 2021 01:20:25 -0700 (PDT) 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=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=i9aZOtW9; 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 S230111AbhEaIUj (ORCPT + 99 others); Mon, 31 May 2021 04:20:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbhEaIUg (ORCPT ); Mon, 31 May 2021 04:20:36 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 646C6C061574 for ; Mon, 31 May 2021 01:18:55 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 131so13967616ljj.3 for ; Mon, 31 May 2021 01:18:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OVp+wPFCFyJ+KzFwSbEA0g+1392ap9nudUknWsgT4Fw=; b=i9aZOtW9avfIMt2gE5xSAYQKfGHn6chKwsndAAOKCsL3WDHD9F/9g3Uki7lqf4flcQ 5eBxFBGY8YzipqXiicXV8vCIdPh6aEPrTsNr4sttn7lf4GUjQNlV0vbIg+adz6EPlpte aL/fe47lGw5i8onn44OiUE4S0/NycpJbfhevxtyCiMUzdlQhWJaXVF93V225msKLAqaQ aoGxrrrXe6R1NXZrSs6rcgwtU3JnuyNy4y2EGM7kMcce+Abgww/1VCA8sRvKUi9q7VsA 54NoNfySu//7buDdu1a4TNh4trPbc/BS0PNkmtTbfTJxWK7TzGMpdvHl7O9a0IZR5AoT XqLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OVp+wPFCFyJ+KzFwSbEA0g+1392ap9nudUknWsgT4Fw=; b=duW6pdkjnlMDjw113RxJWOnb+BXonbKIT2F7+nBbHAQQp+Hk2p9SFiF/lP0d5Jpi4k 8NAHV2SZ3n1J0auUA8QdntCM1n34Iib0/Qq3+TGg5v8+J5aHjepJG4VKncot83e9/f6V JTdOWcqJ/DHB3frUGrg2UWWagMbZssrQyYxWwkBl7b9EkmbiVQxNsjkb4BsNvNtios4Z 6lYs3yVFn2gat4lodxGwsttZlBcvNTNTxR9Q1Ty93tCINLdVHY3ciAmMatBZxg/XWzxZ ecKMT74QXDbdfiryVUu/UCM+Pn7FCDpHRog0T8NsY9n8h0uFIAJKUfCBS76OOcw5lDHc 3EpA== X-Gm-Message-State: AOAM530W8lqqnctdLdOT9B49q4tJwdKKcUQtzsGapqh0+R7QX4W+xQQz xbmMMrM0SsEvwKmFdVepRA7tBA== X-Received: by 2002:a2e:b04c:: with SMTP id d12mr15695403ljl.465.1622449133698; Mon, 31 May 2021 01:18:53 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id t14sm1261988lfk.186.2021.05.31.01.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 May 2021 01:18:52 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id 8E2D71027A9; Mon, 31 May 2021 11:19:02 +0300 (+03) Date: Mon, 31 May 2021 11:19:02 +0300 From: "Kirill A. Shutemov" To: Hugh Dickins Cc: Yang Shi , willy@infradead.org, jhubbard@nvidia.com, kirill.shutemov@linux.intel.com, vbabka@suse.cz, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mm: dump_page: print total mapcount for compound page Message-ID: <20210531081902.nm3lsw2lp3utrafy@box> References: <20210528175403.4506-1-shy828301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 28, 2021 at 12:47:31PM -0700, Hugh Dickins wrote: > > page if possible. But how to implement it safely seems controversial. > > Some ideas and potential problems have been discussed by > > https://lore.kernel.org/linux-mm/alpine.LSU.2.11.2105261733110.16920@eggly.anvils/. > > > > So I prepared this patch to show a possible approach to get some > > feedback. The same thing could be decoded by the reader of page dump > > as well by using the same formula used by this patch. However it sounds > > more convenient to have kernel do the math. > > > > mm/debug.c | 35 +++++++++++++++++++++++++++++------ > > 1 file changed, 29 insertions(+), 6 deletions(-) > > Adding that code to come up with a deceptive approximation to a number > which most sites won't care about: speaking for me, I'll say no. I agree. The approximation may bring more confusion than help debugging. -- Kirill A. Shutemov