Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1728999
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: mutex_lock issues during poweroff |
| Date | 2017-09-08 16:50 +0200 |
| Message-ID | <unsLw-8nP-13@gated-at.bofh.it> (permalink) |
| References | <un3WN-8h1-7@gated-at.bofh.it> <un4pP-8qv-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi Peter,
Thanks for your answer.
On Thu, Sep 07, 2017 at 02:40:33PM +0200, Peter Zijlstra wrote:
> On Thu, Sep 07, 2017 at 02:16:19PM +0200, Maxime Ripard wrote:
> > One thing worth noting is that we couldn't reproduce the issue with a
> > 4.13. We can't bisect really easily due to the amount of patches that
> > we still have on 4.9 and have all been merged since, but it seems like
> > the bug was fixed (either on purpose or as a side effect), and was
> > never sent to stable. Looking at the history of kernel/locking/mutex.c
> > during that window didn't really show anything obvious though.
> >
> > If you have any ideas or spot something very wrong, I'd be happy to
> > hear about. Thanks!
>
> Well, we did a _complete_ rewrite of the mutex primitive in v4.10-rc1.
Ok.
What commit happened to be the rewrite? 9d659ae14b54 ("locking/mutex:
Add lock handoff to avoid starvation") ? We backported this one and
3ca0ff571b09 ("locking/mutex: Rework mutex::owner"), and still can
reproduce the issue. Is there any other?
> Part of the reason for that rewrite was fixing a starvation case, but
> for that you'd need to actually have contending usage, which you claim
> not to have.
Yeah, we're close to the opposite case :)
> Aside from that I really can't remember any specific issues with the old
> code (4.9 is such a long time ago). You could try to disable the
> optimistic spinning code, see if that helps.
>
> You did also say you were running on an ARM64, there were a few memory
> ordering fixes like for example commit:
>
> 50972fe78f24 ("locking/osq_lock: Fix osq_lock queue corruption")
We're running on ARM, not ARM64 (they still are separate architectures
under arch/, unlike x86), but I'll look into them too.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
mutex_lock issues during poweroff Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-07 14:20 +0200
Re: mutex_lock issues during poweroff Peter Zijlstra <peterz@infradead.org> - 2017-09-07 14:50 +0200
Re: mutex_lock issues during poweroff Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-08 16:50 +0200
Re: mutex_lock issues during poweroff Peter Zijlstra <peterz@infradead.org> - 2017-09-08 18:20 +0200
csiph-web