lkml.org 
[lkml]   [2018]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3 6/6] tty/ldsem: Decrement wait_readers on timeouted down_read()
On Tue, Sep 11, 2018 at 02:33:22PM +0100, Dmitry Safonov wrote:
> > > You might want to think about ditching that ldsem thing entirely,
> > > and use a regular rwsem ?
> >
> > Yeah, but AFAICS, regular rwsem will need to have a timeout then (for
> > write). So, I thought fixing this pile would be simpler than adding
> > timeout and probably writer-priority to generic rwsem?
> >
> > And I guess, we still will need fixes for stable for the bugs here..
> >
> > I expect that timeouts are ABI, while the gain of adding priority may
> > be measured. I'll give it a shot (adding timeout/priority for linux-
> > next) to rwsem if you say it's acceptable.
>
> Actually, priority looks quite simple: we can add writers in the head
> of wait_list and it probably may work.
> Timeout looks also not a rocket science.
> So, I can try to do that if you say it's acceptable (with the gain
> measures).

So why do you need writer priority? The comment that goes with ldsems
doesn't explain I think, it just says it has it.

In general I dislike unfair locks, they always cause trouble.

> After this can of worms that I need to fix regardless.

Sure.

\
 
 \ /
  Last update: 2018-09-11 15:51    [W:0.072 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site