Re: [PATCH] improving O(1)-J9 in heavily threaded situations

From: Jussi Laako (jussi.laako@kolumbus.fi)
Date: Mon Feb 04 2002 - 18:32:40 EST


Ingo Molnar wrote:
>
> what does 'loose datablocks' mean? What application loses datablocks?

My app http://hasas.sf.net

It's because either distributor's send thread isn't woken up and at
pthread_cond_broadcast() or it's not at pthread_cond_wait() because
receiving process is not receiving it's data because of CPU time starvation.
Thus receiving "CPU hog" process is losing blocks of data.

Data path basically is:

1) read() data from soundcard
2) pthread_cond_broadcast() it
3) pthread_cond_wait() returns | there are N of these
4) write() data to tcp socket |

5) read() data from tcp socket
6) pthread_cond_broadcast() it
7) pthread_cond_wait() returns | there are N of these
8) write() data to unix socket | (here the loss probably happens)

9) read() data from unix socket | there are N of these
10) do some CPU hog stuff | (this process doesn't get all
11) write() results to tcp socket | of the data)

12) read() results from tcp socket | ...and N of these
13) scale data for drawing to screen |
14) do a bit system-cpu-time hog drawing to screen |

        - Jussi Laako

-- 
PGP key fingerprint: 161D 6FED 6A92 39E2 EB5B  39DD A4DE 63EB C216 1E4B
Available at PGP keyservers

- 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 : Thu Feb 07 2002 - 21:00:39 EST