In message <199806031656.KAA20831@surf>, Duane Wessels writes:
> "Michael O'Reilly" writes:
>
> >
> >Anyone know why the lines
> >
> > if (fdIsHttpOrIcp(fd))
> > continue;
> >
> >appear in comm_select()/comm_poll()? The issue is that if an ICP
> >message is ever queued, a COMM_SELECT_WRITE handler is installed, but
> >never used...
> >
> >Probably, icpHandleUdp() should never install COMM_SELECT_* handlers,
> >and then the above check can be killed altogether (as they'll need
> >appear in the poll/select fd set).
>
> I assume you meant "as they'll *never* appear in the poll/select fd set"?
Yup. sorry. :(
> The incoming descriptors MUST be set for poll/select, otherwise
> if there is no other I/O, new connections will not be detected
> until select times out.
Good point. :) (forgot to conside the quiet cache).
There's still a bug in there, that the comm_incoming() won't call the
write handlers if they're installed, so queued ICP is never sent (and
the squid goes into a busy wait state because it select()s for writing
on the outgoing ICP fd, but never actually writes to it or removes the
write handler... )
The other thing is that checking for fdIsHttpOrIcp() inside the fd
loop is probably a little silly (well, for large caches it is), and it
would be faster to do
FD_RESET(icpFd, &readfds); FD_RESET(icpFd, &writefds);
...
and the poll equiviliant before actually entering the loop.
Michael, whos box is sitting on 95% CPU used... :)
Received on Tue Jul 29 2003 - 13:15:50 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:48 MST