lkml.org 
[lkml]   [2013]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/18] tty: Simplify tty buffer/ldisc interface with helper function
On 20.03.2013 0:21, Peter Hurley wrote:
> Ldisc interface functions must be called with interrupts enabled.
> Separating the ldisc calls into a helper function simplies the
> spin lock management.
>
> Update the buffer's read index _after_ the data has been received
> by the ldisc.
>

Hello Peter!
It looks good for me.
I think also we can remove two variables without waste:
(char_buf), (flag_buf) and use without (&buf->lock)
(head->char_buf_ptr + head->read), (head->char_buf_ptr + head->read),
because (head->read) guarded by (TTYP_FLUSHING).


I have little question about flush_to_ldisc().
Does can it be multithreaded?
I think yes, because on SMP schedule_work() can work on different CPU paralleled.

What do you think about this race condition?
https://lkml.org/lkml/2011/11/7/98

Thank you.
Ilya Zykov <linux@izyk.ru>




\
 
 \ /
  Last update: 2013-03-20 00:01    [W:0.448 / U:25.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site