[PATCH 5/5] fs/locks: create a tree of dependent requests.

2018-08-13 Thread NeilBrown
When we find an existing lock which conflicts with a request, and the request wants to wait, we currently add the request to a list. When the lock is removed, the whole list is woken. This can cause the thundering-herd problem. To reduce the problem, we make use of the (new) fact that a pending re

Re: [PATCH 5/5] fs/locks: create a tree of dependent requests.

2018-08-09 Thread J. Bruce Fields
On Fri, Aug 10, 2018 at 08:19:26AM +1000, NeilBrown wrote: > On Thu, Aug 09 2018, J. Bruce Fields wrote: > > I think you could simplify the code a lot by maintaining the tree so > > that it always satisfies the condition that waiters are always strictly > > "weaker" than their descendents, so that

Re: [PATCH 5/5] fs/locks: create a tree of dependent requests.

2018-08-09 Thread NeilBrown
On Thu, Aug 09 2018, Jeff Layton wrote: > On Thu, 2018-08-09 at 12:04 +1000, NeilBrown wrote: >> When we find an existing lock which conflicts with a request, >> and the request wants to wait, we currently add the request >> to a list. When the lock is removed, the whole list is woken. >> This ca

Re: [PATCH 5/5] fs/locks: create a tree of dependent requests.

2018-08-09 Thread NeilBrown
On Thu, Aug 09 2018, J. Bruce Fields wrote: > On Thu, Aug 09, 2018 at 12:04:41PM +1000, NeilBrown wrote: >> When we find an existing lock which conflicts with a request, >> and the request wants to wait, we currently add the request >> to a list. When the lock is removed, the whole list is woken.

Re: [PATCH 5/5] fs/locks: create a tree of dependent requests.

2018-08-09 Thread J. Bruce Fields
On Thu, Aug 09, 2018 at 12:04:41PM +1000, NeilBrown wrote: > When we find an existing lock which conflicts with a request, > and the request wants to wait, we currently add the request > to a list. When the lock is removed, the whole list is woken. > This can cause the thundering-herd problem. > T

Re: [PATCH 5/5] fs/locks: create a tree of dependent requests.

2018-08-09 Thread Jeff Layton
On Thu, 2018-08-09 at 12:04 +1000, NeilBrown wrote: > When we find an existing lock which conflicts with a request, > and the request wants to wait, we currently add the request > to a list. When the lock is removed, the whole list is woken. > This can cause the thundering-herd problem. > To reduc

[PATCH 5/5] fs/locks: create a tree of dependent requests.

2018-08-08 Thread NeilBrown
When we find an existing lock which conflicts with a request, and the request wants to wait, we currently add the request to a list. When the lock is removed, the whole list is woken. This can cause the thundering-herd problem. To reduce the problem, we make use of the (new) fact that a pending re