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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 2F562C4724C for ; Thu, 7 May 2020 11:07:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E268320736 for ; Thu, 7 May 2020 11:07:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E268320736 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8DF50900006; Thu, 7 May 2020 07:07:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88E63900002; Thu, 7 May 2020 07:07:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A429900006; Thu, 7 May 2020 07:07:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 60617900002 for ; Thu, 7 May 2020 07:07:09 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 07C80C5A3 for ; Thu, 7 May 2020 11:07:09 +0000 (UTC) X-FDA: 76789646178.20.fuel94_5b7db3706dc30 X-HE-Tag: fuel94_5b7db3706dc30 X-Filterd-Recvd-Size: 3805 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 May 2020 11:07:08 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AA901AB8F; Thu, 7 May 2020 11:07:09 +0000 (UTC) Subject: Re: [PATCH] mm: vmstat: Use zeroed stats for unpopulated zones To: Sandipan Das , Michal Hocko Cc: akpm@linux-foundation.org, linux-mm@kvack.org, khlebnikov@yandex-team.ru, kirill@shutemov.name, aneesh.kumar@linux.ibm.com, srikar@linux.vnet.ibm.com References: <20200504070304.127361-1-sandipan@linux.ibm.com> <20200504102441.GM22838@dhcp22.suse.cz> <959f15af-28a8-371b-c5c3-cd7489d2a7fb@suse.cz> <20200506140241.GB6345@dhcp22.suse.cz> <20200506152408.GD6345@dhcp22.suse.cz> <20200507070924.GE6345@dhcp22.suse.cz> <1041ca78-edac-6a22-a843-c8d439133d2b@linux.ibm.com> From: Vlastimil Babka Message-ID: Date: Thu, 7 May 2020 13:07:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <1041ca78-edac-6a22-a843-c8d439133d2b@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 5/7/20 11:08 AM, Sandipan Das wrote: >>> >>> This is certainly an improvement. Thanks! The question whether we can >>> identify where bogus numbers came from would be interesting as well. >>> Maybe those are not worth fixing but it would be great to understand >>> them at least. I have to say that the explanation via boot_pageset is >>> not really clear to me. >>> >> >> The documentation update will definitely help. Thanks for that. Thanks both, will send a proper patch. >> I did collect some stack traces on a ppc64 guest for calls to zone_statistics() >> in case of zones that are using the boot_pageset and most of them originate >> from kmem_cache_init() with eventual calls to allocate_slab(). >> >> [ 0.000000] [c00000000282b690] [c000000000402d98] zone_statistics+0x138/0x1d0 >> [ 0.000000] [c00000000282b740] [c000000000401190] rmqueue_pcplist+0xf0/0x120 >> [ 0.000000] [c00000000282b7d0] [c00000000040b178] get_page_from_freelist+0x2f8/0x2100 >> [ 0.000000] [c00000000282bb30] [c000000000401ae0] __alloc_pages_nodemask+0x1a0/0x2d0 >> [ 0.000000] [c00000000282bbc0] [c00000000044b040] alloc_slab_page+0x70/0x580 >> [ 0.000000] [c00000000282bc20] [c00000000044b5f8] allocate_slab+0xa8/0x610 >> ... >> >> In the remaining cases, the sources are ftrace_init() and early_trace_init(). >> > > Forgot to add that this happens during the period between zone_pcp_init() and setup_zone_pageset(). If you can identify a good moment during the boot when the boot_pageset stops being used, maybe we could just reset its stats to zero once at that point and be done with it. > - Sandipan >