lkml.org 
[lkml]   [2013]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC: PATCH 2/2] iio: adc: exynos_adc: Handle timeout and race conditions
On 04/05/2013 04:56 PM, Doug Anderson wrote:
> Lars,
>
> On Fri, Apr 5, 2013 at 1:53 AM, Lars-Peter Clausen <lars@metafoo.de> wrote:
>> Since we sleep inside the protected section we need to use a mutex.
>
> Ah, good point.
>
>> It's not the timeout case I'm worried about, but the case where the transfer
>> is interrupted by the user. Even though it is rather unlikely for the
>> problem to occur we should still try to avoid it, this is one of these
>> annoying heisenbugs that happen once in a while and nobody is able to
>> reproduce them.
>
> Yes, of course. Then we can also get extra confidence that the reset
> logic works well by stressing out this case... :)
>
> This makes me think, though. Given how fast we expect the ADC
> transaction to finish, would there be any benefit to making the wait
> non-interruptible and then shortening the timeout a whole lot. If we
> shortened to 1ms then we're really not "non-interruptible" for very
> long and there's less chance of subtle bugs in the way that reset
> works.

Yes, that could also work.

- Lars


\
 
 \ /
  Last update: 2013-04-05 18:21    [W:0.040 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site