On Sat, Nov 2, 2019 at 4:58 AM Vincent Blanchon
<blanchon.vinc...@gmail.com> wrote:
>
> Reading the code, I can see the structs m and p hold a mcache instance. I'm 
> curious to understand why both of them need an instance of mcache?
> Also, I see that those instances are the same ones (runtime/proc.go init the 
> p.mcache with m.cache and vice versa), is it correct? Should we consider that 
> mcache belongs to m or p?

The mcache belongs to the P.

We used to have the possibility of an M using the mcache of a P even
though it was not running on the P.  That happened in the helpgc
function which was run by gchelpers.  But gchelpers was removed in
https://golang.org/cl/134785, so it may be that we no longer need the
mcache field on an M.

Out of curiosity, I tried that: https://golang.org/cl/205239.

Ian

-- 
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/CAOyqgcWVv3TKn31TWyQQo346qFTWG58Tb0NkKZUhc09aO3gshA%40mail.gmail.com.

Reply via email to