Received: by 10.192.165.156 with SMTP id m28csp1628973imm; Wed, 18 Apr 2018 12:55:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/2VHy35CvbIM81jbBWPP12YZRW9nYd3/YkAGx9qVNST8WRxSWCuDa3YvIUbGTbJqwjqXC+ X-Received: by 2002:a17:902:a50d:: with SMTP id s13-v6mr3245344plq.228.1524081358640; Wed, 18 Apr 2018 12:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524081358; cv=none; d=google.com; s=arc-20160816; b=UgnTv8WJDpSE48VkSAEzDfCaC6+YMAj4q5PdTPEESfrPbmpYGfHI3c3HuJIvOS63ZU Bq9za7DoB7qE+9e3fxmklnT2MqOZRKnaQbdr3otcB6SQd9igbjwKhuDOqGvIEtX9MIzr IIsbGirt4wd/QjTT9F6037/+w5eGxs9rZ3NGqgfTbJYODuXKda3pKWFEuBI9xhJviqHh Z4UkaaqyDyR6b39bXfpiFvaldYUZGfdFydHUwZ/KC/WdrtkNyif8MZMSRIclFPItL5oc ezAg81YHrJg70KJ4FjCgFiyUe9InLqSjYDZZbKo3ssz4qgkKxICAsw7A01KrDTsgbAAj WFPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=JlQkyH3GK/JB0nStMmh1Niz0KPQ52MkKDPw+Ra5yItc=; b=TR/IhOTC5zlOkru8FaJKVXBQUGWI0MrFpEwtIqRLThGg3jOm+7HLFSDVR9bA/CjkF2 kBLBYTROrTAwZBtS4IAbSrJflwpe1htw4J7qPQPKRHp2+LdjF4t9FYRBLOYogm5V99bt oFAUSVpndm9cihEq5oTRiIkSjzweNX/My3G14X843FfWNU9LntTxcSPvlFNpAYNbyps+ 6d1YqAH9d9ylHZDqWmwcrgs0ZsIqkFVak+YzpDsD9fPT5jJ9KnnvJvQTjFDeXVA9puXM GlK3KsFLr4jlzTcpIj4WAVb3WWz89MWWl6YpvnSn/vVbF4f4AUKNbJ4ifS+RgRULMtim pDZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d92-v6si1878683pld.195.2018.04.18.12.55.45; Wed, 18 Apr 2018 12:55:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752605AbeDRTyb (ORCPT + 99 others); Wed, 18 Apr 2018 15:54:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60202 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752340AbeDRTya (ORCPT ); Wed, 18 Apr 2018 15:54:30 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D066919C34; Wed, 18 Apr 2018 19:54:29 +0000 (UTC) Date: Wed, 18 Apr 2018 12:54:28 -0700 From: Andrew Morton To: Sebastian Andrzej Siewior Cc: Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, "Steven J . Hill" , Tejun Heo , Christoph Lameter Subject: Re: [PATCH] Revert mm/vmstat.c: fix vmstat_update() preemption BUG Message-Id: <20180418125428.206ae997096706eb9db1b7e2@linux-foundation.org> In-Reply-To: <20180418154435.bgakyv5kqsev2k3e@linutronix.de> References: <20180411095757.28585-1-bigeasy@linutronix.de> <20180411140913.GE793541@devbig577.frc2.facebook.com> <20180411144221.o3v73v536tpnc6n3@linutronix.de> <20180411190729.7sbmbsxtkcng7ddx@linutronix.de> <20180418154435.bgakyv5kqsev2k3e@linutronix.de> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Apr 2018 17:44:36 +0200 Sebastian Andrzej Siewior wrote: > On 2018-04-11 21:07:29 [+0200], To Tejun Heo wrote: > > On 2018-04-11 16:42:21 [+0200], To Tejun Heo wrote: > > > > > So is this perhaps related to the cpu hotplug that [1] mentions? e.g. is > > > > > the cpu being hotplugged cpu 1, the worker started too early before > > > > > stuff can be scheduled on the CPU, so it has to run on different than > > > > > designated CPU? > > > > > > > > > > [1] https://marc.info/?l=linux-mm&m=152088260625433&w=2 > > > > > > > > The report says that it happens when hotplug is attempted. Per-cpu > > > > doesn't pin the cpu alive, so if the cpu goes down while a work item > > > > is in flight or a work item is queued while a cpu is offline it'll end > > > > up executing on some other cpu. So, if a piece of code doesn't want > > > > that happening, it gotta interlock itself - ie. start queueing when > > > > the cpu comes online and flush and prevent further queueing when its > > > > cpu goes down. > > > > > > I missed that cpuhotplug part while reading it. So in that case, let me > > > add a CPU-hotplug notifier which cancels that work. After all it is not > > > need once the CPU is gone. > > > > This already happens: > > - vmstat_shepherd() does get_online_cpus() and within this block it does > > queue_delayed_work_on(). So this has to wait until cpuhotplug > > completed before it can schedule something and then it won't schedule > > anything on the "off" CPU. > > > > - The work item itself (vmstat_update()) schedules itself > > (conditionally) again. > > > > - vmstat_cpu_down_prep() is the down event and does > > cancel_delayed_work_sync(). So it waits for the work-item to complete > > and cancels it. > > > > This looks all good to me. > > > > > > Thanks. (top-posting repaired, Please don't do that - how am I supposed to reply to you while maintaining appropriate context?) > ping. > any reason not to accept the revert? > That will make the warnings come back. Or was the hotplug issue addressed by other means? If so, that fix should be referred to in the changelog.