Re: 2.6.0-test11-wli-1

From: William Lee Irwin III
Date: Mon Dec 08 2003 - 08:58:57 EST


On Thu, Dec 04, 2003 at 12:01:20PM -0800, William Lee Irwin III wrote:
> Successfully tested on a Thinkpad T21. Any feedback regarding
> performance would be very helpful. Desktop users should notice top(1)
> is faster, kernel hackers that kernel compiles are faster, and highmem
> users should see much less per-process lowmem overhead.

Woops, I missed the target by a few bytes. Probably a bit overwrought:


-- wli


diff -prauN wli-2.6.0-test11-36/include/asm-i386/processor.h wli-2.6.0-test11-37/include/asm-i386/processor.h
--- wli-2.6.0-test11-36/include/asm-i386/processor.h 2003-12-03 19:40:24.000000000 -0800
+++ wli-2.6.0-test11-37/include/asm-i386/processor.h 2003-12-07 06:36:51.000000000 -0800
@@ -497,11 +497,19 @@ void show_trace(struct task_struct *task
unsigned long get_wchan(struct task_struct *task);

#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
+#define KSTK_TOP(info) \
+({ \
+ unsigned long *__ptr = (unsigned long *)(info); \
+ (unsigned long)(&__ptr[THREAD_SIZE_LONGS]); \
+})
+
#define task_pt_regs(task) \
({ \
- unsigned long *__ptr = (unsigned long *)(task)->thread_info; \
- (struct pt_regs *)(&__ptr[THREAD_SIZE_LONGS-1]); \
+ struct pt_regs *__regs__; \
+ __regs__ = (struct pt_regs *)KSTK_TOP((task)->thread_info); \
+ __regs__ - 1; \
})
+
#define KSTK_EIP(task) (task_pt_regs(task)->eip)
#define KSTK_ESP(task) (task_pt_regs(task)->esp)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/