Skip to content

Commit

Permalink
Revert "perf: gopool enable PreemptOff"
Browse files Browse the repository at this point in the history
This reverts commit b52892f.
  • Loading branch information
joway committed Sep 21, 2023
1 parent b52892f commit 271965a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions util/gopool/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func newWorker() interface{} {
func (w *worker) run() {
go func() {
g := runtimex.GetG()
m := g.M()
p := m.P()
for {
var t *task
now := runtimex.Nanotime()
Expand All @@ -61,8 +63,6 @@ func (w *worker) run() {
return
}

m := g.M()
p := m.P()
// update sysmon tick
if w.updateSched {
st := *p.Sysmontick()
Expand All @@ -81,9 +81,7 @@ func (w *worker) run() {
logger.CtxErrorf(t.ctx, msg)
}
}
*(g.M().PreemptOff()) = ""
}()
*m.PreemptOff() = "holding"
t.f()
}()
t.Recycle()
Expand Down

0 comments on commit 271965a

Please sign in to comment.