Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
r...@golang.org  
View profile  
 More options Aug 30 2012, 10:46 am
From: r...@golang.org
Date: Thu, 30 Aug 2012 14:46:44 +0000
Local: Thurs, Aug 30 2012 10:46 am
Subject: Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)

http://codereview.appspot.com/6442109/diff/9001/src/pkg/runtime/runti...
File src/pkg/runtime/runtime.c (right):

http://codereview.appspot.com/6442109/diff/9001/src/pkg/runtime/runti...
src/pkg/runtime/runtime.c:214: if(runtime·armArch < runtime·goarm) {
Where is armArch being set?

http://codereview.appspot.com/6442109/diff/9001/src/pkg/runtime/runti...
src/pkg/runtime/runtime.c:215: runtime·printf("This binary requires
ARMv%d, this host is ARMv%d.\n",
"runtime: cannot run ARMv%d binary on ARMv%d system\n",

http://codereview.appspot.com/6442109/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
minux...@gmail.com  
View profile  
 More options Aug 30 2012, 11:12 am
From: minux...@gmail.com
Date: Thu, 30 Aug 2012 15:12:55 +0000
Local: Thurs, Aug 30 2012 11:12 am
Subject: Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)
On 2012/08/30 14:46:44, rsc wrote:
http://codereview.appspot.com/6442109/diff/9001/src/pkg/runtime/runti...
> src/pkg/runtime/runtime.c:214: if(runtime·armArch < runtime·goarm) {
> Where is armArch being set?

http://tip.golang.org/src/pkg/runtime/signal_linux_arm.c#L178

Russ, could you please take a look at the corresponding golang-dev
discussion?

http://codereview.appspot.com/6442109/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
d...@cheney.net  
View profile  
 More options Aug 30 2012, 9:40 pm
From: d...@cheney.net
Date: Fri, 31 Aug 2012 01:40:05 +0000
Local: Thurs, Aug 30 2012 9:40 pm
Subject: Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)
Thank you for your comments, PTAL.

http://codereview.appspot.com/6442109/diff/9001/src/pkg/runtime/runti...
File src/pkg/runtime/runtime.c (right):

http://codereview.appspot.com/6442109/diff/9001/src/pkg/runtime/runti...
src/pkg/runtime/runtime.c:214: if(runtime·armArch < runtime·goarm) {
On 2012/08/30 14:46:44, rsc wrote:

> Where is armArch being set?

signal_linux_arm.c +178

I might be able to move them closer together if you would like.

http://codereview.appspot.com/6442109/diff/9001/src/pkg/runtime/runti...
src/pkg/runtime/runtime.c:215: runtime·printf("This binary requires
ARMv%d, this host is ARMv%d.\n",
On 2012/08/30 14:46:44, rsc wrote:

> "runtime: cannot run ARMv%d binary on ARMv%d system\n",

Done.

http://codereview.appspot.com/6442109/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
minux  
View profile  
 More options Sep 1 2012, 4:08 am
From: minux <minux...@gmail.com>
Date: Sat, 1 Sep 2012 16:08:14 +0800
Local: Sat, Sep 1 2012 4:08 am
Subject: Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)

sorry, but i tend to oppose this approach now.

as elaborated here:
https://groups.google.com/d/topic/golang-dev/WqJuNnZr8pw/discussion

i think this approach unnecessarily limit the scope of our binaries. this
will make it
difficult for our developers to distribute pre-built binaries (either he
must provide ARMv5
version and sacrifice floating point performance or he provide at least
ARMv5 and ARMv6
versions, but user with VFP-less ARMv6 will have to use the ARMv5 version,
which is
counter-intuitive at least);

we've spend quite some effort in the runtime to auto detect architecture
and use
the best available instructions for synchronization. I think we can do
better for this case.

our Go binary really only need two flavors, one with software floating
point (undoubtedly could
be run on all supported machines), and one with VFPv1 hardware floating
point.

to sum up, i'd rather disable VFPv3-only vmov (imm) instruction entirely
than this approach.

ps:
$GOARM is somewhat misnamed, i think GOVFP would be much better.
if we can introduce GOVFP (or something similar), we can use this approach
for it, because
it is less confusing to the users (our GOARM isn't really related to ARM
Architecture).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cheney  
View profile  
 More options Sep 1 2012, 4:38 am
From: Dave Cheney <d...@cheney.net>
Date: Sat, 1 Sep 2012 18:38:03 +1000
Local: Sat, Sep 1 2012 4:38 am
Subject: Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)

In the spirit of supporting the Pi by Go 1.1, I would support removing vmov imm at this point and revisiting it later. I have a benchmark that shows in the micro there is a significant cost on arm7  without vmov imm for the math package, but it is hard to find a serious impact in the macro go1 benchmarks.

On 01/09/2012, at 18:08, minux <minux...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
minux  
View profile  
 More options Sep 1 2012, 4:57 am
From: minux <minux...@gmail.com>
Date: Sat, 1 Sep 2012 16:57:19 +0800
Local: Sat, Sep 1 2012 4:57 am
Subject: Re: [golang-dev] Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)

On Sat, Sep 1, 2012 at 4:38 PM, Dave Cheney <d...@cheney.net> wrote:
> In the spirit of supporting the Pi by Go 1.1, I would support removing
> vmov imm at this point and revisiting it later. I have a benchmark that
> shows in the micro there is a significant cost on arm7  without vmov imm
> for the math package, but it is hard to find a serious impact in the macro
> go1 benchmarks.

vmov imm doesn't do much (it can only load a specific class of constant
floating
point numbers), i think maybe we can rewrite some code in the math package
to
solve the performance issue.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cheney  
View profile  
 More options Sep 1 2012, 5:12 am
From: Dave Cheney <d...@cheney.net>
Date: Sat, 1 Sep 2012 19:12:49 +1000
Local: Sat, Sep 1 2012 5:12 am
Subject: Re: [golang-dev] Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)

SGTM.

On 01/09/2012, at 18:57, minux <minux...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Russ Cox  
View profile  
 More options Sep 1 2012, 10:01 am
From: Russ Cox <r...@golang.org>
Date: Sat, 1 Sep 2012 10:00:59 -0400
Local: Sat, Sep 1 2012 10:00 am
Subject: Re: [golang-dev] Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)
I would still like to see a runtime check that can print:

runtime: cannot run GOARM=%d binary on this system; need GOARM=%d

because it is a common source of problems for people. Don't make any
reference to the "ARM version", just to the GOARM setting. That
definition is purely under our control.

Russ


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cheney  
View profile  
 More options Sep 1 2012, 10:05 am
From: Dave Cheney <d...@cheney.net>
Date: Sun, 2 Sep 2012 00:05:05 +1000
Local: Sat, Sep 1 2012 10:05 am
Subject: Re: [golang-dev] Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)
rsc: I have updated the error message in runtime.c, PTAL

all: I think we can do both, print an error message on GOARM mismatch,
and also stop using vmov imm (which restricts the range of GOARM
values to 5 and 6) for the moment.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
minux...@gmail.com  
View profile  
 More options Sep 2 2012, 3:19 pm
From: minux...@gmail.com
Date: Sun, 02 Sep 2012 19:19:24 +0000
Local: Sun, Sep 2 2012 3:19 pm
Subject: Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)
i need to do some experiments regarding hard floating point
and kernel software floating point emulation.

maybe we can make both GOARM=5 and GOARM=6 runnable
on most systems.
(GOARM=5 obviously can be run on VFP systems, only slower.
i think GOARM=6 might be able to run VFP-less systems, provided
kernel softfp is enabled [it should be enabled by default on
most systems])

if it's the case, our job is more difficult, but the life will be much
easier for user:
we need to detect whether the kernel can actually run this binary
correctly (maybe slow), and if it's, let it run. if it's not, give error
and exit.

http://codereview.appspot.com/6442109/diff/16007/src/pkg/runtime/runt...
File src/pkg/runtime/runtime.c (right):

http://codereview.appspot.com/6442109/diff/16007/src/pkg/runtime/runt...
src/pkg/runtime/runtime.c:214: if(runtime·armArch < runtime·goarm) {
if we only differentiate GOARM=5 (soft float) and GOARM>5 (VFP),
i think you'd better use runtime.hwcap & HWCAP_VFP instead.

FYI, HWCAP_VFP is defined in /usr/include/asm/hwcap.h.

http://codereview.appspot.com/6442109/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
minux  
View profile  
 More options Sep 3 2012, 12:52 pm
From: minux <minux...@gmail.com>
Date: Tue, 4 Sep 2012 00:52:03 +0800
Local: Mon, Sep 3 2012 12:52 pm
Subject: Re: code review 6442109: runtime: abort on $GOARM mismatch (issue 6442109)

On Mon, Sep 3, 2012 at 3:19 AM, <minux...@gmail.com> wrote:
> i need to do some experiments regarding hard floating point
> and kernel software floating point emulation.

unfortunately, the nwfpe software floating point facility in kernel is
only capable of emulating fpa (not vfp) instructions, so universal
arm binary is still not possible.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »