Re: [PATCH] rtc: remove BKL for ioctl()

From: David Brownell
Date: Wed Jun 25 2008 - 19:05:02 EST


On Wednesday 25 June 2008, Alan Cox wrote:
> >
> > Shouldn't that be -EINTR?
>
> For an ioctl case which should never be blocking for long periods it
> shouldn't be _interruptible in the first place, that will just introduce
> bizarre and weird bugs in application code.
>
> If there are slow ops they should drop and retake the lock.

What's a "long period"?

RTCs that connect using I2C or SPI will need to queue for access to
that particular serial bus, and then there are transfer costs.
The busses are frequently, but of course not always, idle. For I2C
at 100 KHz, RTC transfers might take a millisecond or so.

I'd be tempted to say those are all quick enough that the ops don't
need to be interruptible.

- Dave
--
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/