Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752038AbdHPJTz (ORCPT ); Wed, 16 Aug 2017 05:19:55 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:56874 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751604AbdHPJTy (ORCPT ); Wed, 16 Aug 2017 05:19:54 -0400 Date: Wed, 16 Aug 2017 11:19:45 +0200 (CEST) From: Thomas Gleixner To: Vikas Shivappa cc: vikas.shivappa@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, peterz@infradead.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, ak@linux.intel.com, eranian@google.com, davidcc@google.com Subject: Re: [PATCH 1/2] x86/intel_rdt/mbm: Fix MBM overflow handler during hot cpu In-Reply-To: <1502845243-20454-2-git-send-email-vikas.shivappa@linux.intel.com> Message-ID: References: <1502845243-20454-1-git-send-email-vikas.shivappa@linux.intel.com> <1502845243-20454-2-git-send-email-vikas.shivappa@linux.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 740 Lines: 18 On Tue, 15 Aug 2017, Vikas Shivappa wrote: > When a CPU is dying, we cancel the worker and schedule a new worker on a > different CPU on the same domain. But if the timer is already about to > expire (say 0.99s) then we essentially double the interval. > > We modify the hot cpu handling to cancel the delayed work on the dying > cpu and run the worker immediately on a different cpu in same domain. We > donot flush the worker because the MBM overflow worker reschedules the > worker on same CPU and scans the domain->cpu_mask to get the domain > pointer. You could alternatively use flush and make the worker code schedule the work on a still online CPU in the domain instead of blindly rescheduling it on the same CPU. Thanks, tglx