Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2014-08-29 Thread Yann Ylavic
On Fri, Aug 29, 2014 at 4:48 PM, Yann Ylavic wrote: > On Fri, Aug 29, 2014 at 4:28 PM, Ruediger Pluem wrote: >> Is this correct? apr_atomic_add32 expects an uint as 2nd argument. I just >> experienced a situation where all workers are >> idle, but queue_info->idlers < zero_pt. > > The final code

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2014-08-29 Thread Yann Ylavic
On Fri, Aug 29, 2014 at 4:28 PM, Ruediger Pluem wrote: > > > j...@apache.org wrote: >> Author: jim >> Date: Mon Nov 25 13:59:06 2013 >> New Revision: 1545286 >> >> URL: http://svn.apache.org/r1545286 >> Log: >> Use a normalized offset point for idlers... still need to worry >> that atomics work as

AW: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2014-08-29 Thread Plüm , Rüdiger , Vodafone Group
6 - in > /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c > > This operation is checked in event... see the diffs for event.c > in that commit. > > On Aug 29, 2014, at 10:28 AM, Ruediger Pluem wrote: > > > > > > > j...@apache.org wrote: > &g

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2014-08-29 Thread Jim Jagielski
This operation is checked in event... see the diffs for event.c in that commit. On Aug 29, 2014, at 10:28 AM, Ruediger Pluem wrote: > > > j...@apache.org wrote: >> Author: jim >> Date: Mon Nov 25 13:59:06 2013 >> New Revision: 1545286 >> >> URL: http://svn.apache.org/r1545286 >> Log: >> Use a

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2014-08-29 Thread Ruediger Pluem
j...@apache.org wrote: > Author: jim > Date: Mon Nov 25 13:59:06 2013 > New Revision: 1545286 > > URL: http://svn.apache.org/r1545286 > Log: > Use a normalized offset point for idlers... still need to worry > that atomics work as "expected", in this case that a add32 of a -1 > is the "same" as d

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Yann Ylavic
On Mon, Nov 25, 2013 at 7:40 PM, Jim Jagielski wrote: > > On Nov 25, 2013, at 1:09 PM, Jim Jagielski wrote: > > > > > On Nov 25, 2013, at 11:53 AM, Yann Ylavic wrote: > > > >> On Mon, Nov 25, 2013 at 4:53 PM, Jim Jagielski wrote: > >> > >> On Nov 25, 2013, at 10:24 AM, Yann Ylavic wrote: > >>

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Yann Ylavic
On Mon, Nov 25, 2013 at 7:10 PM, Jim Jagielski wrote: > > On Nov 25, 2013, at 11:53 AM, Yann Ylavic wrote: > > > > Indeed, that was not consistent! > > This is a second fix then, the check was doubly broken... > > > > I'm not sure... > Yes, APR_EAGAIN is "all workers busy", so the <= 1 was real

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Jim Jagielski
Upon review, using unsigned makes a lot of sense, so I'll start the adjustment from apr_int32_t and simple ints to apr_uint32_t. On Nov 25, 2013, at 1:40 PM, Jim Jagielski wrote: > > On Nov 25, 2013, at 1:09 PM, Jim Jagielski wrote: > >> >> On Nov 25, 2013, at 11:53 AM, Yann Ylavic wrote: >

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Jim Jagielski
On Nov 25, 2013, at 1:09 PM, Jim Jagielski wrote: > > On Nov 25, 2013, at 11:53 AM, Yann Ylavic wrote: > >> On Mon, Nov 25, 2013 at 4:53 PM, Jim Jagielski wrote: >> >> On Nov 25, 2013, at 10:24 AM, Yann Ylavic wrote: >> >>> >>> As Jeff said in the other thread, I think the test here shou

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Jim Jagielski
On Nov 25, 2013, at 11:53 AM, Yann Ylavic wrote: > > Indeed, that was not consistent! > This is a second fix then, the check was doubly broken... > I'm not sure...

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Jim Jagielski
On Nov 25, 2013, at 11:53 AM, Yann Ylavic wrote: > On Mon, Nov 25, 2013 at 4:53 PM, Jim Jagielski wrote: > > On Nov 25, 2013, at 10:24 AM, Yann Ylavic wrote: > > > > > As Jeff said in the other thread, I think the test here should be : > >if (prev_idlers <= 1) > > that's because dec32 wa

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Yann Ylavic
On Mon, Nov 25, 2013 at 4:24 PM, Yann Ylavic wrote: > > (Note the "int prev_idlers" => "apr_int32_t prev_idlers" too in the patch, > should int be larger than int32_t, eg. with 64bits int, prev_idlers would > not become negative is this case...). > Just to illustrate, suppose sizeof(int) == size

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Yann Ylavic
On Mon, Nov 25, 2013 at 4:53 PM, Jim Jagielski wrote: > > On Nov 25, 2013, at 10:24 AM, Yann Ylavic wrote: > > > > > As Jeff said in the other thread, I think the test here should be : > >if (prev_idlers <= 1) > > that's because dec32 was returning the new value while add32 now returns > the

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Jim Jagielski
On Nov 25, 2013, at 10:24 AM, Yann Ylavic wrote: > > As Jeff said in the other thread, I think the test here should be : >if (prev_idlers <= 1) > that's because dec32 was returning the new value while add32 now returns the > old one (fetch_and_sub vs sub_and_fetch). > We aren't being con

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Yann Ylavic
On Mon, Nov 25, 2013 at 4:24 PM, Yann Ylavic wrote: > > Index: server/mpm/event/fdqueue.c > === > --- server/mpm/event/fdqueue.c(revision 1545301) > +++ server/mpm/event/fdqueue.c(working copy) > @@ -17,7 +17,7 @@ > #include

Re: svn commit: r1545286 - in /httpd/httpd/trunk/server/mpm/event: event.c fdqueue.c

2013-11-25 Thread Yann Ylavic
On Mon, Nov 25, 2013 at 2:59 PM, wrote: > Author: jim > Date: Mon Nov 25 13:59:06 2013 > New Revision: 1545286 > > URL: http://svn.apache.org/r1545286 > Log: > Use a normalized offset point for idlers... still need to worry > that atomics work as "expected", in this case that a add32 of a -1 > is