From: Chris Wedgwood <cw@f00f.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>
Subject: [PATCH 1/3] Separate IRQ-stacks from 4K-stacks option
Date: Thu, 9 Sep 2004 16:25:32 -0700 [thread overview]
Message-ID: <20040909232532.GA13572@taniwha.stupidest.org> (raw)
Right now CONFIG_4KSTACKS implies IRQ-stacks. Some people though
really need 8K stacks and it would be nice to have IRQ-stacks for them
too.
This splits the option in two with the intention of removing the
IRQ-stacks option completely.
arch/i386/Kconfig.debug | 13 ++++++++++---
arch/i386/defconfig | 1 -
arch/i386/kernel/irq.c | 14 +++++++-------
include/asm-i386/irq.h | 6 +++---
include/asm-i386/module.h | 6 +++---
include/asm-i386/thread_info.h | 6 +++---
6 files changed, 26 insertions(+), 20 deletions(-)
Signed-off-by: Chris Wedgwood <cw@f00f.org>
diff -Nru a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug
--- a/arch/i386/Kconfig.debug 2004-09-09 16:06:04 -07:00
+++ b/arch/i386/Kconfig.debug 2004-09-09 16:06:04 -07:00
@@ -46,14 +46,21 @@
This results in a large slowdown, but helps to find certain types
of memory corruptions.
-config 4KSTACKS
+config I386_4KSTACKS
bool "Use 4Kb for kernel stacks instead of 8Kb"
+ default n
help
If you say Y here the kernel will use a 4Kb stacksize for the
kernel stack attached to each process/thread. This facilitates
running more threads on a system and also reduces the pressure
- on the VM subsystem for higher order allocations. This option
- will also use IRQ stacks to compensate for the reduced stackspace.
+ on the VM subsystem for higher order allocations.
+
+config I386_IRQSTACKS
+ bool "Allocate separate IRQ stacks"
+ default y
+ help
+ If you say Y here the kernel will allocate and use separate
+ stacks for interrupts.
config SCHEDSTATS
bool "Collect scheduler statistics"
diff -Nru a/arch/i386/defconfig b/arch/i386/defconfig
--- a/arch/i386/defconfig 2004-09-09 16:06:04 -07:00
+++ b/arch/i386/defconfig 2004-09-09 16:06:04 -07:00
@@ -1221,7 +1221,6 @@
CONFIG_EARLY_PRINTK=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
# CONFIG_FRAME_POINTER is not set
-CONFIG_4KSTACKS=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
--- a/arch/i386/kernel/irq.c 2004-09-09 16:06:04 -07:00
+++ b/arch/i386/kernel/irq.c 2004-09-09 16:06:04 -07:00
@@ -76,10 +76,10 @@
/*
* per-CPU IRQ handling stacks
*/
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_I386_IRQSTACKS
union irq_ctx *hardirq_ctx[NR_CPUS];
union irq_ctx *softirq_ctx[NR_CPUS];
-#endif
+#endif /* CONFIG_I386_IRQSTACKS */
/*
* Special irq handlers.
@@ -489,7 +489,7 @@
* useful for irq hardware that does not mask cleanly in an
* SMP environment.
*/
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_I386_IRQSTACKS
for (;;) {
irqreturn_t action_ret;
@@ -542,7 +542,7 @@
desc->status &= ~IRQ_PENDING;
}
-#else
+#else /* not using CONFIG_I386_IRQSTACKS */
for (;;) {
irqreturn_t action_ret;
@@ -558,7 +558,7 @@
break;
desc->status &= ~IRQ_PENDING;
}
-#endif
+#endif /* CONFIG_I386_IRQSTACKS */
desc->status &= ~IRQ_INPROGRESS;
out:
@@ -1077,7 +1077,7 @@
}
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_I386_IRQSTACKS
/*
* These should really be __section__(".bss.page_aligned") as well, but
* gcc's 3.0 and earlier don't handle that correctly.
@@ -1155,4 +1155,4 @@
}
EXPORT_SYMBOL(do_softirq);
-#endif
+#endif /* CONFIG_I386_IRQSTACKS */
diff -Nru a/include/asm-i386/irq.h b/include/asm-i386/irq.h
--- a/include/asm-i386/irq.h 2004-09-09 16:06:04 -07:00
+++ b/include/asm-i386/irq.h 2004-09-09 16:06:04 -07:00
@@ -31,7 +31,7 @@
#define ARCH_HAS_NMI_WATCHDOG /* See include/linux/nmi.h */
#endif
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_I386_IRQSTACKS
/*
* per-CPU IRQ handling contexts (thread information and stack)
*/
@@ -46,9 +46,9 @@
extern void irq_ctx_init(int cpu);
#define __ARCH_HAS_DO_SOFTIRQ
-#else
+#else /* not using CONFIG_I386_IRQSTACKS */
#define irq_ctx_init(cpu) do { ; } while (0)
-#endif
+#endif /* CONFIG_I386_IRQSTACKS */
struct irqaction;
struct pt_regs;
diff -Nru a/include/asm-i386/module.h b/include/asm-i386/module.h
--- a/include/asm-i386/module.h 2004-09-09 16:06:04 -07:00
+++ b/include/asm-i386/module.h 2004-09-09 16:06:04 -07:00
@@ -60,11 +60,11 @@
#define MODULE_REGPARM ""
#endif
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_I386_4KSTACKS
#define MODULE_STACKSIZE "4KSTACKS "
-#else
+#else /* not using CONFIG_I386_4KSTACKS */
#define MODULE_STACKSIZE ""
-#endif
+#endif /* CONFIG_I386_4KSTACKS */
#define MODULE_ARCH_VERMAGIC MODULE_PROC_FAMILY MODULE_REGPARM MODULE_STACKSIZE
diff -Nru a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h
--- a/include/asm-i386/thread_info.h 2004-09-09 16:06:04 -07:00
+++ b/include/asm-i386/thread_info.h 2004-09-09 16:06:04 -07:00
@@ -52,11 +52,11 @@
#endif
#define PREEMPT_ACTIVE 0x4000000
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_I386_4KSTACKS
#define THREAD_SIZE (4096)
-#else
+#else /* not using CONFIG_I386_4KSTACKS */
#define THREAD_SIZE (8192)
-#endif
+#endif /* CONFIG_I386_4KSTACKS */
#define STACK_WARN (THREAD_SIZE/8)
/*
next reply other threads:[~2004-09-09 23:32 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-09 23:25 Chris Wedgwood [this message]
2004-09-09 23:55 ` Brian Gerst
2004-09-09 23:59 ` Chris Wedgwood
2004-09-10 6:40 ` Arjan van de Ven
2004-09-10 6:45 ` Chris Wedgwood
2004-09-10 6:52 ` Arjan van de Ven
2004-09-10 7:15 ` Chris Wedgwood
2004-09-10 7:21 ` Arjan van de Ven
2004-09-10 7:23 ` Chris Wedgwood
2004-09-10 7:35 ` Arjan van de Ven
2004-09-10 9:12 ` Alan Cox
2004-09-10 9:14 ` Alan Cox
2004-09-10 10:27 ` Russell King
2004-09-10 14:30 ` Martin J. Bligh
2004-09-10 15:06 ` Chris Wedgwood
2004-09-10 15:07 ` Hugh Dickins
2004-09-10 15:12 ` Alan Cox
2004-09-10 15:15 ` Arjan van de Ven
2004-09-10 15:28 ` Andrea Arcangeli
2004-09-10 15:09 ` Alan Cox
2004-09-10 15:34 ` Arjan van de Ven
2004-09-12 14:17 ` Andrea Arcangeli
2004-09-12 15:03 ` Martin J. Bligh
2004-09-12 15:45 ` Zwane Mwaikambo
2004-09-12 16:00 ` Martin J. Bligh
2004-10-20 16:27 ` Lee Revell
2004-10-21 15:18 ` Zwane Mwaikambo
2004-09-12 19:18 ` Lee Revell
2004-09-12 19:25 ` Chris Wedgwood
2004-09-12 19:35 ` Ingo Molnar
2004-09-12 19:40 ` Chris Wedgwood
2004-09-12 19:44 ` Ingo Molnar
2004-09-12 20:33 ` Andrea Arcangeli
2004-09-12 21:36 ` Lee Revell
2004-09-12 22:07 ` Andrea Arcangeli
2004-09-12 22:25 ` Lee Revell
2004-09-13 6:16 ` Ingo Molnar
2004-09-13 7:27 ` Lee Revell
2004-09-15 19:43 ` Bill Davidsen
2004-09-15 19:51 ` Andrea Arcangeli
2004-09-15 20:00 ` Ingo Molnar
2004-09-15 20:39 ` Lee Revell
2004-10-20 17:50 ` Timothy Miller
2004-09-13 7:32 ` Jens Axboe
2004-09-13 10:31 ` Andrea Arcangeli
2004-09-13 10:34 ` Arjan van de Ven
2004-09-13 12:30 ` Jens Axboe
2004-10-20 17:46 ` Timothy Miller
2004-09-13 10:51 ` Alan Cox
2004-09-13 20:26 ` Bill Davidsen
2004-09-14 5:20 ` Lee Revell
2004-10-20 15:46 ` Timothy Miller
2004-10-20 15:35 ` Arjan van de Ven
2004-10-20 16:39 ` Lee Revell
2004-10-20 16:50 ` Andrea Arcangeli
2004-10-20 16:55 ` Lee Revell
2004-10-20 17:08 ` Andrea Arcangeli
2004-10-20 17:15 ` Lee Revell
2004-10-20 17:34 ` Andrea Arcangeli
2004-10-20 17:58 ` Timothy Miller
2004-10-20 17:55 ` Lee Revell
2004-10-20 18:25 ` Timothy Miller
2004-10-20 18:28 ` Lee Revell
2004-10-20 18:51 ` Alan Cox
2004-10-20 23:19 ` Lee Revell
2004-09-10 15:16 ` Martin J. Bligh
2004-10-20 15:43 ` Timothy Miller
2004-10-20 15:35 ` Arjan van de Ven
2004-09-10 15:58 ` Alexander E. Patrakov
2004-09-10 16:19 ` Nathan Bryant
2004-09-10 17:54 ` Martin J. Bligh
2004-09-10 17:54 ` Bill Davidsen
2004-09-10 9:27 ` Alan Cox
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=20040909232532.GA13572@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=hch@infradead.org \
--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
all inboxes | Powered by JetHome®