On Thu, Dec 22, 2011 at 11:47:19AM +0800, freebsdj wrote:
> Sorry for the format, I didn't wrap the long line.
You didn't, but your programs did :=)
> Actually, the thing confused me is that:
> NDEBUG is usually allowed when compiling production
> code, so I suspected that whether it's feasible
On Thu, Dec 22, 2011 at 3:54 PM, Brandon Black wrote:
> Right, so either way an argument based on 2 threads per core is irrelevant,
> which is the argument you made in point (2) earlier. It doesn't make sense
> to argue about the benefits of threads under a layout that's know to be
> suboptimal i
On Thu, Dec 22, 2011 at 7:53 AM, Hongli Lai wrote:
> I know that, but as you can read from my very first email I was planning
> on running I threads, with I=number of cores, where each thread has 1 event
> loop. My question now has got nothing to do with the threads vs events
> debate. Marc is cl
On Thu, Dec 22, 2011 at 2:53 PM, Hongli Lai wrote:
> I know that, but as you can read from my very first email I was planning on
> running I threads, with I=number of cores, where each thread has 1 event
> loop. My question now has got nothing to do with the threads vs events
> debate. Marc is cla
I know that, but as you can read from my very first email I was planning on
running I threads, with I=number of cores, where each thread has 1 event
loop. My question now has got nothing to do with the threads vs events
debate. Marc is claiming that running I *processes* instead of I threads is
fas
On Thu, Dec 22, 2011 at 1:05 AM, Hongli Lai wrote:
> 2. Suppose the system has two cores and N = 4, so two processes or two
> threads will be scheduled on a single core. A context switch to
> another thread on the same core should be cheaper because 1) the MMU
> register does not have to swapped
On Thu, Dec 22, 2011 at 01:58:52AM +0800, freebsdj wrote:
> is modified in another assertion:
> assert ((loop_done = EVUNLOOP_RECURSE, 1)); /* assert for side
[...]
> 2. Why check the loop->loop_done there?
loop->loop_done is not checked, but, as you said, modified. I think this
is done to
On 22/12/2011, at 08:05, Hongli Lai wrote:
>
> It's true that the second program adds an extra layer of indirection
> (the 'data' variable). However:
> 1. If the data is accessed frequently then both the pointer and the
> ThreadData that it points to should be cached by the CPU cache, making
> the