Re: [Coder-Com] Re: PROBLEM: high system usage / poor SMP network performance

From: James Antill (james@and.org)
Date: Fri Feb 08 2002 - 17:11:38 EST


"Darren Smith" <data@barrysworld.com> writes:

> I mean I added a usleep() before the poll in s_bsd.c for the undernet
> 2.10.10 code.
>
> timeout = (IRCD_MIN(delay2, delay)) * 1000;
> + usleep(100000); <- New Line
> nfds = poll(poll_fds, pfd_count, timeout);
>
> And now we're using 1/8th the cpu! With no noticeable effects.

 Note that something else you want to do is call poll() with a 0
timeout first (and if that doesn't return anything call again with the
timeout), this removes all the wait queue manipulation inside the
kernel when something is ready (most of the time).

-- 
# James Antill -- james@and.org
:0:
* ^From: .*james@and\.org
/dev/null
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 15 2002 - 21:00:23 EST