From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044AbcJDIZS (ORCPT ); Tue, 4 Oct 2016 04:25:18 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:35540 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751977AbcJDIZQ (ORCPT ); Tue, 4 Oct 2016 04:25:16 -0400 Date: Tue, 4 Oct 2016 10:22:15 +0200 (CEST) From: Thomas Gleixner To: hpa@zytor.com, cchalpha@gmail.com, xiaolong.ye@intel.com, peterz@infradead.org, linux-kernel@vger.kernel.org, kernel@kolivas.org, mingo@kernel.org cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:sched/urgent] Revert "sched/core: Do not use smp_processor_id() with preempt enabled in smpboot_thread_fn()" In-Reply-To: Message-ID: References: <20160930015102.GB20189@yexl-desktop> 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 On Tue, 4 Oct 2016, tip-bot for Ingo Molnar wrote: > The original change widens a preempt-off section, to avoid a seemingly unsafe > smp_processor_id() use. > > During review I overlooked two facts: > > - The code to calls a non-trivial function callback: > > ht->park(td->cpu); > > ... which might (and does occasionally) sleep, triggering the warning. > > - More importantly, as pointed out by Peter Zijlstra, using > smp_processor_id() in that context is safe, if it's done from > a kernel thread that is pinned to a single CPU - which is the > case here. > > So revert to the original code that enables preemption sooner. > > Reported-by: kernel test robot > Acked-by: Peter Zijlstra Acked-by: Thomas Gleixner