LGTM https://codereview.appspot.com/72360043/diff/70001/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): https://codereview.appspot.com/72360043/diff/70001/src/pkg/runtime/proc.c#newcode1945 src/pkg/runtime/proc.c:1945: stksize = round2(FixedStack); Is this need to call ...
11 years, 3 months ago
(2014-03-07 06:42:14 UTC)
#3
On 2014/03/07 06:46:53, dvyukov wrote: > LGTM not lgtm this will effectively disable fixed stack ...
11 years, 3 months ago
(2014-03-07 07:05:03 UTC)
#6
On 2014/03/07 06:46:53, dvyukov wrote:
> LGTM
not lgtm
this will effectively disable fixed stack segment cache, because it caches
segments of FixedStack size
probably you need to adjust FixedStack constant instead
On 2014/03/07 07:05:03, dvyukov wrote: > this will effectively disable fixed stack segment cache, because ...
11 years, 3 months ago
(2014-03-07 07:09:49 UTC)
#8
On 2014/03/07 07:05:03, dvyukov wrote:
> this will effectively disable fixed stack segment cache, because it caches
> segments of FixedStack size
> probably you need to adjust FixedStack constant instead
How about we do this:
make the enum _FixedStack.
and
#define FixedStack round2(_FixedStack)
this has will make the function call each time.
Alternatively,
we can modify StackSystem to be always 4096 (== StackMin).
which do you prefer?
On 2014/03/07 07:11:57, mattn wrote: > I prefer second. Or, global variable. int FixedStack = ...
11 years, 3 months ago
(2014-03-07 07:15:36 UTC)
#10
On 2014/03/07 07:11:57, mattn wrote:
> I prefer second.
Or, global variable.
int FixedStack = -1;
// And at somewhere
if (FixedStack == -1) FixedStack = round2(FixedStack);
On Fri, Mar 7, 2014 at 11:09 AM, <minux.ma@gmail.com> wrote: > On 2014/03/07 07:05:03, dvyukov ...
11 years, 3 months ago
(2014-03-07 07:18:24 UTC)
#11
On Fri, Mar 7, 2014 at 11:09 AM, <minux.ma@gmail.com> wrote:
> On 2014/03/07 07:05:03, dvyukov wrote:
>>
>> this will effectively disable fixed stack segment cache, because it
>
> caches
>>
>> segments of FixedStack size
>> probably you need to adjust FixedStack constant instead
>
> How about we do this:
>
> make the enum _FixedStack.
> and
> #define FixedStack round2(_FixedStack)
> this has will make the function call each time.
>
> Alternatively,
> we can modify StackSystem to be always 4096 (== StackMin).
this will waste lots of memory on StackGuard
I would manually calculate the constants and the check all necessary
properties of the constants at startup
being able to see the real numbers is useful
> which do you prefer?
>
> https://codereview.appspot.com/72360043/
I changed FixedStack to a variable, however it seems to break every platform. (go_bootstrap runs ...
11 years, 3 months ago
(2014-03-07 16:43:07 UTC)
#12
I changed FixedStack to a variable, however it seems to break every
platform.
(go_bootstrap runs fine, but cmd/go just SIGSEGV and silently exits)
Does anyone see problem in the code? I'm pretty confused.
This CL seems too complex. I propose to just bump 386 to 4k like amd64 ...
11 years, 3 months ago
(2014-03-07 19:19:27 UTC)
#14
This CL seems too complex. I propose to just bump 386 to 4k like amd64 is
already. We are already reserving 2k per goroutine. Bumping that to 4k
seems like not a big deal. After all the minimum stack size just came down
from 8k to 4k, so we're still ahead of Go 1.2 as far as minimal goroutine
footprint. I submitted CL 72600043 to fix the windows builder. We can worry
about other cleanup separately.
I sent that comment before your PTAL. Your new version is nicer - I just ...
11 years, 3 months ago
(2014-03-07 19:20:50 UTC)
#15
I sent that comment before your PTAL. Your new version is nicer - I just wanted
to get the build fixed. If you want to update your CL to build against tip,
please do.
Thanks.
https://codereview.appspot.com/72360043/diff/130002/src/pkg/runtime/stack.h File src/pkg/runtime/stack.h (right): https://codereview.appspot.com/72360043/diff/130002/src/pkg/runtime/stack.h#newcode80 src/pkg/runtime/stack.h:80: // Do not use this constant directly, use the ...
11 years, 3 months ago
(2014-03-07 19:30:34 UTC)
#17
PTAL. On Fri, Mar 7, 2014 at 2:30 PM, <rsc@golang.org> wrote: > https://codereview.appspot.com/72360043/diff/130002/src/ > pkg/runtime/stack.h#newcode80 ...
11 years, 3 months ago
(2014-03-07 19:36:51 UTC)
#18
PTAL.
On Fri, Mar 7, 2014 at 2:30 PM, <rsc@golang.org> wrote:
> https://codereview.appspot.com/72360043/diff/130002/src/
> pkg/runtime/stack.h#newcode80
> src/pkg/runtime/stack.h:80: // Do not use this constant directly, use
> the variable FixedStack
> StackSystemRounded = StackSystem + (-StackSystem & (StackMin-1)),
> FixedStack = StackMin + StackSystemRounded,
>
Aha, this is really cool!
LGTM https://codereview.appspot.com/72360043/diff/230001/src/pkg/runtime/proc.c File src/pkg/runtime/proc.c (right): https://codereview.appspot.com/72360043/diff/230001/src/pkg/runtime/proc.c#newcode146 src/pkg/runtime/proc.c:146: if(FixedStack != runtime·round2(FixedStack)) this is the sort of ...
11 years, 3 months ago
(2014-03-07 19:44:07 UTC)
#19
Issue 72360043: code review 72360043: runtime: round stack size to power of 2.
(Closed)
Created 11 years, 3 months ago by minux1
Modified 11 years, 3 months ago
Reviewers:
Base URL:
Comments: 4