From: David Brown <dave@codewhore.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Preempt on PowerPC/SMP appears to leak memory
Date: Sat, 12 Apr 2003 11:29:51 -0400 [thread overview]
Message-ID: <20030412152951.GA10367@codewhore.org> (raw)
Hi:
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. With the
following modification, I was able to get a preemptive kernel running on
a dual 1Ghz PowerMac in SMP mode:
diff -urN linux-2.4.20-preempt/include/asm-ppc/spinlock.h linux-2.4.20-dev/include/asm-ppc/spinlock.h
--- linux-2.4.20-preempt/include/asm-ppc/spinlock.h 2003-04-06 22:35:45.000000000 -0400
+++ linux-2.4.20-dev/include/asm-ppc/spinlock.h 2003-04-06 01:30:48.000000000 -0500
@@ -49,7 +49,7 @@
#else /* ! SPINLOCK_DEBUG */
-static inline void spin_lock(spinlock_t *lock)
+static inline void _raw_spin_lock(spinlock_t *lock)
{
unsigned long tmp;
@@ -69,13 +69,13 @@
: "cr0", "memory");
}
-static inline void spin_unlock(spinlock_t *lock)
+static inline void _raw_spin_unlock(spinlock_t *lock)
{
__asm__ __volatile__("eieio # spin_unlock": : :"memory");
lock->lock = 0;
}
-#define spin_trylock(lock) (!test_and_set_bit(0,(lock)))
+#define _raw_spin_trylock(lock) (!test_and_set_bit(0,(lock)))
#endif
@@ -119,7 +119,7 @@
#else /* ! SPINLOCK_DEBUG */
-static __inline__ void read_lock(rwlock_t *rw)
+static __inline__ void _raw_read_lock(rwlock_t *rw)
{
unsigned int tmp;
@@ -139,7 +139,7 @@
: "cr0", "memory");
}
-static __inline__ void read_unlock(rwlock_t *rw)
+static __inline__ void _raw_read_unlock(rwlock_t *rw)
{
unsigned int tmp;
@@ -154,7 +154,7 @@
: "cr0", "memory");
}
-static __inline__ void write_lock(rwlock_t *rw)
+static __inline__ void _raw_write_lock(rwlock_t *rw)
{
unsigned int tmp;
@@ -174,7 +174,7 @@
: "cr0", "memory");
}
-static __inline__ void write_unlock(rwlock_t *rw)
+static __inline__ void _raw_write_unlock(rwlock_t *rw)
{
__asm__ __volatile__("eieio # write_unlock": : :"memory");
rw->lock = 0;
Unfortunately, something appears to be leaking memory across forks.
Running `while /bin/true; do /bin/echo -n; done` manages to trigger the
OOM killer within 2 minutes. Under normal load (make -j3 and gcc), the
machine takes over an hour to leak away its 256MB of memory. In both
cases, after the login shell is killed, a SysRq to 'dump memory' shows
roughly 2MB free, with the rest allocated.
Before I debug/trace any further, I'm curious as to whether or not
preempt is known to work on PowerPC in SMP mode. If it's supposed to,
I'd be happy to capture any data that may help.
Anyway - any help or advice would be greatly appreciated.
Thanks,
- Dave
dave@codewhore.org
next reply other threads:[~2003-04-12 15:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-12 15:29 David Brown [this message]
2003-04-13 21:55 ` Preempt on PowerPC/SMP appears to leak memory Robert Love
2003-04-13 21:57 ` Robert Love
2003-04-13 22:02 ` David Brown
2003-04-13 23:03 ` Marc-Christian Petersen
2003-04-13 23:07 ` Robert Love
2003-04-13 23:12 ` Marc-Christian Petersen
2003-04-14 2:26 ` David Brown
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=20030412152951.GA10367@codewhore.org \
--to=dave@codewhore.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