From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760737AbcBYOHE (ORCPT ); Thu, 25 Feb 2016 09:07:04 -0500 Received: from casper.infradead.org ([85.118.1.10]:33343 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760634AbcBYOHA (ORCPT ); Thu, 25 Feb 2016 09:07:00 -0500 Date: Thu, 25 Feb 2016 15:06:54 +0100 From: Peter Zijlstra To: Vineet Gupta Cc: Russell King , "linux-arch@vger.kernel.org" , Marc Zyngier , Frederic Weisbecker , lkml , Noam Camus , arcml Subject: Re: Interesting csd deadlock on ARC Message-ID: <20160225140654.GL6357@twins.programming.kicks-ass.net> References: <56C6BA82.1060909@synopsys.com> <56CBEC66.2030401@synopsys.com> <20160223095824.GH6356@twins.programming.kicks-ass.net> <56CD36CD.2080303@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56CD36CD.2080303@synopsys.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2016 at 10:21:25AM +0530, Vineet Gupta wrote: > >> What I actually meant was is it OK for irq_work_queue_on() to be called locally > >> (is this a sched bug/optimization(. Further if it is OK to be called, does it need > >> to do behave more like irq_work_queue() i.e. call arch_irq_work_raise() or > >> arch_send_call_function_single_ipi() is expected to handle sending IPI to self ! > > > > Right, so I'm not actually sure we started out with this requirement. > > But you're not the first to run into this, see: > > > > lkml.kernel.org/r/CAJZ5v0gLankSuziQq25qTCyNqeOX43yD9jnJu_XXwbdyajfmKg@mail.gmail.com > > > > Initially I think irq_work_queue_on() was only used remotely, but I > > think it makes sense to allow the current cpu, esp. since people seem to > > be using it like that. > > So it seems Russell's questions in the thread above stands still. IMO we need to > massage irq_work_queue_on() to handle the case of called for local cpu. This will > automatically take care of CONFIG_SMP kernel running on UP hardware. Hmm, I missed that there was still an open question. Afaict the only thing that needs doing to the generic code is drop the CONFIG_SMP guard, no?