Messages in this thread | | | From | (Cedric ROUX) | Subject | Re: cpu consumption calculation - why these difference ? | Date | Mon, 31 May 1999 16:36:58 +0200 (MEST) |
| |
Hi,
> > Hi! > > Following up myself, anyway, here's the patch. Tell me if it makes a > difference.
<snip patch >
> > -- > I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel. Pavel > Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! >
Sorry for being so long in testing the patch, but sleeping takes a lot of time.
Well, yes there are differences. Now, the second prog. gets 30% of CPU instead of 0.1%, but the first one gets 5% which seems closer to the reality to me.
I have two others programs (still dealing with sound), one of mine which takes lots of CPU and deal with X at the same time (it's a sound tracker) and one (midas, a sound player) that is very optimized and only plays modules, no interactions with X, and i read the source of it, there is a big pentium optimized code and some tests that I do inside my loops are done outside in midas, so it _must_ take less cpu. But, it uses the usleep way (well i think, don't remember exactly) and so it had 0.1% before the patch, and now gets something like 40 or 50% where my program (a blocking select is used) gets 10%, so once again i think the patch is wrong.
I am sorry not to be able to help more, but this very specific topic of the kernel is out of my knowledge, reading the source would be a good solution, but lack of time for now... Is there a doc somewhere about this (cpu consumption calculation) ?
Thank you and see you, Sed.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |