BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000249 [BusyBox] Other tweak N/A 05-07-05 15:31 01-19-06 06:53
Reporter AMohr View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.00
Summary 0000249: constify patch
Description Hi,

Introduction part:
----------
I'm doing a performance tuning effort all over the place in
frequently-used Linux programs:
I'm trying to mark as many data areas as possible const (and static)
in various programs (at those places where it's actually feasible,
that is).

This should have the following benefits:
a) more .rodata (read-only) pages in programs, which means that
   pages (since they're read-only and can thus be restored from the binary any
   time) can simply be discarded instead of having to be paged out when
   free memory is getting low
b) more page sharing between program instances due to less
   modified / read-write (and thus unique instance *per-program*!) memory pages
c) various const compiler optimizations kicking in
d) less linker work to be done (static)

(use "objdump -x" to analyze what can be improved)

In smaller programs marking variables as const won't be enough to get
several whole pages (4K size) back to read-only, but it goes into the
right direction after all, since we don't intend to actually increase
the number of read-write pages...
----------

I marked several busybox variables const, resulting in the following improvement:

busybox before:
 13 .rodata 0000edc5 0808c080 0808c080 00044080 2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 15 .data 0000045c 0809b000 0809b000 00053000 2**5
                  CONTENTS, ALLOC, LOAD, DATA
-rwxr-xr-x 1 root staff 5499979 May 8 00:16 busybox

busybox after:
 13 .rodata 0000ee05 0808c080 0808c080 00044080 2**5
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 15 .data 00000428 0809b000 0809b000 00053000 2**5
                  CONTENTS, ALLOC, LOAD, DATA
-rwxr-xr-x 1 root staff 5499943 May 8 00:15 busybox


Thank you,

Andreas Mohr
(patch attached, against current SVN)
Additional Information
Attached Files  busybox.diff [^] (2,764 bytes) 05-07-05 15:31

- Relationships

- Notes
(0000952)
bernhardf
01-19-06 06:53

The last missing bits of this specific (small) constify patch were added as rev.13426.

Thank you!
 

- Issue History
Date Modified Username Field Change
05-07-05 15:31 AMohr New Issue
05-07-05 15:31 AMohr File Added: busybox.diff
01-19-06 06:53 bernhardf Status assigned => closed
01-19-06 06:53 bernhardf Note Added: 0000952
01-19-06 06:53 bernhardf Resolution open => fixed
01-19-06 06:53 bernhardf Fixed in Version  => svn


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker