Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433513
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | clk: Per controller locks (prepare & enable) |
| Date | 2016-06-29 09:30 +0200 |
| Message-ID | <rPi6C-1fN-13@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Hi,
Problems:
1. Deadlocks on prepare lock in following scenario:
- prepare_enable(some external clock through i2c)
- i2c transfer
- prepare_enable(i2c lock in SoC)
- deadlock
See [1]. We implemented a workaround for this in few places like
10ff4c5239a1 ("i2c: exynos5: Fix possible ABBA deadlock by keeping I2C
clock prepared") and 34e81ad5f0b6 ("i2c: s3c2410: fix ABBA deadlock by
keeping clock prepared")
The goal would be to remove also this workaround.
2. The global prepare and enable locks are over-used. I didn't test the
congestion but intuition says that they could be improved.
Solution:
Make this locks per controller. This will directly solve problem #1
because these are different controllers. Still in-controller deadlock
could occur but we couldn't find a real case with it.
Question:
What do you think about it? I know that talk is cheap and code looks
better but before starting the work I would like to hear some
comments/opinions/ideas.
Best regards,
Krzysztof
[1]
http://www.krzk.eu/builders/boot-odroid-xu3-multi_v7/builds/34/steps/Boot%20odroid/logs/serial
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
clk: Per controller locks (prepare & enable) Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-29 09:30 +0200
Re: clk: Per controller locks (prepare & enable) Javier Martinez Canillas <javier@osg.samsung.com> - 2016-06-30 18:30 +0200
Re: clk: Per controller locks (prepare & enable) Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-04 17:20 +0200
Re: clk: Per controller locks (prepare & enable) Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-04 17:30 +0200
Re: clk: Per controller locks (prepare & enable) Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-05 08:40 +0200
Re: clk: Per controller locks (prepare & enable) Javier Martinez Canillas <javier@osg.samsung.com> - 2016-07-05 16:00 +0200
Re: clk: Per controller locks (prepare & enable) Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-07-07 14:10 +0200
Re: clk: Per controller locks (prepare & enable) Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-07 14:50 +0200
Re: clk: Per controller locks (prepare & enable) Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2016-07-07 18:10 +0200
Re: clk: Per controller locks (prepare & enable) Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-04 10:30 +0200
csiph-web