Re: rwlock_t unfairness and tasklist_lock

2013-01-24 Thread Michel Lespinasse
On Sat, Jan 12, 2013 at 9:31 AM, Oleg Nesterov wrote: > On 01/09, Michel Lespinasse wrote: >> >> - Would there be any fundamental objection to implementing a fair >> >> rwlock_t and dealing with the reentrancy issues in tasklist_lock ? My >> >> proposal there would be along the lines of: >> > >>

Re: rwlock_t unfairness and tasklist_lock

2013-01-24 Thread Michel Lespinasse
On Sat, Jan 12, 2013 at 9:31 AM, Oleg Nesterov o...@redhat.com wrote: On 01/09, Michel Lespinasse wrote: - Would there be any fundamental objection to implementing a fair rwlock_t and dealing with the reentrancy issues in tasklist_lock ? My proposal there would be along the lines of: I

Re: [PATCH] rwlock_t unfairness and tasklist_lock

2013-01-12 Thread Oleg Nesterov
On 01/11, Michel Lespinasse wrote: > > So I looked again at getpriority() since that's what I had used for my > DOS test code, and it looks like everything there is already protected > by RCU or smaller granularity locks and refcounts. Patch attached to > remove this tasklist_lock usage. And

Re: rwlock_t unfairness and tasklist_lock

2013-01-12 Thread Oleg Nesterov
On 01/09, Michel Lespinasse wrote: > > On Wed, Jan 9, 2013 at 9:49 AM, Oleg Nesterov wrote: > > On 01/08, Michel Lespinasse wrote: > >> Like others before me, I have discovered how easy it is to DOS a > >> system by abusing the rwlock_t unfairness and causing the > >> tasklist_lock read side to

Re: rwlock_t unfairness and tasklist_lock

2013-01-12 Thread Oleg Nesterov
On 01/09, Michel Lespinasse wrote: On Wed, Jan 9, 2013 at 9:49 AM, Oleg Nesterov o...@redhat.com wrote: On 01/08, Michel Lespinasse wrote: Like others before me, I have discovered how easy it is to DOS a system by abusing the rwlock_t unfairness and causing the tasklist_lock read side to

Re: [PATCH] rwlock_t unfairness and tasklist_lock

2013-01-12 Thread Oleg Nesterov
On 01/11, Michel Lespinasse wrote: So I looked again at getpriority() since that's what I had used for my DOS test code, and it looks like everything there is already protected by RCU or smaller granularity locks and refcounts. Patch attached to remove this tasklist_lock usage. And probably

Re: [PATCH] rwlock_t unfairness and tasklist_lock

2013-01-11 Thread Michel Lespinasse
On Fri, Jan 11, 2013 at 03:34:41PM +0100, Thomas Gleixner wrote: > On Tue, 8 Jan 2013, Michel Lespinasse wrote: > > - Does anyone know of any current work towards removing the > > tasklist_lock use of rwlock_t ? Thomas Gleixner mentioned 3 years ago > > that he'd give it a shot

Re: rwlock_t unfairness and tasklist_lock

2013-01-11 Thread Thomas Gleixner
On Tue, 8 Jan 2013, Michel Lespinasse wrote: > - Does anyone know of any current work towards removing the > tasklist_lock use of rwlock_t ? Thomas Gleixner mentioned 3 years ago > that he'd give it a shot (https://lwn.net/Articles/364601/), did he > encounter some unforeseen difficulty that we

Re: rwlock_t unfairness and tasklist_lock

2013-01-11 Thread Thomas Gleixner
On Tue, 8 Jan 2013, Michel Lespinasse wrote: - Does anyone know of any current work towards removing the tasklist_lock use of rwlock_t ? Thomas Gleixner mentioned 3 years ago that he'd give it a shot (https://lwn.net/Articles/364601/), did he encounter some unforeseen difficulty that we should

Re: [PATCH] rwlock_t unfairness and tasklist_lock

2013-01-11 Thread Michel Lespinasse
On Fri, Jan 11, 2013 at 03:34:41PM +0100, Thomas Gleixner wrote: On Tue, 8 Jan 2013, Michel Lespinasse wrote: - Does anyone know of any current work towards removing the tasklist_lock use of rwlock_t ? Thomas Gleixner mentioned 3 years ago that he'd give it a shot

Re: rwlock_t unfairness and tasklist_lock

2013-01-09 Thread Michel Lespinasse
On Wed, Jan 9, 2013 at 9:49 AM, Oleg Nesterov wrote: > On 01/08, Michel Lespinasse wrote: >> Like others before me, I have discovered how easy it is to DOS a >> system by abusing the rwlock_t unfairness and causing the >> tasklist_lock read side to be continuously held > > Yes. Plus it has

Re: rwlock_t unfairness and tasklist_lock

2013-01-09 Thread Oleg Nesterov
On 01/08, Michel Lespinasse wrote: > > Like others before me, I have discovered how easy it is to DOS a > system by abusing the rwlock_t unfairness and causing the > tasklist_lock read side to be continuously held Yes. Plus it has perfomance problems. It should die. We still need the global lock

Re: rwlock_t unfairness and tasklist_lock

2013-01-09 Thread Oleg Nesterov
On 01/08, Michel Lespinasse wrote: Like others before me, I have discovered how easy it is to DOS a system by abusing the rwlock_t unfairness and causing the tasklist_lock read side to be continuously held Yes. Plus it has perfomance problems. It should die. We still need the global lock to

Re: rwlock_t unfairness and tasklist_lock

2013-01-09 Thread Michel Lespinasse
On Wed, Jan 9, 2013 at 9:49 AM, Oleg Nesterov o...@redhat.com wrote: On 01/08, Michel Lespinasse wrote: Like others before me, I have discovered how easy it is to DOS a system by abusing the rwlock_t unfairness and causing the tasklist_lock read side to be continuously held Yes. Plus it has

rwlock_t unfairness and tasklist_lock

2013-01-08 Thread Michel Lespinasse
Like others before me, I have discovered how easy it is to DOS a system by abusing the rwlock_t unfairness and causing the tasklist_lock read side to be continuously held (my abuse code makes use of the getpriority syscall, but there are plenty of other ways anyway). My understanding is that the

rwlock_t unfairness and tasklist_lock

2013-01-08 Thread Michel Lespinasse
Like others before me, I have discovered how easy it is to DOS a system by abusing the rwlock_t unfairness and causing the tasklist_lock read side to be continuously held (my abuse code makes use of the getpriority syscall, but there are plenty of other ways anyway). My understanding is that the