On Wed, May 04, 2022 at 04:42:21AM -0500, Scott Cheloha wrote:
> > On May 3, 2022, at 17:16, Alexander Bluhm <alexander.bl...@gmx.net> wrote:
> > 
> > ???Hi,
> > 
> > We have one comment that locking for ratecheck(9) is missing.  In
> > all other places locking status of the struct timeval *lasttime
> > is unclear.
> > 
> > The easiest fix is a global mutex for all lasttime in ratecheck().
> > This covers the usual usecase of the function.
> 
> Why not declare a struct ratecheck with
> a per-struct mutex?

Because that diff is more work.  It is the cleaner solution, but
touches a lot of code.

> It seems odd to be heading toward more
> parallel processing in e.g. the networking
> stack and introduce a global point of
> contention.

I don't expect contention on the rate limit.

Make things stable, run in parallel, tweak performance.
That's why I have chosen this aproach.

But if it is too dirty, I can create the larger diff.

bluhm

Reply via email to