Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(209)

Issue 10792043: code review 10792043: runtime: more reliable preemption (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years ago by dvyukov
Modified:
11 years, 10 months ago
Reviewers:
rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

runtime: more reliable preemption Currently preemption signal g->stackguard0==StackPreempt can be lost if it is received when preemption is disabled (e.g. m->lock!=0). This change duplicates the preemption signal in g->preempt and restores g->stackguard0 when preemption is enabled. Update issue 543.

Patch Set 1 #

Patch Set 2 : diff -r c224c549a3c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r c224c549a3c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Total comments: 6

Patch Set 4 : diff -r dc24634de6c5 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r dc24634de6c5 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -2 lines) Patch
M src/pkg/runtime/lock_futex.c View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M src/pkg/runtime/lock_sema.c View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 3 chunks +3 lines, -1 line 0 comments Download
M src/pkg/runtime/proc.c View 1 2 3 8 chunks +14 lines, -0 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/stack.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9
dvyukov
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
12 years ago (2013-06-29 17:58:59 UTC) #1
rsc
https://codereview.appspot.com/10792043/diff/6001/src/pkg/runtime/lock_futex.c File src/pkg/runtime/lock_futex.c (right): https://codereview.appspot.com/10792043/diff/6001/src/pkg/runtime/lock_futex.c#newcode103 src/pkg/runtime/lock_futex.c:103: if(g->preempt) // restore the preemption request in case we've ...
12 years ago (2013-07-01 21:39:55 UTC) #2
dvyukov
https://codereview.appspot.com/10792043/diff/6001/src/pkg/runtime/lock_futex.c File src/pkg/runtime/lock_futex.c (right): https://codereview.appspot.com/10792043/diff/6001/src/pkg/runtime/lock_futex.c#newcode103 src/pkg/runtime/lock_futex.c:103: if(g->preempt) // restore the preemption request in case we've ...
11 years, 11 months ago (2013-07-16 17:11:46 UTC) #3
rsc
On 2013/07/16 17:11:46, dvyukov wrote: > https://codereview.appspot.com/10792043/diff/6001/src/pkg/runtime/lock_futex.c > File src/pkg/runtime/lock_futex.c (right): > > https://codereview.appspot.com/10792043/diff/6001/src/pkg/runtime/lock_futex.c#newcode103 > ...
11 years, 11 months ago (2013-07-16 17:39:13 UTC) #4
rsc
11 years, 11 months ago (2013-07-16 17:39:53 UTC) #5
dvyukov
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 11 months ago (2013-07-17 09:34:17 UTC) #6
dvyukov
On 2013/07/16 17:39:13, rsc wrote: > On 2013/07/16 17:11:46, dvyukov wrote: > > https://codereview.appspot.com/10792043/diff/6001/src/pkg/runtime/lock_futex.c > ...
11 years, 11 months ago (2013-07-17 09:34:33 UTC) #7
rsc
LGTM
11 years, 11 months ago (2013-07-17 16:48:39 UTC) #8
rsc
11 years, 11 months ago (2013-07-17 16:52:40 UTC) #9
*** Submitted as https://code.google.com/p/go/source/detail?r=4b1bbdfe7413 ***

runtime: more reliable preemption
Currently preemption signal g->stackguard0==StackPreempt
can be lost if it is received when preemption is disabled
(e.g. m->lock!=0). This change duplicates the preemption
signal in g->preempt and restores g->stackguard0
when preemption is enabled.
Update issue 543.

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/10792043

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b