use schedule() instead of yield()
Subsystems (2)
PATCH 1/1 use schedule() instead of yield()
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
drivers/net/sis900.c +1 -1
@@ -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)) {
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [Kernel-janitors] [patch] use schedule() instead of
Max,
Quoted 2 lines · maximilian attems
yield()removes process from active array into expired array, better just preempt withschedule().
What we wanted to do here is just yield the CPU for a bit (not to give
it up for a long time, like the 2.6 yield).
Quoted 1 line
as belows timeout is set to 5 seconds,
Eh?
Quoted 1 line
schedule()may be better than to use aschedule_timeout(1).
Perhaps:
set_current_state (TASK_UNINTERRUPTIBLE);schedule_timeout (HZ/100);
?
Felipe
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [Kernel-janitors] [patch] use schedule() instead of
In reply to maximilian attemsQuoted 5 lines · Felipe W Damasio
Quoted 2 lines
yield()removes process from active array into expired array, better just preempt withschedule().What we wanted to do here is just yield the CPU for a bit (not to give it up for a long time, like the 2.6 yield).
ok i'll rediff and test tomorrow morning.
Quoted 4 lines
Quoted 2 lines
as belows timeout is set to 5 seconds,
Eh?
well sis900.c sets
unsigned long timeout = jiffies + 5 * HZ;
there for i thought that this hole issue "while(poll_bit)" wasn't that timing sensitive.
thanks for your propososal.
a++ maks
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors