From: Rick Bronson <rick@efn.org>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU.
Date: Thu, 06 Sep 2007 11:06:22 -0700 [thread overview]
Message-ID: <E1ITLkE-0002LI-00@amazonia.comcast.net> (raw)
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);
}
next reply other threads:[~2007-09-06 18:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-06 18:06 Rick Bronson [this message]
2007-09-06 18:46 ` [PATCH] [MTD] NAND: Prevents NAND subsystem from hogging the CPU Jörn Engel
2007-09-07 5:39 ` Artem Bityutskiy
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=E1ITLkE-0002LI-00@amazonia.comcast.net \
--to=rick@efn.org \
--cc=linux-mtd@lists.infradead.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