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

Issue 108700045: code review 108700045: runtime: implement monotonic clocks on windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by brainman
Modified:
10 years, 3 months ago
Reviewers:
minux, dvyukov
CC:
golang-codereviews, patrick2, aram2, minux
Visibility:
Public.

Description

runtime: implement monotonic clocks on windows Update issue 6007.

Patch Set 1 #

Patch Set 2 : diff -r 395bf97d72a1 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 395bf97d72a1 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 4 : diff -r 8e05add24c7e https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r b3d45fe62d73 https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 6 : diff -r 455d073a9dd7 https://go.googlecode.com/hg/ #

Total comments: 5

Patch Set 7 : diff -r d81fb87ee976 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -13 lines) Patch
M src/pkg/runtime/os_windows.c View 4 chunks +36 lines, -10 lines 0 comments Download
M src/pkg/time/sleep_test.go View 3 chunks +19 lines, -3 lines 0 comments Download

Messages

Total messages: 40
brainman
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 4 months ago (2014-07-16 05:50:31 UTC) #1
brainman
Sorry, Dmitriy, but GetTickCount works for me. I will use it for now. But I ...
10 years, 4 months ago (2014-07-16 05:51:37 UTC) #2
dvyukov
https://codereview.appspot.com/108700045/diff/40001/src/pkg/runtime/os_windows.c File src/pkg/runtime/os_windows.c (right): https://codereview.appspot.com/108700045/diff/40001/src/pkg/runtime/os_windows.c#newcode274 src/pkg/runtime/os_windows.c:274: static uint64 tclow, tchigh; you declare it as uint64, ...
10 years, 4 months ago (2014-07-16 08:12:11 UTC) #3
dvyukov
On 2014/07/16 05:51:37, brainman wrote: > Sorry, Dmitriy, but GetTickCount works for me. I will ...
10 years, 4 months ago (2014-07-16 08:13:46 UTC) #4
brainman
Hello golang-codereviews@googlegroups.com, dvyukov@google.com (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 4 months ago (2014-07-17 06:23:44 UTC) #5
brainman
On 2014/07/16 08:12:11, dvyukov wrote: > hello, data race > after fifty days, several threads ...
10 years, 4 months ago (2014-07-17 06:24:11 UTC) #6
dvyukov
the code looks good to me to test it, I would (1) add 1<<31-1000 to ...
10 years, 4 months ago (2014-07-17 17:30:14 UTC) #7
brainman
On 2014/07/17 17:30:14, dvyukov wrote: > ... Thank you Dmitry. I will try it. Alex
10 years, 4 months ago (2014-07-18 07:53:43 UTC) #8
brainman
On 2014/07/17 17:30:14, dvyukov wrote: > > as for the slowdown, both tests set timers ...
10 years, 3 months ago (2014-07-22 05:13:23 UTC) #9
dvyukov
On 2014/07/22 05:13:23, brainman wrote: > On 2014/07/17 17:30:14, dvyukov wrote: > > > > ...
10 years, 3 months ago (2014-07-22 07:51:46 UTC) #10
brainman
On 2014/07/22 07:51:46, dvyukov wrote: > >... I am sure that I saw 1ms increments ...
10 years, 3 months ago (2014-07-22 09:29:26 UTC) #11
dvyukov
On 2014/07/22 09:29:26, brainman wrote: > On 2014/07/22 07:51:46, dvyukov wrote: > > > >... ...
10 years, 3 months ago (2014-07-22 09:39:37 UTC) #12
dvyukov
QPC with fallback to GetTickCount on XP looks fine to me. I hope there are ...
10 years, 3 months ago (2014-07-22 09:42:48 UTC) #13
patrick2
On 2014/07/22 09:39:37, dvyukov wrote: > I mean that (1) QPC is faster than what ...
10 years, 3 months ago (2014-07-22 09:51:59 UTC) #14
brainman
On 2014/07/22 09:39:37, dvyukov wrote: > > Now I am puzzled about difference in behavior ...
10 years, 3 months ago (2014-07-22 10:21:29 UTC) #15
aram2
On Tue, Jul 22, 2014 at 12:51 PM, <patrick@mezard.eu> wrote: > I have encountered *massive* ...
10 years, 3 months ago (2014-07-22 10:22:19 UTC) #16
brainman
On 2014/07/22 09:42:48, dvyukov wrote: > QPC with fallback to GetTickCount on XP looks fine ...
10 years, 3 months ago (2014-07-22 10:22:48 UTC) #17
brainman
On 2014/07/22 09:51:59, patrick2 wrote: > > Do the Windows hosts run on real hardware ...
10 years, 3 months ago (2014-07-22 10:23:31 UTC) #18
dvyukov
On Tue, Jul 22, 2014 at 2:21 PM, Aram Hăvărneanu <aram.h@mgk.ro> wrote: > On Tue, ...
10 years, 3 months ago (2014-07-22 10:29:01 UTC) #19
brainman
On 2014/07/22 10:29:01, dvyukov wrote: > > Alex, this can be a reason to not ...
10 years, 3 months ago (2014-07-22 11:04:59 UTC) #20
brainman
On 2014/07/22 07:51:46, dvyukov wrote: > > Humm... I am sure that I saw 1ms ...
10 years, 3 months ago (2014-07-23 02:27:35 UTC) #21
dvyukov
On 2014/07/23 02:27:35, brainman wrote: > On 2014/07/22 07:51:46, dvyukov wrote: > > > > ...
10 years, 3 months ago (2014-07-23 07:52:56 UTC) #22
brainman
On 2014/07/23 07:52:56, dvyukov wrote: > > I would go with 0x7FFE0008. ... That works ...
10 years, 3 months ago (2014-07-24 07:43:44 UTC) #23
dvyukov
On 2014/07/24 07:43:44, brainman wrote: > On 2014/07/23 07:52:56, dvyukov wrote: > > > > ...
10 years, 3 months ago (2014-07-24 08:15:04 UTC) #24
dvyukov
On 2014/07/24 08:15:04, dvyukov wrote: > On 2014/07/24 07:43:44, brainman wrote: > > On 2014/07/23 ...
10 years, 3 months ago (2014-07-24 08:18:54 UTC) #25
brainman
I tested all possible candidate APIs again. This program: package main import ( "fmt" "runtime" ...
10 years, 3 months ago (2014-07-25 04:55:35 UTC) #26
dvyukov
Do you know if timeBeginPeriod requires admin rights? If yes, then the numbers can be ...
10 years, 3 months ago (2014-07-25 07:02:40 UTC) #27
brainman
On 2014/07/25 07:02:40, dvyukov wrote: > Do you know if timeBeginPeriod requires admin rights? ...
10 years, 3 months ago (2014-07-25 07:13:03 UTC) #28
dvyukov
This is getting insane. I think just need to relaxed the sleep test on windows ...
10 years, 3 months ago (2014-07-25 07:42:39 UTC) #29
brainman
On 2014/07/25 07:42:39, dvyukov wrote: > > Btw, that SystemTime at 0x7FFE0014 is the same ...
10 years, 3 months ago (2014-07-25 07:45:33 UTC) #30
brainman
Hello golang-codereviews@googlegroups.com, dvyukov@google.com, patrick@mezard.eu, aram.h@mgk.ro (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 3 months ago (2014-07-31 01:01:41 UTC) #31
brainman
Dmitry, Finally I am happy with result (as good as we can make it). It ...
10 years, 3 months ago (2014-07-31 01:02:07 UTC) #32
minux
this is much nicer! Thanks. https://codereview.appspot.com/108700045/diff/80001/src/pkg/runtime/os_windows.c File src/pkg/runtime/os_windows.c (right): https://codereview.appspot.com/108700045/diff/80001/src/pkg/runtime/os_windows.c#newcode274 src/pkg/runtime/os_windows.c:274: INTERRUPT_TIME = (KSYSTEM_TIME*)0x7ffe0008, let's ...
10 years, 3 months ago (2014-07-31 02:15:34 UTC) #33
brainman
https://codereview.appspot.com/108700045/diff/80001/src/pkg/runtime/os_windows.c File src/pkg/runtime/os_windows.c (right): https://codereview.appspot.com/108700045/diff/80001/src/pkg/runtime/os_windows.c#newcode274 src/pkg/runtime/os_windows.c:274: INTERRUPT_TIME = (KSYSTEM_TIME*)0x7ffe0008, On 2014/07/31 02:15:33, minux wrote: > ...
10 years, 3 months ago (2014-07-31 05:04:25 UTC) #34
brainman
Hello golang-codereviews@googlegroups.com, dvyukov@google.com, patrick@mezard.eu, aram.h@mgk.ro, minux@golang.org (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 3 months ago (2014-07-31 05:04:40 UTC) #35
minux
LGTM. Please wait for dmitry.
10 years, 3 months ago (2014-07-31 06:13:16 UTC) #36
dvyukov
I like the runtime code too. LGTM if you agree with the fix https://codereview.appspot.com/108700045/diff/100001/src/pkg/runtime/os_windows.c File ...
10 years, 3 months ago (2014-07-31 08:17:02 UTC) #37
brainman
*** Submitted as https://code.google.com/p/go/source/detail?r=b673250d7b72 *** runtime: implement monotonic clocks on windows Update issue 6007. LGTM=minux, ...
10 years, 3 months ago (2014-08-01 01:18:21 UTC) #38
dvyukov
https://codereview.appspot.com/108700045/diff/100001/src/pkg/runtime/os_windows.c File src/pkg/runtime/os_windows.c (right): https://codereview.appspot.com/108700045/diff/100001/src/pkg/runtime/os_windows.c#newcode291 src/pkg/runtime/os_windows.c:291: runtime·throw("interrupt/system time is changing too fast"); On 2014/08/01 01:18:20, ...
10 years, 3 months ago (2014-08-05 12:59:11 UTC) #39
brainman
10 years, 3 months ago (2014-08-06 07:16:54 UTC) #40
Message was sent while issue was closed.
On 2014/08/05 12:59:11, dvyukov wrote:
> 
> first osyield would have been called only on 99-th iteration.
> With your code osyield is executed after the first failed attempt. ...

I knew I was missing something. https://codereview.appspot.com/117670043

Alex
Sign in to reply to this message.

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