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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F81BC4708F for ; Mon, 31 May 2021 08:18:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C3FCF6124B for ; Mon, 31 May 2021 08:18:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3FCF6124B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 57B846B006E; Mon, 31 May 2021 04:18:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 503FD6B0070; Mon, 31 May 2021 04:18:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 357838D0001; Mon, 31 May 2021 04:18:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0085.hostedemail.com [216.40.44.85]) by kanga.kvack.org (Postfix) with ESMTP id 015616B006E for ; Mon, 31 May 2021 04:18:55 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9B9BE181AEF1A for ; Mon, 31 May 2021 08:18:55 +0000 (UTC) X-FDA: 78200825430.16.E02C9A6 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by imf02.hostedemail.com (Postfix) with ESMTP id 199694202A17 for ; Mon, 31 May 2021 08:18:48 +0000 (UTC) Received: by mail-lj1-f178.google.com with SMTP id w15so13926374ljo.10 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=astrLgFkP/k0ZV86KkUvARQxrVRyozIW2Q5gFir0HMIETPpQZ7U2yyeVBrGk9myUzq 7gsgqm/Z4ZNFjtdRyMMtPcNb00u4AJ1Av/+r5HsTTVDKuG9WNkYyFO/g9I9yECxKNPD6 gR2dn+e+lvB8RCKdCovFLSlJHi1tiFcOmX5u5cSJyQopMKDV20oFxEqygqsM+zwYsTd3 d75nMZvyV60AuLoqYfwTyDC0ZIkVGMkYRa5UPhXZqf1vF8KVBzP2pq2oo1dRD1zcoZnK 70nMR2If+85NmW6u4tnFGIbtrxM5Bo2QQfWXgbW0whrH4/AGk9e5GfgPC/yudEPjnRL4 L2qA== X-Gm-Message-State: AOAM533X22aXeqBptnO2QWNaIo81WZ/lz3MhRW2GbiirJ3Oi22a50qOa ZcQ+wnYOnS3JPZhSTYsYrQf8Ug== X-Google-Smtp-Source: ABdhPJwieaHPWorJZ0rfE2GNJZbjRbclneCqk8ih2fHLZQ9Ig7teqHk08zcrfZYThg6rMjHRiLVuAw== 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: X-Rspamd-Queue-Id: 199694202A17 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=i9aZOtW9; spf=none (imf02.hostedemail.com: domain of kirill@shutemov.name has no SPF policy when checking 209.85.208.178) smtp.mailfrom=kirill@shutemov.name; dmarc=none X-Rspamd-Server: rspam04 X-Stat-Signature: hkcf4ieusznkzg6ch8ka8wg6obk3b7k7 X-HE-Tag: 1622449128-879809 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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