From fc54b9bf158eea9cae647ce2c58f7d9989af173a Mon Sep 17 00:00:00 2001 From: mirko Date: Fri, 12 Dec 2008 11:58:53 +0000 Subject: changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13613 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- ...interruptible-sleep-in-kthread-main-loops.patch | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 target/linux/s3c24xx/patches-2.6.24/1234-sdio-use-interruptible-sleep-in-kthread-main-loops.patch (limited to 'target/linux/s3c24xx/patches-2.6.24/1234-sdio-use-interruptible-sleep-in-kthread-main-loops.patch') diff --git a/target/linux/s3c24xx/patches-2.6.24/1234-sdio-use-interruptible-sleep-in-kthread-main-loops.patch b/target/linux/s3c24xx/patches-2.6.24/1234-sdio-use-interruptible-sleep-in-kthread-main-loops.patch new file mode 100644 index 000000000..0eae52f26 --- /dev/null +++ b/target/linux/s3c24xx/patches-2.6.24/1234-sdio-use-interruptible-sleep-in-kthread-main-loops.patch @@ -0,0 +1,64 @@ +From 287b292cf95edbd82dc63085ae5f0167a6e8141f Mon Sep 17 00:00:00 2001 +From: Jason Uhlenkott +Date: Tue, 15 Jul 2008 11:37:45 +0100 +Subject: [PATCH] sdio: use interruptible sleep in kthread main loops + +My FreeRunner's load average was leveling off at 2.00 as a result of +these two kernel threads: + +SDIO Helper D c02b4500 0 255 2 +[] (schedule+0x0/0x2d4) from [] (__down+0x100/0x158) +[] (__down+0x0/0x158) from [] (__down_failed+0xc/0x20) + r7:00000000 r6:c01fbd64 r5:c7cb7134 r4:c7d58000 +[] (CardDetectHelperFunction+0x0/0x1ac) from [] (HelperLaunch+0x1c/0x28) + r5:c7cb7134 r4:c7cb7134 +[] (HelperLaunch+0x0/0x28) from [] (kthread+0x60/0x94) + r4:c7d58000 +[] (kthread+0x0/0x94) from [] (do_exit+0x0/0x744) + r6:00000000 r5:00000000 r4:00000000 + +SDIO Helper D c02b4500 0 259 2 +[] (schedule+0x0/0x2d4) from [] (__down+0x100/0x158) +[] (__down+0x0/0x158) from [] (__down_failed+0xc/0x20) + r7:c0382bb4 r6:c0382b34 r5:c7d5a000 r4:00000001 +[] (SDIOIrqHelperFunction+0x0/0x29c) from [] (HelperLaunch+0x1c/0x28) + r8:00000000 r7:00000000 r6:c01fbd64 r5:c0382bb4 r4:c0382bb4 +[] (HelperLaunch+0x0/0x28) from [] (kthread+0x60/0x94) + r4:c7d5a000 +[] (kthread+0x0/0x94) from [] (do_exit+0x0/0x744) + r6:00000000 r5:00000000 r4:00000000 + +This fixes them to use interruptible sleep primitives while waiting in +their main loops, as is conventional for kernel threads. They can't +actually be interrupted since kernel threads ignore all signals, but +by sleeping this way they get classified as long term waiters, and +don't get counted as running for purposes of load average calculation. + +This is intended as a minimal fix. In the longer term, it'd probably +make sense to replace the semaphores with completions or something, +and to do away with some of these StudlyCapped wrapper functions. + +Signed-off-by: Jason Uhlenkott +-- + +This is untested, but what could possibly go wrong? ;) +--- + include/linux/sdio/ctsystem_linux.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/linux/sdio/ctsystem_linux.h b/include/linux/sdio/ctsystem_linux.h +index 0de89a6..c9e44f2 100644 +--- a/include/linux/sdio/ctsystem_linux.h ++++ b/include/linux/sdio/ctsystem_linux.h +@@ -968,7 +968,7 @@ typedef struct _OSKERNEL_HELPER { + } + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +-#define SD_WAIT_FOR_WAKEUP(p) SignalWait(&(p)->WakeSignal); ++#define SD_WAIT_FOR_WAKEUP(p) SignalWaitInterruptible(&(p)->WakeSignal); + + #define CT_LE16_TO_CPU_ENDIAN(x) __le16_to_cpu(x) + #define CT_LE32_TO_CPU_ENDIAN(x) __le32_to_cpu(x) +-- +1.5.6.5 + -- cgit v1.2.3