From linux-kernel Wed Nov 07 00:10:23 2001 From: Andreas Dilger Date: Wed, 07 Nov 2001 00:10:23 +0000 To: linux-kernel Subject: Re: [PATCH] lp.c, eexpress.c jiffies cleanup X-MARC-Message: https://marc.info/?l=linux-kernel&m=100509197500328 On Nov 06, 2001 21:37 +0000, Philip Blundell wrote: > In message <20011106141521.R3957@lynx.no>, Andreas Dilger writes: > >I agree. It seems very ugly. I looked at a few drivers which loop 1 or 2 > >jiffies, but to busy-loop for 1/10th of a second, or even 20 seconds > >is terribly bad. > > Those timeouts are only a last resort. If the card is working properly > the loop will terminate much sooner. Well, if the card is working properly, then you don't need the timeouts at all. Clearly, if they are needed, then either they should be more realistic in length (1/10th isn't bad, but 20 seconds?), or after a "reasonable" short timeout, it should sleep for an interval and check afterwards. Sucking all CPU for 20 seconds and locking everything else out isn't an acceptable method IMHO. Cheers, Andreas -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://www-mddsp.enel.ucalgary.ca/People/adilger/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/