Re: async-calls squid3/src comm.cc,1.81.4.16,1.81.4.17

From: Henrik Nordström <henrik@dont-contact.us>
Date: Fri, 11 Jan 2008 16:06:03 +0100

ons 2008-01-09 klockan 21:13 +1300 skrev Amos Jeffries:

> That this code is currently depending on that implicit guarantee when it
> should not be. This change is the perfect time to drop that implicit
> dependency and make it clean (bug free!). Having one precursor call
> schedule its successor is the cleanest and fastest way to do that.
> Run-time speed optimizations can wait, but this is a stability issue.

Even the day when we are fully SMP with support for 80 CPU cores call
order of calls scheduled form the same job will be preserved, unless
they are explicitly made as callouts for parallell processing which I
don't see will be needed.

To scale on SMP it's very important you keep the processing of the same
job on the same CPU. Each time data needs to cross from one CPU to the
other is very expensive, and each time you need to syncronize access for
all CPUs is really bad..

Ideally there will be one worker thread per CPU core, each with their
own filedescriptors, async queues, comm loop etc. Possibly even memory
management.

It's still too early to say if this will be done using threads or
processes. But what we certainly will not see is that everything uses a
global async-call queue managed by all CPUs. If you desing that way then
you could just as well not go the SMP path and you'll probably get
better performance..

Regards
Henrik

Received on Fri Jan 11 2008 - 08:07:09 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST