Kevin, please see the commets inside the body.<br>On 12/11/06, <b class="gmail_sendername">Kevin Sanders</b> <<a href="mailto:newroswell@gmail.com">newroswell@gmail.com</a>> wrote:<div><span class="gmail_quote"></span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">One of my coworkers recently observed, that handles associated with a<br>IOCP seem to have CPU affinity, at least sometimes. In a read
<br>completion callback, he posted another read (which is fine and<br>encouraged) and then went off and did a lot of processing which<br>preventing it from calling GQCS for about 20 seconds (very bad). Even<br>though there were 3 other threads waiting on GQCS, they couldn't pop
<br>the completion status for the read from the IOCP even though the read<br>had completed. Finally, as soon as the original thread came back<br>around and called GQCS, it popped the completion instead of the other<br>threads which had been waiting the whole time.
<br><br>This makes sense, because a running thread that is reading & writing<br>would suffer a CPU cache flush if it changed CPUs. This was on a true<br>dual CPU box, not a dual core, or hyperthreaded. I've never read
<br>anything that confirms this, but we did see it in this case.</blockquote><div><br>What' the limit for the running thread for the IOCP? If you choose 0 for it and the platform is UP, there could be only one thread which can running for the IOCP.
<br><br>I just can't believe it what you have observed. Are you sure the 2nd read operation is completed before the 1st thread back to the GQCS?<br><br>Do you mean only the 2nd read operation's result can't be get by GQCS? Does the other IO operations completed during the time be get by GQCS?
<br><br> best reagards,<br>hanzhu<br></div></div>