Re: [PATCH 6/7] mmc_spi: convert timeout handling to jiffies and avoid busy waiting

From: David Brownell
Date: Wed Mar 11 2009 - 22:45:40 EST


On Wednesday 11 March 2009, Wolfgang Mües wrote:
> o SD/MMC card timeouts can be very high. So avoid busy-waiting,
>   using the scheduler. Calculate all timeouts in jiffies units,
>   because this will give us the correct sign when to involve
>   the scheduler.

Of these patches, this is the one that bothers me the most.

First, earlier versions used jiffies ... but switching to
ktime sped things up. (I forget the details by now.)
So it's odd to think that switching again could improve
things. At any rate, if that's worth doing it's worth
having as a separate patch.

Second, as someone previously pointed out, there's a comment
there about switching to sleep() calls ... did you explore
just kicking in schedule_hrtimeout() or somesuch, right at
that point? Heck, just calling schedule() would cut the
busy-wait overhead...





--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/