but 256 run queue size, it's length is 256*8 2048byte, some cpu cache line 
is 32, 64, 128, 256, if run queue length is 128, half of queue size if 
64*8 512byte, they can't be in the same cache line.

在 2020年1月27日星期一 UTC+8下午12:50:32,changkun写道:
>
> 256 run queue size is designed for the work-steal scheduler to prevent 
> false sharing.
>
> 128 run queue size exactly fits one cache line. Since the run queue can be 
> stolen half of the run queue from the tail by other Ps, 256 run queue size 
> prevents false sharing when the work-steal happens on different cores.
>
> On Sunday, January 26, 2020 at 6:31:27 PM UTC+8, jin wang wrote:
>>
>> why p's local run queue size is 256, not 128 or 512?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f65f8ad6-38e4-441a-a1db-78b2a40cdcdc%40googlegroups.com.

Reply via email to