Received: by 10.192.165.156 with SMTP id m28csp783058imm; Wed, 11 Apr 2018 07:13:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49CMoVdLBqEvvJuEWLRzpqKxKwU1u/eaCZLzbz5gfDmTIw6EIQKWF8H5gV1I9Jrbk4DvyCP X-Received: by 2002:a17:902:28c4:: with SMTP id f62-v6mr5318975plb.19.1523455982704; Wed, 11 Apr 2018 07:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523455982; cv=none; d=google.com; s=arc-20160816; b=VTBAiK5esxJTfX/8VZETCxR+H/pdpuUl4IiCx9NZTb9ReqpfJ/bBSJ7wrzqhDH2+Bw dNMHp77ZsSOTtFLODtSgP3eS3vB6XLgYZroQJD/W68TBv9GP+1Hc/uDK/LLI43DoHSVI hTzyXPqa8lMotCM6ouWgH/bd/9pOTmhegKOko/ilk5X7AKE9uXSYQKyfbq78glJrapvg ueCW7DAT0HcZHeOxOdM+VvZORlhf9c86Mfu+qWJ+8H0KqfvapN5dybEqU65IaczhPDnX 5lGz9W+ciMOzczyo7WEVXpub9jzp8KN05pvAjoKQT8QdsL5Uqon0PZurh9+WgQnm9yg3 66Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=r4F6E88LNFjxrIaKI0DVDyUIxRcR49fAGG+rN/n1wUg=; b=RYSCJ7XjSfY4Q8LDmFUcVJtXHAM0386CGUB7VCLMNfx0GgPb2/g2TL3r29kQ615GHY 0txqAE1tn7uhnraTlVCq7AdK/Ry6lgdvxq/OR+v4xHxapon8T4A8Wa+WK131ulVfUCpd XpbBcMPyBrY2Yvr66MfhJQKaQ5qXPmB54bbGdYEcOayxBE2idQWq952iAnHgc7tzzwaq WPOEmagb/VaENhYUWN1oK80a5xxlcZTneLfCLpTPXVXnxdf+NCcxJw7T8Ueji1bw8Fl4 +KB5KjHyZq65W35+BkWnfeMktp02nBczJVRHcEq2ypsyBwOnZGW84IWZHe/MBus8Wt1M /vzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nW1/yii4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g5si883515pfh.411.2018.04.11.07.12.25; Wed, 11 Apr 2018 07:13:02 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nW1/yii4; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753150AbeDKOJR (ORCPT + 99 others); Wed, 11 Apr 2018 10:09:17 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:39296 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753064AbeDKOJQ (ORCPT ); Wed, 11 Apr 2018 10:09:16 -0400 Received: by mail-yw0-f195.google.com with SMTP id q66so586886ywg.6 for ; Wed, 11 Apr 2018 07:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=r4F6E88LNFjxrIaKI0DVDyUIxRcR49fAGG+rN/n1wUg=; b=nW1/yii4bq6LrWGcFDrcw5P1g+HDNfp1UCgaqQZLmYX3FDGAZLdnUu0k0O7LbcO4aH h3XjRK6SkG3ucXqWwOcp9EBaH/wBtE5nKVv2nVL5zD9aXo0L8rXLPr8tHGpwiSV+LiuH Q57cVi1fc1CAPEMUSXdvivU1HRca2/srz0W754I9zeDZAdti+rhhxdXaHxv7I2IocGww n3R0MIpdYKyTJdHHcBkybMybX+Dc8PnQP8ybazsBBujpic56E2quxRJbfXj86Se68J8D viUpGgyjuehd83rey7faDzY3u4v+VxaxiCHAb3A6jFf6lomTEqsln4k9TIts295LuUAD km4g== 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:user-agent; bh=r4F6E88LNFjxrIaKI0DVDyUIxRcR49fAGG+rN/n1wUg=; b=sA5ANl1UoCnAV0FmzPZ1Wt9igXo5kgaw0ENjCkDuFH4mtwLNfOjZbqMh/CsO8I8MG+ fDluYYm1gXgv5TOYPPOVQvWtomRSRIfQGMRB1cjvde5tLlWrB/lvlQBC3JHHJQbD7Foe w4M2XszjFy4X3hkA0Y5fghU8vCTMT45uhyPawMigYGuMmPUfzcIe6aaVvqtmyD9Uj+H7 /TzV6Z3oq70ojdGt0DwMlLAc4mbxMxRiGEN+T5U9f3/pTzlbnrvKKxJ1RCJXFou2WLlY ypphcwfp0zOL6seAb+3AV3a4VXjTeWknTMkZUagUqRPAzZlB4r8PODwyYrD6PVZN6Voy W3xw== X-Gm-Message-State: ALQs6tCJvUxOls1A1roZyLSIlNP3ztMLytHrBZgFiw0Q3E6gAtOE0u4N uEBSoCZjX6+8BQTkKQjxA4Q= X-Received: by 10.129.104.212 with SMTP id d203mr2218860ywc.111.1523455755668; Wed, 11 Apr 2018 07:09:15 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::1:e6ed]) by smtp.gmail.com with ESMTPSA id n62sm445949ywe.4.2018.04.11.07.09.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 07:09:14 -0700 (PDT) Date: Wed, 11 Apr 2018 07:09:13 -0700 From: Tejun Heo To: Vlastimil Babka Cc: Sebastian Andrzej Siewior , linux-mm@kvack.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, "Steven J . Hill" , Andrew Morton , Christoph Lameter Subject: Re: [PATCH] Revert mm/vmstat.c: fix vmstat_update() preemption BUG Message-ID: <20180411140913.GE793541@devbig577.frc2.facebook.com> References: <20180411095757.28585-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Wed, Apr 11, 2018 at 03:56:43PM +0200, Vlastimil Babka wrote: > > vmstat_update() is invoked by a kworker on a specific CPU. This worker > > it bound to this CPU. The name of the worker was "kworker/1:1" so it > > should have been a worker which was bound to CPU1. A worker which can > > run on any CPU would have a `u' before the first digit. > > Oh my, and I have just been assured by Tejun that his cannot happen :) > And yet, in the original report [1] I see: > > CPU: 0 PID: 269 Comm: kworker/1:1 Not tainted > > 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. Thanks. -- tejun