Skip to content

Fix alignment for 32 bit compilers - #2511

Closed
mkaczanowski wants to merge 2 commits into
etcd-io:masterfrom
mkaczanowski:master
Closed

mkaczanowski wants to merge 2 commits into
etcd-io:masterfrom
mkaczanowski:master

Conversation

@mkaczanowski

Copy link
Copy Markdown

I've managed to run etcd + fleet on odroid u3 (ARM) and wandboard (ARM). It seems to work correctly after these few alignments are changed. I believe this patch won't cause much harm? Anyway it work perfectly fine so far, I've expected more failures due frequent sync but I'm using emmc + ssd memory, so it is not so bad.

I'll make some stress tests in a while.

Comment thread store/watcher_hub.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

count is protected by the mutex right? move the mutex before the count? or at least add a comment

@mkaczanowski

Copy link
Copy Markdown
Author

@xiang90 Yeah, certainly comments are required. Is that ok?

@yichengq

Copy link
Copy Markdown
Contributor

Some random thought for implementation: what about add a align int64 field at the head of these structs? It makes code cleaner and doesn't introduce overhead because all these structs are created only once per etcd life cycle.

@mkaczanowski

Copy link
Copy Markdown
Author

@yichengq That might be ok, but yet it is still extra variable. There is very little places where alignment is needed, so I'll leave it as it is. For now

@xiang90

xiang90 commented Mar 18, 2015

Copy link
Copy Markdown
Contributor

@mkaczanowski I would like to merge this, but there is still no guarantee that etcd can work well on 32bit machines. :(

@xiang90

xiang90 commented Mar 18, 2015

Copy link
Copy Markdown
Contributor

Can you please squash the commits and change the commit message to *: fix alignment for 32 bit compilers

@mkaczanowski

Copy link
Copy Markdown
Author

Yeah sure.

@philips

philips commented Mar 23, 2015

Copy link
Copy Markdown
Contributor

@mkaczanowski If we merge this can we ask you to maintain it moving forward and ping you when folks have other questions about etcd + 32bit?

@mkaczanowski

Copy link
Copy Markdown
Author

@philips Sorry for late response, I've been away. Yes I'm totally fine with that. I'll help as much as I can.

@0xmichalis

Copy link
Copy Markdown

Can we get this merged?

@mkaczanowski

Copy link
Copy Markdown
Author

I believe, yes.

@0xmichalis

Copy link
Copy Markdown

@yichengq That might be ok, but yet it is still extra variable. There is very little places where alignment is needed, so I'll leave it as it is. For now

It's a lot cleaner though and since it's a very specific problem we shouldn't refactor struct fields to address it: openshift/origin#1938

@xiang90

xiang90 commented Aug 9, 2015

Copy link
Copy Markdown
Contributor

@mkaczanowski We merged #3249 to fix this issue. It would be great if you can keep an eye on arm build. Thanks!

@xiang90 xiang90 closed this Aug 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants