RE: some bad numbers with Java/database threading

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux-Kernel@Vger. Kernel. Org <linux-kernel@...>
Date: Thursday, September 13, 2007 - 5:47 pm

First, let me apologize if the tone of my other post came through as angry or frustrated. Text can sometimes be misleading as to tone. I certainly wasn't angry.

Second, let me say that I'm definitely not suggesting that you were wrong to bring this to everyone's attention. Even if it turns out that your code is horribly broken and it's all your fault, any apparent regression still has to be investigated. It is virtually certain that we will learn something interesting about either your code, CFS, or both.

I was definitely *not* saying "how dare you challenge CFS' supremacy without a perfect test case".

Antoine Martin wrote:





The problem is that because your access pattern is pathological, schedulers that are objectively worse may turn in much better performance. For example, a scheduler that completely ignores your attempt to sleep will probably perform significantly better than a scheduler that goes out of its way to honor it.

That the execution time is very sensitive to the pause is strong evidence of this.

The problem is simply that your test program doesn't do a fixed amount of work. It does a variable amount of work, and that amount depends upon scheduler details. It's like a job that has fifty threads that do this:

1) Increment a shared variable.
2) Do a math problem a number of times equal to the value of that shared variable.
3) Decrement the shared variable.

The problem is that the number of times the math problem is done depends upon the execution order of the threads. To be fair, you would need to benchmark how many times the math problem gets done, not how long the threads take to complete.

Now, imagine if I insert a yield between steps 1 and 2. The more a scheduler honors your yield request, the worse it will appear to perform. The scheduler that ignores it (which is legal, but definitely not The Right Thing) will seem to perform *much* better.

Of course, it's also possible that this is not what's going on.

DS


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
CFS: some bad numbers with Java/database threading, Antoine Martin, (Wed Sep 12, 7:10 pm)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Thu Sep 13, 7:24 am)
Re: CFS: some bad numbers with Java/database threading, Ingo Molnar, (Fri Sep 14, 4:32 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 6:06 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 12:01 pm)
Re: CFS: some bad numbers with Java/database threading, Antoine Martin, (Mon Sep 17, 8:17 am)
Re: CFS: some bad numbers with Java/database threading, Satyam Sharma, (Fri Sep 14, 12:08 pm)
Re: CFS: new java yield graphs, Antoine Martin, (Tue Sep 25, 9:46 pm)
Re: CFS: new java yield graphs, Ingo Molnar, (Thu Sep 27, 4:35 am)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 3:18 am)
Re: some bad numbers with Java/database threading, Nick Piggin, (Wed Sep 12, 7:33 pm)
Re: some bad numbers with Java/database threading, Antoine Martin, (Thu Sep 13, 3:02 pm)
RE: some bad numbers with Java/database threading, David Schwartz, (Thu Sep 13, 5:47 pm)