From patchwork Wed Nov 7 14:38:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Huttunen X-Patchwork-Id: 10672449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E5B213BF for ; Wed, 7 Nov 2018 14:38:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D6962BB98 for ; Wed, 7 Nov 2018 14:38:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80FAC2C139; Wed, 7 Nov 2018 14:38:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CA482BB98 for ; Wed, 7 Nov 2018 14:38:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 23C906B050E; Wed, 7 Nov 2018 09:38:43 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1C3F86B050F; Wed, 7 Nov 2018 09:38:43 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03CE36B0510; Wed, 7 Nov 2018 09:38:42 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by kanga.kvack.org (Postfix) with ESMTP id 9985D6B050E for ; Wed, 7 Nov 2018 09:38:42 -0500 (EST) Received: by mail-wm1-f69.google.com with SMTP id g189-v6so1642730wmg.8 for ; Wed, 07 Nov 2018 06:38:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:mime-version:spamdiagnosticoutput:spamdiagnosticmetadata; bh=uKWGRkTh47vb5tng0Lx1nKmUzIiXp/6CVWkYF7Cgr7g=; b=i3A/8CdpmUeIl2nEgzPgPFBGDaSgHQaFkyljWYvf6DcMcLHei/WSYo7k7rn4MV/xYh SbM8vuQziBMg5URf+x7CwgbKSWZeZhf0vVRP2zqI3iyBkrNP0HCtBHyBEWjnSqY34SpD cmJMAmKcCdpTZDn8BxAFe+qxA2EUNG2W3mEK90L0wagTB9Jx6Lwzo+ZKt0MDr4QCLzT5 ba7E1eoS6+c8lZkYydN8Km3dq2oCQPo2W+bB3ai/DXPHXml3RKHGVSn1l3kUCHkk4gKp Mts6OcPwri6F7ITO3UpzVqXOdjM4fb+GO4PIRrtl4JQRswqaZ4waWY8uaw78JS9UbOCb giKA== X-Gm-Message-State: AGRZ1gJbEIVHYX5eZVk83072AhJjMv5CIkzuECI2UI0+jqzZBlONNmWc mnebnqXKEA8frJMysfX+duXKiXTFw01m14+6nOVorAfsvWISArHAyDw5hYAVMuhSr2iy1PpICHC i/MYqqdaihjWd/MObUPXiSWAeqE4Yhq4bb7bjWiuLumq7+aCS8lKIfdUW+BnJ2+FEOA== X-Received: by 2002:a1c:b905:: with SMTP id j5-v6mr413317wmf.77.1541601522019; Wed, 07 Nov 2018 06:38:42 -0800 (PST) X-Google-Smtp-Source: AJdET5f99bPUPRY1awKaWTLIKsb+jHfrAJeqht3nPdLIA4HZvIngknFM8oA66Vhj5f8Wk8ZW+0Gz X-Received: by 2002:a1c:b905:: with SMTP id j5-v6mr413264wmf.77.1541601521021; Wed, 07 Nov 2018 06:38:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541601520; cv=none; d=google.com; s=arc-20160816; b=Wc1ph+J+Vw8vm1EDZvbpLUMZSupTDW5XEdbTxTu8T3vuexmCYv/4KVunsRfZ7YoC2m 9KTp0I3McICZOZe/WSwdDCb8fxhyTMaaj3ut9vaitJW4mDoIHH/OZir2FRXHi4kkchXW xTfFr3mxVr0ksF4MDxcVuwKStW4wkAuxRKef8txV0AEhb9DQhVB+0pEQNlxkv4zJvn2e 4+pgsawj4H08lEZWZ4y9NckMQVj3gXn7dDN2sGpW+JyuSYgK9dc71x+atlyU3YVs8Zta JKoCBR5cm3xz2Ean3m4AA1Q1mnVheDWlQg05vE0MAm/P/Mn26fqxAiF7asNLM9iW9gmN Dwqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput:mime-version:message-id :date:subject:cc:to:from:dkim-signature; bh=uKWGRkTh47vb5tng0Lx1nKmUzIiXp/6CVWkYF7Cgr7g=; b=dtrtYQQwFXsTuX8TjsqipI67JowVtWkieZIQ96nu+nJqaLxXUUvCivPSLzEmU0iFbm IoK3G5ryVz5ymC/TpIAEf5WE0BrMHDBl6tAmGK7xwmGRh4u9ys7sZ9cDZKshD6ENQohR eNUI2A6GZEDaaCs8yOZjg0tu6C1nW8E6MGYQs6YgEpgOXPaEuSFcoJ+kYfAV+tawlqoQ Iuy7lsXnRmoMUkUE7t93PV3c85TPF6nFKNdiJEyt3SMgC2EQCZuoqb2iuUskgXZH5/GC o0zcJ8NLrkoSWa8QDnuOkfPDCxeV+aopY4S5+5bNNwbw5zjxZ4Dx1kJQCbOeAbIwEMRX tHZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=tJBBVXIP; spf=pass (google.com: domain of janne.huttunen@nokia.com designates 40.107.7.120 as permitted sender) smtp.mailfrom=janne.huttunen@nokia.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nokia.com Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70120.outbound.protection.outlook.com. [40.107.7.120]) by mx.google.com with ESMTPS id 19-v6si972089wmv.111.2018.11.07.06.38.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Nov 2018 06:38:40 -0800 (PST) Received-SPF: pass (google.com: domain of janne.huttunen@nokia.com designates 40.107.7.120 as permitted sender) client-ip=40.107.7.120; Authentication-Results: mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=tJBBVXIP; spf=pass (google.com: domain of janne.huttunen@nokia.com designates 40.107.7.120 as permitted sender) smtp.mailfrom=janne.huttunen@nokia.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nokia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uKWGRkTh47vb5tng0Lx1nKmUzIiXp/6CVWkYF7Cgr7g=; b=tJBBVXIP2ybBKODNncykehpY+4DrATZU2uL7I/7qnJBysX4RIdyZbOGnuw7+ZzMCoS98S4KHi1U0RmYN3q54GRolicNLwgfk3VzPiuCNImqs20afz3CGl2I+mSqrJ86Ot9gOiYh2lKSn/QgNE+bcUknFaCN5WABDOzzq22jHGAg= Received: from AM5PR0701CA0064.eurprd07.prod.outlook.com (2603:10a6:203:2::26) by DB6PR0701MB2773.eurprd07.prod.outlook.com (2603:10a6:4:24::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.10; Wed, 7 Nov 2018 14:38:39 +0000 Received: from DB5EUR03FT029.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::205) by AM5PR0701CA0064.outlook.office365.com (2603:10a6:203:2::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1339.11 via Frontend Transport; Wed, 7 Nov 2018 14:38:39 +0000 Authentication-Results: spf=pass (sender IP is 131.228.2.240) smtp.mailfrom=nokia.com; kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=pass action=none header.from=nokia.com; Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.240 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.240; helo=fihe3nok0734.emea.nsn-net.net; Received: from fihe3nok0734.emea.nsn-net.net (131.228.2.240) by DB5EUR03FT029.mail.protection.outlook.com (10.152.20.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1339.10 via Frontend Transport; Wed, 7 Nov 2018 14:38:39 +0000 Received: from 4FIL37951.emea.nsn-net.net (fihel1d-proxy.emea.nsn-net.net [10.158.100.1]) by fihe3nok0734.emea.nsn-net.net (GMO) with ESMTP id wA7EcbwZ015269; Wed, 7 Nov 2018 14:38:37 GMT From: Janne Huttunen To: CC: , Subject: [PATCH] mm: fix NUMA statistics updates Date: Wed, 7 Nov 2018 16:38:37 +0200 Message-ID: <1541601517-17282-1-git-send-email-janne.huttunen@nokia.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240;IPV:CAL;SCL:-1;CTRY:FI;EFV:NLI;SFV:NSPM;SFS:(10019020)(346002)(396003)(39860400002)(376002)(136003)(2980300002)(438002)(189003)(199004)(14444005)(5660300001)(476003)(36756003)(2616005)(97736004)(106002)(186003)(53936002)(2351001)(54906003)(47776003)(6916009)(106466001)(44832011)(2906002)(51416003)(126002)(15650500001)(486006)(316002)(16586007)(50226002)(8936002)(26005)(104016004)(107886003)(8676002)(4326008)(81156014)(81166006)(305945005)(1857600001)(356004)(68736007)(26826003)(50466002)(77096007)(48376002)(336012)(86362001)(478600001);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0701MB2773;H:fihe3nok0734.emea.nsn-net.net;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;DB5EUR03FT029;1:rgG9Z9U9wiLenR8l3Qm8qbzXvmtV4qax891oXtGAIenXmhHLX+MoJeQXSKJavlgtQRR+MGazVWV1L1dkl8D3GZGwkji41pSuwGxxqu1dO0qIYQ9+ZkXjexpYas7K4Duk MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e9521af-9921-48f8-065a-08d644beb52a X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328);SRVR:DB6PR0701MB2773; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0701MB2773;3:IerD4SFbP7JnXefqvkGJI5O4d6dHXCkBK1pexy9clLnGMJiLYIpJklbko+ytEibztIrE4CVnfPNZhSSRPoqqCaOiL9arVrUBged+NM+jB14R0XjBJwlarSDLUYXHd/Ov865vBH1pZNC8+t0T/yS0ONRdPSuDmtn7FPPkdD2atkX2a6AWlYmYCx74Lr/k4esfTn+bDzks5GJ+cuYfL+o8I3tIRiV/+4qUQBp64WQOq7WWqDys14Z/UdoXp//qSs9pWdlvJRleWdXcnpRnmrEcmcFY9afaYOUd2tf3HRn2FqcEeJUgFQRIZ28d5FJ7zqeHMmfkdRRy5IZo9KrfuWO/IbimX4Vuiv2DO6P0LDraVzs=;25:2f3U7Mb+o4lJiU0KIpF+LRwIUel3JHpbxUm+Wd/BY/RbdVrVjZu9VCxQTpBgX1xme/sXUZw0BXyufu+1OFWTkANjj1F5wW85XNL3C8dnO2nJ5f3Oqc5XvyWpB+C00qRV+nTAJk5a3Rp9oNZmJ/iU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Gg0mLmZIqT8TMaiO0RHBfGc8k/upFiRL/1yey6ijqHilVA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(195916259791689)(109105607167333)(82608151540597); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(3231382)(11241501184)(806099)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:DB6PR0701MB2773;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0701MB2773; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0701MB2773;4:lyzmk1p0vt6CrEm1JMSwel4bDMrVAUL5tV1Fl1Q684hW0qliexzaPhutyNdBZ19C2eXemPlS0J4uEj63QK5Cvde5/AjoPMvhhqv4lvFNZRuJ0l70Z3orfp1+ScIQdUPyj8rntdPWK6xked9aZhdwgvnSJj99iTn3SR/YbHFjoF9KX9dLo/mG38ISpnJMYHwToc1QQeLWajWKu7LzY4FmC+Xj03Wbf4pRs0XRxw7DRMW0MN+w7MUN4FpUnZT5+j+f12UYz/yusTownqPD+/XvDkbPuR6Bc7pnR6Dd0SuZ7/I5jcbOlFAuLxVgoXSzSmCMkoJD+w+2JcDLclFyJO9IUsmZPYZWE5dvngZLerIdSBtPNdAGxv9AJcvRWo2tBcj1 X-Forefront-PRVS: 08497C3D99 X-Microsoft-Exchange-Diagnostics: 1;DB6PR0701MB2773;23:HxC3KyXdQQ0TyNXzZe1QNpTwVryYdDiQKRvyu79l85iKNORFCDnaKL99Cq/cZyPLQqDhTI52EtmbHFzWoiIGKqIY3+2uSmlD4V+IyPRUOuLVamWmZ4Z8LfFrn0E2HMgUfjwsijNV9cYMnXYOw3BuwcuCvMk+T6Zag/O6T51z0YegX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/W6HYLOjb/iP84zrUPaCLX/7ZmW+9RqfRkIC9MY1GIMPW5/CxYxEgNfT47tZX+z9PlvQxdrmLLsA== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2018 14:38:39.1690 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e9521af-9921-48f8-065a-08d644beb52a X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0;Ip=[131.228.2.240];Helo=[fihe3nok0734.emea.nsn-net.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0701MB2773 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: X-Virus-Scanned: ClamAV using ClamSMTP Scan through the whole array to see if an update is needed. While we're at it, use sizeof() to be safe against any possible type changes in the future. Fixes: 1d90ca897cb0 ("mm: update NUMA counter threshold size") Signed-off-by: Janne Huttunen Acked-by: Michal Hocko --- Compile tested only! I don't know what error (if any) only scanning half of the array causes, so I cannot verify that this patch actually fixes it. mm/vmstat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index 7878da7..eca984d 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1827,12 +1827,13 @@ static bool need_update(int cpu) /* * The fast way of checking if there are any vmstat diffs. - * This works because the diffs are byte sized items. */ - if (memchr_inv(p->vm_stat_diff, 0, NR_VM_ZONE_STAT_ITEMS)) + if (memchr_inv(p->vm_stat_diff, 0, NR_VM_ZONE_STAT_ITEMS * + sizeof(p->vm_stat_diff[0]))) return true; #ifdef CONFIG_NUMA - if (memchr_inv(p->vm_numa_stat_diff, 0, NR_VM_NUMA_STAT_ITEMS)) + if (memchr_inv(p->vm_numa_stat_diff, 0, NR_VM_NUMA_STAT_ITEMS * + sizeof(p->vm_numa_stat_diff[0]))) return true; #endif }