Project

General

Profile

Actions

Feature #10050

closed

[PATCH 0/2] reduce rb_io_t to 192 bytes (from 216) on 64-bit

Added by normalperson (Eric Wong) over 9 years ago. Updated over 9 years ago.

Status:
Closed
Target version:
[ruby-core:63781]

Description

This will allow x86-64 machines to only use 3 cache lines instead of 4
(where cache size == 64).

Hopefully there are other 64-bit architectures which benefit, too.

This is also public ABI breakage, so I hope to commit it around when a patch for
Feature #10034 (re_pattern_buffer reduction) gets committed to reduce testers'
need to rebuild C exts.


Files

0001-rb_io_t.p (19 Bytes) 0001-rb_io_t.p normalperson (Eric Wong), 07/17/2014 05:08 AM
0001-rb_io_t.patch (1.18 KB) 0001-rb_io_t.patch normalperson (Eric Wong), 07/17/2014 05:11 AM
0002-rb_io_buffer_t.patch (966 Bytes) 0002-rb_io_buffer_t.patch normalperson (Eric Wong), 07/17/2014 05:13 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #10088: Bus Error on Sparc Solaris since r46884Closed07/24/2014Actions

Updated by normalperson (Eric Wong) over 9 years ago

I forgot to note this the last publically-visible struct which may be
packed. Internals for the others are defined privately:

$ pahole -P ruby
rb_thread_struct	1016	1000	16
rb_execarg	160	152	8
io_internal_writev_struct	24	16	8
io_advise_struct	32	24	8
waitpid_arg	24	16	8
load_file_arg	48	40	8
rb_econv_t	200	184	16
rb_transcoder	160	152	8
rb_context_struct	1312	1304	8
rb_fiber_struct	2304	2296	8
parser_params	320	304	16
Actions #4

Updated by Anonymous over 9 years ago

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

Applied in changeset r46883.


rb_io_t: shrink from 216 to 200 bytes on 64-bit

  • include/ruby/io.h (rb_io_t): shrink to 200 bytes from 216 on 64-bit
    This puts us within 8 bytes of being three cache lines instead of
    four lines on x86-64. This breaks the ABI.
    [Feature #10050]

Updated by ngoto (Naohisa Goto) over 9 years ago

  • Related to Bug #10088: Bus Error on Sparc Solaris since r46884 added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0