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 76293C38A24 for ; Thu, 7 May 2020 11:17:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4594A20870 for ; Thu, 7 May 2020 11:17:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4594A20870 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CF56E900007; Thu, 7 May 2020 07:17:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CA7B1900002; Thu, 7 May 2020 07:17:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B94D8900007; Thu, 7 May 2020 07:17:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0076.hostedemail.com [216.40.44.76]) by kanga.kvack.org (Postfix) with ESMTP id A1A30900002 for ; Thu, 7 May 2020 07:17:20 -0400 (EDT) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 5FF5014532 for ; Thu, 7 May 2020 11:17:20 +0000 (UTC) X-FDA: 76789671840.06.crush07_22e7ee63f5a55 X-HE-Tag: crush07_22e7ee63f5a55 X-Filterd-Recvd-Size: 6056 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 May 2020 11:17:19 +0000 (UTC) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047B3pYm141646; Thu, 7 May 2020 07:17:18 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 30twj08v0p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 07:17:18 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047B5ebh002294; Thu, 7 May 2020 11:17:16 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04ams.nl.ibm.com with ESMTP id 30s0g5u6q5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 11:17:16 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047BHDHT57803014 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 11:17:13 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C44C811C05C; Thu, 7 May 2020 11:17:13 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9C6F711C04A; Thu, 7 May 2020 11:17:11 +0000 (GMT) Received: from [9.199.34.251] (unknown [9.199.34.251]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 7 May 2020 11:17:11 +0000 (GMT) Subject: Re: [PATCH] mm: vmstat: Use zeroed stats for unpopulated zones To: Vlastimil Babka Cc: Michal Hocko , 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: Sandipan Das Message-ID: <75a2ff8b-bdbc-ba9f-c4fc-d68001ee13e2@linux.ibm.com> Date: Thu, 7 May 2020 16:47:10 +0530 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-07_06:2020-05-07,2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=906 priorityscore=1501 lowpriorityscore=0 bulkscore=0 spamscore=0 phishscore=0 malwarescore=0 impostorscore=0 suspectscore=0 mlxscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070087 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000049, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 07/05/20 4:37 pm, Vlastimil Babka wrote: > 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. > I think that would be in setup_per_cpu_pageset(). After the pagesets for the populated zone have been allocated. - Sandipan