From: Matt Mackall <mpm@selenic.com>
To: linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>,
Arjan van de Ven <arjanv@redhat.com>
Subject: [PATCH] Put irq stacks in .bss.page_aligned section
Date: Tue, 25 May 2004 14:30:20 -0500 [thread overview]
Message-ID: <20040525193020.GR28735@waste.org> (raw)
I noticed that my vmlinux BSS had grown from 17k to 45k between 2.6.5
and 2.6.6. 8k was moving a pair of objects in head.S from the text
section to bss, 8k was the introduction of IRQ stacks, while the
remainder (12k) was page alignment slop, some of it spurious. The
following patch brings BSS down to the expected 33k.
Throw the IRQ stacks into the page aligned section to avoided wasted
BSS space. While we'd expect this to save up to 4k, this saves over
10k of BSS here due to gcc3.3 spuriously aligning other objects in the
vicinity.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Index: tiny/arch/i386/kernel/irq.c
===================================================================
--- tiny.orig/arch/i386/kernel/irq.c 2004-05-09 14:23:03.000000000 -0500
+++ tiny/arch/i386/kernel/irq.c 2004-05-25 14:20:24.000000000 -0500
@@ -1125,8 +1125,8 @@
#ifdef CONFIG_4KSTACKS
-static char softirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE)));
-static char hardirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE)));
+static char softirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));
+static char hardirq_stack[NR_CPUS * THREAD_SIZE] __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));
/*
* allocate per-cpu stacks for hardirq and for softirq processing
--
Mathematics is the supreme nostalgia of our time.
reply other threads:[~2004-05-25 19:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040525193020.GR28735@waste.org \
--to=mpm@selenic.com \
--cc=akpm@osdl.org \
--cc=arjanv@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox