Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Sun, 13 Apr 2003 22:26:18 -0400 | From | David Brown <> | Subject | Re: Preempt on PowerPC/SMP appears to leak memory |
| |
On Sun, Apr 13, 2003 at 05:57:24PM -0400, Robert Love wrote: | On Sat, 2003-04-12 at 11:29, David Brown wrote: | | > I recently applied the preempt-kernel-rml-2.4.21-pre1-1.patch from | > kernel.org to BenH's stable tree from rsync.penguinppc.org. | | Oh, one other thing. An updated patch for 2.4.20 is up: | | http://www.kernel.org/pub/linux/kernel/people/rml/preempt-kernel/v2.4/preempt-kernel-rml-2.4.20-2.patch | | It has a couple fixes for proper protection of per-CPU data, including | some PPC-specific ones.
Hi Robert:
AFAICT, the leak is still there. I'll be looking at that in a bit. I used the following to get it to compile on the PPC box. I'm not sure if it's 100% correct, but it appears to work:
diff -ur linux-2.4.20-preempt/arch/ppc/kernel/mk_defs.c linux-2.4.20-ben/arch/ppc/kernel/mk_defs.c --- linux-2.4.20-preempt/arch/ppc/kernel/mk_defs.c 2003-04-12 02:57:31.000000000 -0400 +++ linux-2.4.20-ben/arch/ppc/kernel/mk_defs.c 2003-04-13 13:57:00.000000000 -0400 @@ -44,6 +44,7 @@ DEFINE(MM, offsetof(struct task_struct, mm)); #ifdef CONFIG_PREEMPT DEFINE(PREEMPT_COUNT, offsetof(struct task_struct, preempt_count)); + DEFINE(CPU, offsetof(struct task_struct, processor)); #endif DEFINE(ACTIVE_MM, offsetof(struct task_struct, active_mm)); DEFINE(TASK_STRUCT_SIZE, sizeof(struct task_struct));
It just adds a DEFINE() for the use of CPU() in arch/ppc/kernel/entry.S.
Thanks,
- Dave
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |