Subject: Re: [NET]: gen_estimator deadlock fix

From: Jarek Poplawski <[email-masked]>
Date: Mon, 16 Jul 2007 09:00:32 +0200

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 easier not change too much at once, so if possible
> only include structs bstats and rate_est into struct gen_estimator
> and do otherwise in these few sch_'s and act_'s which use this plus
> all acceses and allocs changed appropriately. So it should be only 6
> or 7 files affected. It seems no changes about gen_stats are necessary
> now (next patch?).

Alas, I was wrong. This idea really needs to change all these files
plus even more! If I could've foreseen this...

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_replace_estimator. But, on the other hand, you have it
almost done. Ranko, I think these changes need opinion of more
maintainers as soon as possible - after all they could have some
objections; IMHO at least: Jamal Hadi Salim, Thomas Graf (authors
plus act_), Stephen Hemminger (sch_netem) and Jiri Benc
(net/mac80211).

I also have some suggestions, but maybe it would be better to do
them on a current version (the main is about this *stats_lock - 
you probably misunderstood Patrick - but I hope you found it
yourself).

Regards,
Jarek P.