Actions
Feature #10050
closed[PATCH 0/2] reduce rb_io_t to 192 bytes (from 216) on 64-bit
    Feature #10050:
    [PATCH 0/2] reduce rb_io_t to 192 bytes (from 216) on 64-bit
  
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
        
           Updated by normalperson (Eric Wong) over 11 years ago
          Updated by normalperson (Eric Wong) over 11 years ago
          
          
        
        
      
      - File 0001-rb_io_t.patch 0001-rb_io_t.patch added
        
           Updated by normalperson (Eric Wong) over 11 years ago
          Updated by normalperson (Eric Wong) over 11 years ago
          
          
        
        
      
      
    
        
           Updated by normalperson (Eric Wong) over 11 years ago
          Updated by normalperson (Eric Wong) over 11 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
        
           Updated by Anonymous over 11 years ago
          Updated by Anonymous over 11 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 11 years ago
          Updated by ngoto (Naohisa Goto) over 11 years ago
          
          
        
        
      
      - Related to Bug #10088: Bus Error on Sparc Solaris since r46884 added
Actions