Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1564676pxa; Thu, 20 Aug 2020 14:48:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxosFnwCwMXP/J59BgnCY8LOL5gBuvpVaaBWZTTE5h2q2v/foe3pfWzmkir+/XppwwUCo10 X-Received: by 2002:a05:6402:212:: with SMTP id t18mr670931edv.124.1597960128903; Thu, 20 Aug 2020 14:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597960128; cv=none; d=google.com; s=arc-20160816; b=c+zES43lMSH5hRzJYFWcxAOzT24MuyPMKkFhE/t8lz4JyWzO9AvokWqL5Y7+IwWU83 vZ4GNOSUYRthj5mPWwonyxFPmJgagv54wXibd3c3M3oK0ixE7M5Pm4Hi0/Fs81WHYyhx G2keqDVV4bKNee55pCQm5qjoWAICkjN+/o6RmfwSSpyuogZ5DbXoLU0FWLLSE0Kb5rDk CN7EFfsJSFXuaRXCv7soA2cEFcv1doXIjwqyl+z4pCWl/gkl90FKgN7aFCTdJpkofHgd jTCPN0LcOsC1/VD5FIw1pi5Cp9ljyenOKXtrPLrN7RPfyAZtW84A3uqqi9lMelI9qQWj N5Eg== 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:ironport-sdr:ironport-sdr; bh=mCptSYV2z8xVcEcYePZ8zK2dtSSZ9l+gLLrjYF5toXk=; b=HnWTRo0lB2tdhTNaxxOhTrpYVydFeUw3RyPVtyPdrr39G9QXGJ77wTz4pfrMy7Cwck QN7XUFtYkJAdAf4hBntu18sDYk2lYsq0HHHIjrbxszAwuXFKBlY1QEfoWvXucMAIY0an loNi0mGqe/5q3WNMkI4P5Y1WY00rhu9Pzue1isQ+msixg819w+jCoeHKjzp7KY8zkdCq UsUzRSiFFqX88X4NsZKXm9XGpCp/qXhzJ3B9wW0SaZTGhJhXDEW1+gEITmzDD4kcg0fG l/9jqZLEk0a+Y7T76PqFi08dZywcV+sjWh5DcMeIEx1I2RrHjYcRqAuLCLQBFsonPeWo wn+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si2052610ejc.243.2020.08.20.14.48.25; Thu, 20 Aug 2020 14:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726841AbgHTT6M (ORCPT + 99 others); Thu, 20 Aug 2020 15:58:12 -0400 Received: from mga04.intel.com ([192.55.52.120]:59267 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbgHTT6M (ORCPT ); Thu, 20 Aug 2020 15:58:12 -0400 IronPort-SDR: FsrGtP93efUMa9jhdiFWhFrUVwLTzFpCy7rFlGZ5Y6p2ECj/P6uSoLGFSnHZX0llEalwooJGbk pDiMjTC8Sn5A== X-IronPort-AV: E=McAfee;i="6000,8403,9718"; a="152810177" X-IronPort-AV: E=Sophos;i="5.76,334,1592895600"; d="scan'208";a="152810177" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2020 12:58:12 -0700 IronPort-SDR: 7ff5AW1OqJFyIq9w0Y0w/6okfpx2Z6o8s+b+Kgv9kt9JBCuS0bhUtg2F5m17yH+1gocNNLuzQ4 me8rXcGpPHGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,334,1592895600"; d="scan'208";a="497741219" Received: from otc-nc-03.jf.intel.com (HELO otc-nc-03) ([10.54.39.36]) by fmsmga006.fm.intel.com with ESMTP; 20 Aug 2020 12:58:11 -0700 Date: Thu, 20 Aug 2020 12:58:11 -0700 From: "Raj, Ashok" To: Evan Green Cc: LKML , Thomas Gleixner , Sukumar Ghorai , Srikanth Nandamuri , Mathias Nyman , Bjorn Helgaas , stable@vger.kernel.org, Ashok Raj Subject: Re: [PATCH] x86/hotplug: Silence APIC only after all irq's are migrated Message-ID: <20200820195811.GA22799@otc-nc-03> References: <20200814213842.31151-1-ashok.raj@intel.com> <20200817183322.GA11486@araj-mobl1.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 20, 2020 at 11:21:24AM -0700, Evan Green wrote: > > > > > > I'm slightly unclear about whether interrupts are disabled at the core > > > by this point or not. I followed native_cpu_disable() up to > > > __cpu_disable(), up to take_cpu_down(). This is passed into a call to > > > stop_machine_cpuslocked(), where interrupts get disabled at the core. > > > So unless there's another path, it seems like interrupts are always > > > disabled at the core by this point. > > > > local_irq_disable() just does cli() which allows interrupts to trickle > > in to the IRR bits, and once you do sti() things would flow back for > > normal interrupt processing. > > > > > > > > > > If interrupts are always disabled, then the comment above is a little > > > > Disable interrupts is different from disabling LAPIC. Once you do the > > apic_soft_disable(), there is nothing flowing into the LAPIC except > > for INIT, NMI, SMI and SIPI messages. > > > > This turns off the pipe for all other interrupts to enter LAPIC. Which > > is different from doing a cli(). > > I understand the distinction. I was mostly musing on the difference in > behavior your change causes if this function is entered with > interrupts enabled at the core (ie sti()). But I think it never is, so > that thought is moot. > > I could never repro the issue reliably on comet lake after Thomas' > original fix. But I can still repro it easily on jasper lake. And this > patch fixes the issue for me on that platform. Thanks for the fix. > > Reviewed-by: Evan Green > Tested-by: Evan Green Thanks Evan for testing. I'll wait for thomas if he finds anything else that needs to be fixed and send a final v2 after fixing the typos and others identified by Randy. Cheers, Ashok