Re: [PATCH 0/3] locking/mutex: Add mutex_timed_lock() to solve potential deadlock problems

From: Peter Zijlstra
Date: Tue Feb 11 2020 - 07:31:55 EST


On Mon, Feb 10, 2020 at 03:46:48PM -0500, Waiman Long wrote:
> An alternative solution proposed by this patchset is to add a new
> mutex_timed_lock() call that allows an additional timeout argument. This
> function will return an error code if timeout happens. The use of this
> new API will prevent deadlock from happening while allowing the task
> to wait a sufficient period of time before giving up.

We've always rejected timed_lock implementation because, as akpm has
already expressed, their need is disgusting.