From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754532Ab3AGNBS (ORCPT ); Mon, 7 Jan 2013 08:01:18 -0500 Received: from eu1sys200aog117.obsmtp.com ([207.126.144.143]:44057 "HELO eu1sys200aog117.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750785Ab3AGNBR (ORCPT ); Mon, 7 Jan 2013 08:01:17 -0500 Message-ID: <50EAC722.9050203@mellanox.com> Date: Mon, 7 Jan 2013 15:01:22 +0200 From: Amir Vadai User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: David Decotigny CC: , Ben Hutchings , "David S. Miller" , Or Gerlitz , "Paul E. McKenney" , Thomas Gleixner , Andrew Morton , "Josh Triplett" , David Howells , "Paul Gortmaker" Subject: Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues References: In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.222.66.109] X-TM-AS-Product-Ver: SMEX-10.0.0.4211-7.000.1014-19514.002 X-TM-AS-Result: No--0.464400-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/01/2013 23:52, David Decotigny wrote: > In some cases, free_irq_cpu_rmap() is called while holding a lock > (eg. rtnl). This can lead to deadlocks, because it invokes > flush_scheduled_work() which ends up waiting for whole system > workqueue to flush, but some pending works might try to acquire the > lock we are already holding. > > This commit uses reference-counting to replace > irq_run_affinity_notifiers(). It also removes > irq_run_affinity_notifiers() altogether. > > Signed-off-by: David Decotigny > --- > include/linux/cpu_rmap.h | 13 +++------- > include/linux/interrupt.h | 5 ---- > lib/cpu_rmap.c | 63 +++++++++++++++++++++++++++++++++++++++++---- > 3 files changed, 62 insertions(+), 19 deletions(-) > Acked-by: Amir Vadai