Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2116703yba; Mon, 15 Apr 2019 05:24:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaqpsunJ36IQeaHPHEGQ+fTyg9oYvZgbTMZXkZxCxRGxfiZu2uxzSgHkN9ecYJ+LE256y2 X-Received: by 2002:a65:62ce:: with SMTP id m14mr56577119pgv.191.1555331054845; Mon, 15 Apr 2019 05:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555331054; cv=none; d=google.com; s=arc-20160816; b=qchUge+xdO+0PIxvgKD4F8S/6WtrDHm5yq+s/e59X44ceiKj1PdvvqwDTRrK+IPuHX wtMCZQj+buohII2znGAKdm8qVE9W1lGNysGtW34lOzh7t5bqCV3/eVURRzli+67tBtCv 5kfAknqnVc5LOcxQb5d4/9AAlWC3BxKL4nn4+0cly5w/PLG6n7ucg9B1gfbiLAGP5sJY jxiwoF0UaWDM2pQi29424MindSvsIF+WKBfN0KceUeaEGNXpHGx3kypO+JZYl/BWa6nx w/FhpcRUsiImwAj2zeEJLuqzFgvDcShuUmqrFd2vW3BJPDf9SVyt/SHErc1oDfk7wjU2 G9Pw== 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; bh=sMuySctEfubHzRjUzMKLcFnOuCWtF1/VQ+PutI+sAH0=; b=btkDV5BREGi7b2zVNjOw7s7K/omh04KvFKUacrdP2LkHNgGM0OuSgSeH8VhgX7qRfA 1hNIp5qBkVcotKYkAZG8rH7KeZCIr6aRkjbEztQrzgAUINIaLN9fWEBf0gOHaCRwBCe9 Qpehu0BQ5kYVdAACJuYjd+oM2vvuintUBU7Jf5uPyRoc99v88HRCx1JPL4WbpZ4q4FLh ewgjyj05TNl1mzslGOEGNbr8Ue29AVVvFSB7msCB6/VnSJApX0/DzdFFRGwqQKa47U+U S143I2jKwPK2eMU8JFUkxNNAsgnSW3dZtMj5iGfiLlsu6YrE85TaxlcWco+73moftp2g dVHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UHtghW0o; 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 l70si44869280pgd.242.2019.04.15.05.23.56; Mon, 15 Apr 2019 05:24:14 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UHtghW0o; 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 S1727244AbfDOMVi (ORCPT + 99 others); Mon, 15 Apr 2019 08:21:38 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41368 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbfDOMVh (ORCPT ); Mon, 15 Apr 2019 08:21:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sMuySctEfubHzRjUzMKLcFnOuCWtF1/VQ+PutI+sAH0=; b=UHtghW0oqvGyT/bXjXCQdLxQX EQkydjdJtXoAwt3LUs61iGE16pejsudvyGawucXo5U1P3E5yHZloaHhoL/aXgktioT2NLXIJk9tGg enL9A9weEh0+Gz+RaLj6L08q4Cz4QzWzVvYxe4dAmoXtz2l+29clcoguBZlJvhCTHB0WD+/COL9uR OEaxDj9eKVu/zuZzp5hKEtQZU8vp3506fFy3NNeMqMAutQLom/BzUjnEb+ckxR6mWcWFS6RKjBxlJ Dflzq4oljTewy3gAYPByCSUvDVagT3Ql5Cdk0+d/ZAqRD9Bi1cJLtIiJkV20Qya+K/n3ZQ2z6Q1vy aSDdgzw4A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hG0c6-0006vh-BS; Mon, 15 Apr 2019 12:21:30 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D2DCE213A0759; Mon, 15 Apr 2019 14:21:28 +0200 (CEST) Date: Mon, 15 Apr 2019 14:21:28 +0200 From: Peter Zijlstra To: Dexuan Cui Cc: "tglx@linutronix.de" , "riel@surriel.com" , "jpoimboe@redhat.com" , "luto@kernel.org" , Stephen Hemminger , Sasha Levin , Haiyang Zhang , KY Srinivasan , "linux-kernel@vger.kernel.org" , Michael Kelley , "marcelo.cerri@canonical.com" , "apw@canonical.com" , "olaf@aepfle.de" , vkuznets , "jasowang@redhat.com" Subject: Re: [PATCH] smp: Do not warn if smp_call_function_single() is doing a self call. Message-ID: <20190415122128.GO11158@hirez.programming.kicks-ass.net> References: <20190412235341.29379-1-decui@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190412235341.29379-1-decui@microsoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 11:53:57PM +0000, Dexuan Cui wrote: > If smp_call_function_single() is calling the function for itself, it's safe > to run with irqs_disabled() == true. > > I hit the warning because I'm in the below path in the .suspend callback of > a "syscore_ops" to support hibernation for a VM running on Hyper-V: > > hv_synic_cleanup() -> > clockevents_unbind_device() -> > clockevents_unbind() -> > smp_call_function_single(). > > When the .suspend callback runs, only CPU0 is online and irqs_disabled() is > true. Pray tell, how well do you think mutex_lock() works with interrupts disabled?