Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1561687
| From | Byungchul Park <byungchul.park@lge.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation |
| Date | 2017-01-18 13:00 +0100 |
| Message-ID | <t0X4e-3E5-29@gated-at.bofh.it> (permalink) |
| References | <sMlLb-7BJ-3@gated-at.bofh.it> <sMlLb-7BJ-7@gated-at.bofh.it> <t0See-D1-5@gated-at.bofh.it> <t0WhR-3hP-29@gated-at.bofh.it> <t0WhR-3hP-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jan 18, 2017 at 12:03:17PM +0100, Peter Zijlstra wrote: > On Wed, Jan 18, 2017 at 07:53:47PM +0900, Byungchul Park wrote: > > On Wed, Jan 18, 2017 at 02:42:30PM +0800, Boqun Feng wrote: > > > On Fri, Dec 09, 2016 at 02:12:11PM +0900, Byungchul Park wrote: > > > [...] > > > > +Example 1: > > > > + > > > > + CONTEXT X CONTEXT Y > > > > + --------- --------- > > > > + mutext_lock A > > > > + lock_page B > > > > + lock_page B > > > > + mutext_lock A /* DEADLOCK */ > > > > > > s/mutext_lock/mutex_lock > > > > Thank you. > > > > > > +Example 3: > > > > + > > > > + CONTEXT X CONTEXT Y > > > > + --------- --------- > > > > + mutex_lock A > > > > + mutex_lock A > > > > + mutex_unlock A > > > > + wait_for_complete B /* DEADLOCK */ > > > > > > I think this part better be: > > > > > > CONTEXT X CONTEXT Y > > > --------- --------- > > > mutex_lock A > > > mutex_lock A > > > wait_for_complete B /* DEADLOCK */ > > > mutex_unlock A > > > > > > , right? Because Y triggers DEADLOCK before X could run mutex_unlock(). > > > > There's no different between two examples. > > There is.. > > > No matter which one is chosen, mutex_lock A in CONTEXT X cannot be passed. > > But your version shows it does mutex_unlock() before CONTEXT Y does > wait_for_completion(). > > The thing about these diagrams is that both columns are assumed to have > the same timeline. X cannot acquire mutex A because Y already acquired it. In order words, all statements below mutex_lock A in X cannot run.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Boqun Feng <boqun.feng@gmail.com> - 2017-01-18 07:50 +0100
Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Peter Zijlstra <peterz@infradead.org> - 2017-01-18 12:10 +0100
Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Byungchul Park <byungchul.park@lge.com> - 2017-01-18 13:00 +0100
RE: [PATCH v4 15/15] lockdep: Crossrelease feature documentation "byungchul.park" <byungchul.park@lge.com> - 2017-01-18 13:20 +0100
Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Peter Zijlstra <peterz@infradead.org> - 2017-01-18 15:20 +0100
Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Byungchul Park <byungchul.park@lge.com> - 2017-01-19 03:20 +0100
Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Peter Zijlstra <peterz@infradead.org> - 2017-01-18 13:40 +0100
RE: [PATCH v4 15/15] lockdep: Crossrelease feature documentation "byungchul.park" <byungchul.park@lge.com> - 2017-01-18 14:00 +0100
Re: [PATCH v4 15/15] lockdep: Crossrelease feature documentation Byungchul Park <byungchul.park@lge.com> - 2017-01-18 12:20 +0100
csiph-web