All of lore.kernel.org
 help / color / mirror / Atom feed
* [Kernel-janitors] [patch] use schedule() instead of yield()
@ 2004-04-19 16:57 maximilian attems
  2004-04-19 17:13 ` [Kernel-janitors] [patch] use schedule() instead of Felipe W Damasio
  2004-04-20 19:19 ` maximilian attems
  0 siblings, 2 replies; 3+ messages in thread
From: maximilian attems @ 2004-04-19 16:57 UTC (permalink / raw)
  To: kernel-janitors

[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-20 19:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-19 16:57 [Kernel-janitors] [patch] use schedule() instead of yield() maximilian attems
2004-04-19 17:13 ` [Kernel-janitors] [patch] use schedule() instead of Felipe W Damasio
2004-04-20 19:19 ` maximilian attems

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.