Feature #9068

[PATCH (trivial)] thread.c: reduce rb_mutex_t size by 8 bytes on x86_64

Added by Eric Wong 6 months ago. Updated 6 months ago.

[ruby-core:58114]
Status:Closed
Priority:Low
Assignee:-
Category:core
Target version:2.1.0

Description

gcc can pack the structure better when both 32-bit fields
are next to each other.

(I realized I could have 10K-100K Mutexes potentially in one of my projects,
but maybe I'll change the design :)

0001-thread.c-reduce-rb_mutex_t-size-by-8-bytes-on-x86_64.patch Magnifier (768 Bytes) Eric Wong, 11/01/2013 04:42 AM

Associated revisions

Revision 43497
Added by Motohiro KOSAKI 6 months ago

  • thread.c (rbmutexstruct): reduce rbmutext size by 8 bytes on 64bit platform. Patch by Eric Wong. [Feature #9068]

History

#1 Updated by Motohiro KOSAKI 6 months ago

(10/31/13 3:42 PM), normalperson (Eric Wong) wrote:

Issue #9068 has been reported by normalperson (Eric Wong).


Feature #9068: [PATCH (trivial)] thread.c: reduce rbmutext size by 8 bytes on x86_64
https://bugs.ruby-lang.org/issues/9068

Author: normalperson (Eric Wong)
Status: Open
Priority: Low
Assignee:
Category: core
Target version: current: 2.1.0

gcc can pack the structure better when both 32-bit fields
are next to each other.

(I realized I could have 10K-100K Mutexes potentially in one of my projects,
but maybe I'll change the design :)

ok, please commit.

#2 Updated by Eric Wong 6 months ago

KOSAKI Motohiro kosaki.motohiro@gmail.com wrote:

ok, please commit.

I never accepted commit bit.

However I've been reconsidering that (because of dtas). But I can't
provide a useful GPG-signed pubkey, no web-of-trust connections at all.

So http://yhbt.net/id_rsa.pub has been online for many years, but I
cannot guarantee the corresponding private key is not compromised.
I screw up credential management very frequently :x

#3 Updated by Motohiro KOSAKI 6 months ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r43497.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • thread.c (rbmutexstruct): reduce rbmutext size by 8 bytes on 64bit platform. Patch by Eric Wong. [Feature #9068]

#4 Updated by Motohiro KOSAKI 6 months ago

(10/31/13 5:12 PM), Eric Wong wrote:

KOSAKI Motohiro kosaki.motohiro@gmail.com wrote:

ok, please commit.

I never accepted commit bit.

Sorry, I frequently forget about this. You are a virtual committer.
I've committed this instead of you.

However I've been reconsidering that (because of dtas). But I can't
provide a useful GPG-signed pubkey, no web-of-trust connections at all.

So http://yhbt.net/id_rsa.pub has been online for many years, but I
cannot guarantee the corresponding private key is not compromised.
I screw up credential management very frequently :x

You seems considering about keys too serious. Even if you lost your key,
we can revoke old key and install new one.

#5 Updated by Eric Wong 6 months ago

KOSAKI Motohiro kosaki.motohiro@gmail.com wrote:

(10/31/13 5:12 PM), Eric Wong wrote:

KOSAKI Motohiro kosaki.motohiro@gmail.com wrote:

ok, please commit.

I never accepted commit bit.

Sorry, I frequently forget about this. You are a virtual committer.
I've committed this instead of you.

Thanks.

However I've been reconsidering that (because of dtas). But I can't
provide a useful GPG-signed pubkey, no web-of-trust connections at all.

So http://yhbt.net/id_rsa.pub has been online for many years, but I
cannot guarantee the corresponding private key is not compromised.
I screw up credential management very frequently :x

You seems considering about keys too serious. Even if you lost your key,
we can revoke old key and install new one.

But nobody may know if my key is compromised.
Basically, I'm uncomfortable if people try to trust me with anything.

Also available in: Atom PDF