lkml.org 
[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] driver: ip27-rtc - convert ioctl to unlocked_ioctl
[Jiri Slaby - Mon, Jan 14, 2008 at 04:14:18PM +0100]
> On 01/14/2008 07:38 AM, Cyrill Gorcunov wrote:
>> This patch converts ioctl call to unlocked_ioctl form. It's possible
>> due to rtl_lock spinlock protection.
>> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
>> ---
>> The patch is *not* tested but the patch does not bring _much_ changes
>> so it wouldn't break the compilation procedure.
>> If there is problem with attachment - i could send it as inline
>> form today evening.
>
> Yes, please, especially if it is app/octet-stream (base64 encoded
> plaintext). Also Cc akpm or somebody who will pick your patch up.
>

ok

>> Andi, Jiri, Alexey the only thing I do complain about -
>> is time set/read from several user threads that uses same
>> (duplicated) file descriptor. Could there be useless thread
>> spins instead of sleep (in case if this unlocked_ioctl were
>> protected by mutex)?
>
> Sorry, what?
>

Jiri, I mean rtc_open() is protected by spinlock+status from being
opened simultaneously by a few processes. *But* lets imagine the
following situation - this fd (file descriptor) is opened by one
multithreaded application so all threads have an access to this
fd. Then one thread reads rtc periodically thru unlocked_ioctl
and another thread set new time from time to time. So the question
I have - is it possible to get second thread stopped at attemption to
get rtc spinlock while another thread is setting the new time? Or
this situation never-ever could be? i'm not really familiar with
process management in Linux and as result could be wrong.

- Cyrill -


\
 
 \ /
  Last update: 2008-01-14 16:41    [W:2.249 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site