On Thu, Aug 10, 2017 at 10:32 PM, Cholerae Hu <[email protected]> wrote: > Currently if we use timer or something, runtime will start a new goroutine > to do timerproc works. Why can't we check timer heap in each iteration of > sysmon if any timer exists? This may reduce some context switchs, I think.
A significant complexity would be that the sysmon thread runs without a p, but the timer goroutine is just a normal goroutine. That means that the either the sysmon thread can not directly invoke the functions on the timer heap, or those functions have to be carefully written and audited to be able to run without a p (which implies, for example, that they can not allocate memory). I would be surprised if we see any performance benefit sufficient to justify the increase in complexity. 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
