From: Greg KH <gregkh@linuxfoundation.org>
To: Zheng Yejian <zhengyejian1@huawei.com>
Cc: lee.jones@linaro.org, stable@vger.kernel.org,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
cj.chengjian@huawei.com, judy.chenhui@huawei.com,
zhangjinhao2@huawei.com, nixiaoming@huawei.com
Subject: Re: [PATCH 4.4 1/3] futex: Change locking rules
Date: Tue, 9 Mar 2021 11:40:16 +0100 [thread overview]
Message-ID: <YEdQkLfQR9HRobUA@kroah.com> (raw)
In-Reply-To: <20210309030605.3295183-2-zhengyejian1@huawei.com>
On Tue, Mar 09, 2021 at 11:06:03AM +0800, Zheng Yejian wrote:
> From: Peter Zijlstra <peterz@infradead.org>
>
> Currently futex-pi relies on hb->lock to serialize everything. But hb->lock
> creates another set of problems, especially priority inversions on RT where
> hb->lock becomes a rt_mutex itself.
>
> The rt_mutex::wait_lock is the most obvious protection for keeping the
> futex user space value and the kernel internal pi_state in sync.
>
> Rework and document the locking so rt_mutex::wait_lock is held accross all
> operations which modify the user space value and the pi state.
>
> This allows to invoke rt_mutex_unlock() (including deboost) without holding
> hb->lock as a next step.
>
> Nothing yet relies on the new locking rules.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: juri.lelli@arm.com
> Cc: bigeasy@linutronix.de
> Cc: xlpang@redhat.com
> Cc: rostedt@goodmis.org
> Cc: mathieu.desnoyers@efficios.com
> Cc: jdesfossez@efficios.com
> Cc: dvhart@infradead.org
> Cc: bristot@redhat.com
> Link: http://lkml.kernel.org/r/20170322104151.751993333@infradead.org
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> [Lee: Back-ported in support of a previous futex back-port attempt]
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Zheng Yejian <zhengyejian1@huawei.com>
> ---
> kernel/futex.c | 138 +++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 112 insertions(+), 26 deletions(-)
What is the git commit id of this patch in Linus's tree?
thanks,
greg k-h
next prev parent reply other threads:[~2021-03-09 10:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 3:06 [PATCH 4.4 0/3] Backport patch series to update Futex from 4.9 Zheng Yejian
2021-03-09 3:06 ` [PATCH 4.4 1/3] futex: Change locking rules Zheng Yejian
2021-03-09 10:40 ` Greg KH [this message]
2021-03-09 3:06 ` [PATCH 4.4 2/3] futex: Cure exit race Zheng Yejian
2021-03-09 3:06 ` [PATCH 4.4 3/3] futex: fix dead code in attach_to_pi_owner() Zheng Yejian
2021-03-09 10:40 ` Greg KH
2021-03-09 18:14 ` Lee Jones
2021-03-10 12:00 ` Greg KH
2021-03-10 13:28 ` Lee Jones
2021-03-10 14:10 ` Greg KH
2021-03-11 1:39 ` Zhengyejian (Zetta)
2021-03-09 10:41 ` [PATCH 4.4 0/3] Backport patch series to update Futex from 4.9 Greg KH
2021-03-11 3:48 ` Zhengyejian (Zetta)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YEdQkLfQR9HRobUA@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=cj.chengjian@huawei.com \
--cc=judy.chenhui@huawei.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nixiaoming@huawei.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=zhangjinhao2@huawei.com \
--cc=zhengyejian1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.