* [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU.
@ 2007-09-06 18:06 Rick Bronson
2007-09-06 18:46 ` Jörn Engel
2007-09-07 5:39 ` Artem Bityutskiy
0 siblings, 2 replies; 3+ messages in thread
From: Rick Bronson @ 2007-09-06 18:06 UTC (permalink / raw)
To: linux-mtd
This is my first patch for mtd so bear with me... sorry if I missed
something.
[PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the
CPU waiting for ready line.
This patch prevents the nand_wait_ready chip from using too much
CPU time. This was causing very long thread latencies. The
solution, which is used elsewhere in this same file, is to call
cond_resched() in the wait loop.
[From: Rick Bronson <rick@efn.org>]
[Acked-by: Realname <realmail>]
Signed-off-by: Realname <realmail>
diff -ruN mtd-2.6.orig/drivers/mtd/nand/nand_base.c mtd-2.6/drivers/mtd/nand/nand_base.c
--- mtd-2.6.orig/drivers/mtd/nand/nand_base.c 2007-09-06 07:46:18.000000000 -0700
+++ mtd-2.6/drivers/mtd/nand/nand_base.c 2007-09-06 08:31:20.000000000 -0700
@@ -429,6 +429,7 @@
if (chip->dev_ready(mtd))
break;
touch_softlockup_watchdog();
+ cond_resched(); /* let others run */
} while (time_before(jiffies, timeo));
led_trigger_event(nand_led_trigger, LED_OFF);
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU.
2007-09-06 18:06 [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU Rick Bronson
@ 2007-09-06 18:46 ` Jörn Engel
2007-09-07 5:39 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Jörn Engel @ 2007-09-06 18:46 UTC (permalink / raw)
To: Rick Bronson; +Cc: linux-mtd
On Thu, 6 September 2007 11:06:22 -0700, Rick Bronson wrote:
>
> [From: Rick Bronson <rick@efn.org>]
> [Acked-by: Realname <realmail>]
> Signed-off-by: Realname <realmail>
Looks like whatever tool you used needs a bit of configuration.
Jörn
--
To announce that there must be no criticism of the President, or that we
are to stand by the President, right or wrong, is not only unpatriotic
and servile, but is morally treasonable to the American public.
-- Theodore Roosevelt, Kansas City Star, 1918
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU.
2007-09-06 18:06 [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU Rick Bronson
2007-09-06 18:46 ` Jörn Engel
@ 2007-09-07 5:39 ` Artem Bityutskiy
1 sibling, 0 replies; 3+ messages in thread
From: Artem Bityutskiy @ 2007-09-07 5:39 UTC (permalink / raw)
To: rick; +Cc: linux-mtd
On Thu, 2007-09-06 at 11:06 -0700, Rick Bronson wrote:
> if (chip->dev_ready(mtd))
> break;
> touch_softlockup_watchdog();
> + cond_resched(); /* let others run */
> } while (time_before(jiffies, timeo));
> led_trigger_event(nand_led_trigger, LED_OFF);
> }
And I think this touch_softlockup_watchdog() is bogus.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-07 5:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-06 18:06 [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU Rick Bronson
2007-09-06 18:46 ` Jörn Engel
2007-09-07 5:39 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox