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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 1E487C35240 for ; Wed, 29 Jan 2020 11:25:07 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D65CD20708 for ; Wed, 29 Jan 2020 11:25:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="0W7H46FM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D65CD20708 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 63EC06B0005; Wed, 29 Jan 2020 06:25:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5EF986B0006; Wed, 29 Jan 2020 06:25:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4DDF46B0007; Wed, 29 Jan 2020 06:25:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id 392116B0005 for ; Wed, 29 Jan 2020 06:25:06 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F027082499A8 for ; Wed, 29 Jan 2020 11:25:05 +0000 (UTC) X-FDA: 76430440170.24.board63_f58e46eabd61 X-HE-Tag: board63_f58e46eabd61 X-Filterd-Recvd-Size: 4554 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Wed, 29 Jan 2020 11:25:05 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id a13so18005960ljm.10 for ; Wed, 29 Jan 2020 03:25:05 -0800 (PST) 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=yuCTClL/pM7fgvSlPLx1qB/TzQ5SdJMl6/MOShIA1DQ=; b=0W7H46FMjIQyieXPqDTdHmsnT+fVvJJD10f3x0BOMctRvL9MkeTdx4VbdbHlRTBEN3 b5/NawDAfyQpEhbLgT0rwOvcpevf1CHvRnfPK+nWNiUWSGyImoO0vgtrGmVKW+uZx29r bBsFaVwVuNzEQGuzTVKaB1lufIwzDYjD7ErDm/9BiL+5qbFTXQ+Ady+yLKCnGSNAgMd3 W6mnYQvJTpgMGiYduy+scv4eX7iMsBIwYQPsUNpaNK3OyYiGdeXL9USXqvdYpFTTjSlw AraHVZkw1JBmq3Op+CNUrl6EEty11YBA5pwAZqGuiTKUaRJ47uGYaNwZMdUrsfU+3Fw7 +BBg== 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=yuCTClL/pM7fgvSlPLx1qB/TzQ5SdJMl6/MOShIA1DQ=; b=pjmGu9wSHbc2AE0quyA8MI2vVem7ZtanvxfbBwy3+dAjnR+wzTKImlMFterQWLuCw5 L/iDPVm1oW29GBMhRDAZOspIsE9Xxur/3yYgBx4YJsGNr73kWd4w0hiQ5MTYfe1bFVX8 pPMm6lzUp+yibUJX1rkyZFgot/tyQ1/dLroSik7uaiI/98Yqq3kJwEDSqL51OEtiYT3T KIryZzt7Jw/Tt1JMgnq19B/B3YiLJ/T9HxrBf9eN3/Bu0KNw8XjCUAfiGpWDidwKlRkU MKcolI8c6BeOFJio2N1vcuswFjVZJAj3f+lN3ZvH4lYc7HFDARJ4YJ7szJHthF0EpDmW Sk1A== X-Gm-Message-State: APjAAAUjIUPArxjAVIsByuj6LoCkM3We7PHS2vX8y4/6ebUgmQfmtO+L G/tH04/sCQ/mc9s4BulHSvgR/g== X-Google-Smtp-Source: APXvYqwyL72yG90SI0NWAGgcd0insDnp1IMG7ae6YjG0JpIiyNIWobcDnM8YcTAzCUBn1pD6tZdqCQ== X-Received: by 2002:a2e:809a:: with SMTP id i26mr16595052ljg.108.1580297103916; Wed, 29 Jan 2020 03:25:03 -0800 (PST) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id d9sm778410lja.73.2020.01.29.03.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2020 03:25:03 -0800 (PST) Received: by box.localdomain (Postfix, from userid 1000) id 04319100AFE; Wed, 29 Jan 2020 14:25:11 +0300 (+03) Date: Wed, 29 Jan 2020 14:25:10 +0300 From: "Kirill A. Shutemov" To: John Hubbard Cc: Andrew Morton , Al Viro , Christoph Hellwig , Dan Williams , Dave Chinner , Ira Weiny , Jan Kara , Jason Gunthorpe , Jonathan Corbet , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Michal Hocko , Mike Kravetz , Shuah Khan , Vlastimil Babka , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v2 1/8] mm: dump_page: print head page's refcount, for compound pages Message-ID: <20200129112510.ulims6u36ofk2qwa@box> References: <20200129032417.3085670-1-jhubbard@nvidia.com> <20200129032417.3085670-2-jhubbard@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200129032417.3085670-2-jhubbard@nvidia.com> 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 Tue, Jan 28, 2020 at 07:24:10PM -0800, John Hubbard wrote: > When debugging a problem that involves compound pages, it is extremely > helpful if dump_page() reports not only the page->_refcount, but also > the refcount of the head page of the compound page. That's because the > head page collects refcounts for the entire compound page. > > Therefore, enhance dump_page() so as to print out the refcount of the > head page of a compound page. > > This approach (printing information about a struct page that is not the > struct page that was passed into dump_page()) has a precedent: > compound_mapcount is already being printed. refcount on a tail must always be 0. I think we should only print it when it is non-zero, emphasizing this fact with a standalone message. -- Kirill A. Shutemov