All of lore.kernel.org
 help / color / mirror / Atom feed
From: maximilian attems <janitor@sternwelten.at>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] [patch] use schedule() instead of yield()
Date: Mon, 19 Apr 2004 16:57:42 +0000	[thread overview]
Message-ID: <20040419165742.GD1393@sputnik.stro.at> (raw)

[-- Attachment #1: Type: text/plain, Size: 716 bytes --]

patch is on top of 2.6.6-rc1.

yield() removes process from active array into expired array,
better just preempt with schedule().
as belows timeout is set to 5 seconds, 
schedule() may be better than to use a schedule_timeout(1).

tested on my laptop, but maybe my card never reach this path.


a++ maks


diff -ruN a/drivers/net/sis900.c b/drivers/net/sis900.c
--- a/drivers/net/sis900.c	2004-03-16 08:47:07.000000000 +0100
+++ b/drivers/net/sis900.c	2004-03-12 11:19:29.000000000 +0100
@@ -600,7 +600,7 @@
 
 	if(status & MII_STAT_LINK){
 		while (poll_bit) {
-			yield();
+			schedule();
 
 			poll_bit ^= (mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS) & poll_bit);
 			if (time_after_eq(jiffies, timeout)) {

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

             reply	other threads:[~2004-04-19 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-19 16:57 maximilian attems [this message]
2004-04-19 17:13 ` [Kernel-janitors] [patch] use schedule() instead of Felipe W Damasio
2004-04-20 19:19 ` maximilian attems

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=20040419165742.GD1393@sputnik.stro.at \
    --to=janitor@sternwelten.at \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.