Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-08 Thread Ben Hutchings
On Thu, 2013-01-03 at 13:58 -0800, Andrew Morton wrote: > On Wed, 2 Jan 2013 23:46:46 + > Ben Hutchings wrote: [...] > > > drivers/net/ethernet/mellanox/mlx4/ appears to be using > > > msix_ctl.pool_lock for exclusion, but I didn't check for coverage. > > > > > > drivers/net/ethernet/sfc

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-07 Thread Amir Vadai
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 th

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-07 Thread Amir Vadai
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 th

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-03 Thread Ben Hutchings
On Thu, 2013-01-03 at 13:47 -0800, Andrew Morton wrote: > On Wed, 2 Jan 2013 18:35:00 -0800 > David Decotigny wrote: > > > > (please don't top-post) > > > Thanks. It is not too late to review this code. But I'd prefer not to > > address refactoring issues with this patch, which is supposed to fi

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-03 Thread Andrew Morton
On Wed, 2 Jan 2013 23:46:46 + Ben Hutchings wrote: > On Wed, 2013-01-02 at 15:12 -0800, Andrew Morton wrote: > > On Wed, 2 Jan 2013 13:52:25 -0800 > > David Decotigny wrote: > > > > > In some cases, free_irq_cpu_rmap() is called while holding a lock > > > (eg. rtnl). This can lead to deadl

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-03 Thread Andrew Morton
On Wed, 2 Jan 2013 18:35:00 -0800 David Decotigny wrote: > (please don't top-post) > Thanks. It is not too late to review this code. But I'd prefer not to > address refactoring issues with this patch, which is supposed to fix a > deadlock with some drivers. So I'd rather not to add function > re

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-02 Thread David Decotigny
Thanks. It is not too late to review this code. But I'd prefer not to address refactoring issues with this patch, which is supposed to fix a deadlock with some drivers. So I'd rather not to add function renaming, suppressions, etc. that have an effect outside cpu_rmap's code. Instead, I'd like to p

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-02 Thread Ben Hutchings
On Wed, 2013-01-02 at 15:12 -0800, Andrew Morton wrote: > On Wed, 2 Jan 2013 13:52:25 -0800 > 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 wai

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-02 Thread Andrew Morton
On Wed, 2 Jan 2013 13:52:25 -0800 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 m

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-02 Thread Josh Triplett
On Wed, Jan 02, 2013 at 01:52:25PM -0800, 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 wo

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-02 Thread Eric Dumazet
On Wed, 2013-01-02 at 13:52 -0800, 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 mig

Re: [PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-02 Thread Ben Hutchings
On Wed, 2013-01-02 at 13:52 -0800, 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 mig

[PATCH v4] lib: cpu_rmap: avoid flushing all workqueues

2013-01-02 Thread David Decotigny
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 us