Re: [NET]: gen_estimator deadlock fix

2007-07-17 Thread Jarek Poplawski
On Tue, Jul 17, 2007 at 02:01:48PM +0200, Patrick McHardy wrote: ... Thanks, Jarek P. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [NET]: gen_estimator deadlock fix

2007-07-17 Thread Patrick McHardy
Jarek Poplawski wrote: > This patch looks fine, but while checking for this lock I've found > another strange thing: for actions tcfc_stats_lock is used here, which > is equivalent to tcfc_lock; so, in gen_kill_estimator we get this lock > sometimes after dev->queue_lock; this order is also possibl

Re: [NET]: gen_estimator deadlock fix

2007-07-17 Thread Jarek Poplawski
On Mon, Jul 16, 2007 at 08:45:05PM +0300, Ranko Zivojnovic wrote: ... > [NET] gen_estimator deadlock fix > > -Fixes ABBA deadlock noted by Patrick McHardy <[EMAIL PROTECTED]>: > > > There is at least one ABBA deadlock, est_timer() does: > > read_lock(&est

Re: [NET]: gen_estimator deadlock fix

2007-07-16 Thread David Miller
From: Ranko Zivojnovic <[EMAIL PROTECTED]> Date: Mon, 16 Jul 2007 20:45:05 +0300 > [NET] gen_estimator deadlock fix > > -Fixes ABBA deadlock noted by Patrick McHardy <[EMAIL PROTECTED]>: > > > There is at least one ABBA deadlock, est_timer() does: > >

Re: [NET]: gen_estimator deadlock fix

2007-07-16 Thread Ranko Zivojnovic
s the ABBA deadlock is attached. WRT api patch - although I did not face any problems so far, I still need to do more comprehensive testing... Best regards and thanks for the patience, R. [NET] gen_estimator deadlock fix -Fixes ABBA deadlock noted by Patrick McHardy <[EMAIL PROTECTED]>:

Re: [NET]: gen_estimator deadlock fix

2007-07-16 Thread Patrick McHardy
Jarek Poplawski wrote: > There is probably quite easy way to get rid of this one race only > by e.g. replacing *bstats field with NULL in gen_kill_estimator, > and check for this in est_timer just after taking a lock. > > The gain from an api change would be mainly faster gen_kill_ > and gen_repla

Re: [NET]: gen_estimator deadlock fix

2007-07-15 Thread Jarek Poplawski
On Fri, Jul 13, 2007 at 03:42:31PM +0200, Jarek Poplawski wrote: ... > On Fri, Jul 13, 2007 at 03:26:42PM +0300, Ranko Zivojnovic wrote: > I've been a bit tight on time today, and only now I see that maybe > you have done too much. Of course, you can do it your way, but I > think it should be easie

Re: [NET]: gen_estimator deadlock fix

2007-07-13 Thread Jarek Poplawski
On Fri, Jul 13, 2007 at 03:26:42PM +0300, Ranko Zivojnovic wrote: > On Fri, 2007-07-13 at 14:17 +0200, Jarek Poplawski wrote: > > On Thu, Jul 12, 2007 at 08:48:45PM +0300, Ranko Zivojnovic wrote: > > ... > > > Ok - here's the patch for a review - it compiles clean ... and that's as > > > much as it

Re: [NET]: gen_estimator deadlock fix

2007-07-13 Thread Ranko Zivojnovic
On Fri, 2007-07-13 at 14:17 +0200, Jarek Poplawski wrote: > On Thu, Jul 12, 2007 at 08:48:45PM +0300, Ranko Zivojnovic wrote: > ... > > Ok - here's the patch for a review - it compiles clean ... and that's as > > much as it has been tested - I'll try give it a run later today or > > definitely tomo

Re: [NET]: gen_estimator deadlock fix

2007-07-13 Thread Jarek Poplawski
On Thu, Jul 12, 2007 at 08:48:45PM +0300, Ranko Zivojnovic wrote: ... > Ok - here's the patch for a review - it compiles clean ... and that's as > much as it has been tested - I'll try give it a run later today or > definitely tomorrow. ... Ranko, you have some powers! Alas, I definitely need mor

Re: [NET]: gen_estimator deadlock fix

2007-07-12 Thread Ranko Zivojnovic
On Thu, 2007-07-12 at 14:07 +0200, Patrick McHardy wrote: > [Removed Andrew from CC] > > Ranko Zivojnovic wrote: > > I agree - it does look like the most sensible thing to do - have > > gnet_stats_basic and gnet_stats_rate_est allocated within the > > gen_estimator struct rather than pointers look

Re: [NET]: gen_estimator deadlock fix

2007-07-12 Thread Patrick McHardy
[Removed Andrew from CC] Ranko Zivojnovic wrote: > I agree - it does look like the most sensible thing to do - have > gnet_stats_basic and gnet_stats_rate_est allocated within the > gen_estimator struct rather than pointers looking here and there - and > provide api to maintain those stats - it si

Re: [NET]: gen_estimator deadlock fix

2007-07-12 Thread Ranko Zivojnovic
On Thu, 2007-07-12 at 12:46 +0200, Jarek Poplawski wrote: > On Thu, Jul 12, 2007 at 12:18:23PM +0300, Ranko Zivojnovic wrote: > > On Thu, 2007-07-12 at 09:37 +0200, Jarek Poplawski wrote: > > > - setup_timer(&elist[idx].timer, est_timer, est->interval); > > > + setup_t

Re: [NET]: gen_estimator deadlock fix

2007-07-12 Thread Jarek Poplawski
On Thu, Jul 12, 2007 at 12:18:23PM +0300, Ranko Zivojnovic wrote: > On Thu, 2007-07-12 at 09:37 +0200, Jarek Poplawski wrote: > > On Wed, Jul 11, 2007 at 04:41:37PM +0300, Ranko Zivojnovic wrote: > > > Signed-off-by: Ranko Zivojnovic <[EMAIL PROTECTED]> > > > > Maybe it's only my issue, but it see

Re: [NET]: gen_estimator deadlock fix

2007-07-12 Thread Ranko Zivojnovic
On Thu, 2007-07-12 at 12:18 +0300, Ranko Zivojnovic wrote: > > > > I've done a bit of mess last time, so maybe it was forgotten, but I > > still think this kind of race is possible: > > > > - gen_kill_estimator is called during qdisc_destroy under > > dev->queue_lock, > > - est_timer is running

Re: [NET]: gen_estimator deadlock fix

2007-07-12 Thread Ranko Zivojnovic
On Thu, 2007-07-12 at 09:37 +0200, Jarek Poplawski wrote: > On Wed, Jul 11, 2007 at 04:41:37PM +0300, Ranko Zivojnovic wrote: > > Signed-off-by: Ranko Zivojnovic <[EMAIL PROTECTED]> > > Maybe it's only my issue, but it seems there are no tabs: all spaces... Nope - you are right - just noticed my

Re: [NET]: gen_estimator deadlock fix

2007-07-12 Thread Jarek Poplawski
On Wed, Jul 11, 2007 at 04:41:37PM +0300, Ranko Zivojnovic wrote: > Fixes ABBA deadlock noted by Patrick McHardy <[EMAIL PROTECTED]>: > > There is at least one ABBA deadlock, est_timer() does: > > read_lock(&est_lock) > > spin_lock(e->stats_lock) (which is dev->queue_lock) > > > > and qdisc_destro

[NET]: gen_estimator deadlock fix

2007-07-11 Thread Ranko Zivojnovic
Fixes ABBA deadlock noted by Patrick McHardy <[EMAIL PROTECTED]>: > There is at least one ABBA deadlock, est_timer() does: > read_lock(&est_lock) > spin_lock(e->stats_lock) (which is dev->queue_lock) > > and qdisc_destroy calls htb_destroy under dev->queue_lock, which > calls htb_destroy_class, th