Commit 5946c431 authored by Committed by Jeff Layton
fs/locks: allow a lock request to block other requests.
Currently, a lock can block pending requests, but all pending requests are equal. If lots of pending requests are mutually exclusive, this means they will all be woken up and all but one will fail. This can hurt performance. So we will allow pending requests to block other requests. Only the first request will be woken, and it will wake the others. This patch doesn't implement this fully, but prepares the way. - It acknowledges that a request might be blocking other requests, and when the request is converted to a lock, those blocked requests are moved across. - When a request is requeued or discarded, all blocked requests are woken. - When deadlock-detection looks for the lock which blocks a given request, we follow the chain of ->fl_blocker all the way to the top. Tested-by: kernel test robot <email@example.com> Signed-off-by: NeilBrown <firstname.lastname@example.org> Reviewed-by: J. Bruce Fields <email@example.com> Signed-off-by: Jeff Layton <firstname.lastname@example.org>
Showing with 37 additions and 6 deletions