Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1663171 > unrolled thread
| Started by | Fabio Estevam <festevam@gmail.com> |
|---|---|
| First post | 2017-06-12 02:40 +0200 |
| Last post | 2017-06-12 14:10 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Fabio Estevam <festevam@gmail.com> - 2017-06-12 02:40 +0200
Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 09:10 +0200
Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Fabio Estevam <festevam@gmail.com> - 2017-06-12 14:00 +0200
Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 14:10 +0200
| From | Fabio Estevam <festevam@gmail.com> |
|---|---|
| Date | 2017-06-12 02:40 +0200 |
| Subject | Re: [RFC, PATCH] imx: serial: Take tty->files_lock opportunistically |
| Message-ID | <tRlyF-3tc-3@gated-at.bofh.it> |
Hi Greg,
On Sat, Jun 3, 2017 at 6:30 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Tue, May 30, 2017 at 03:44:27PM +0200, Peter Senna Tschudin wrote:
>> On Tue, May 30, 2017 at 02:42:13PM +0100, Alan Cox wrote:
>>
>> I sent a second patch recently:
>>
>> https://patchwork.kernel.org/patch/9725625/
>
> And it's already in linux-next so all should be good here.
linux-next is good, but mainline is not.
Actually we need 4dec2f119e86f9c9 ("imx-serial: RX DMA startup
latency") to be applied to 4.12-rc as well.
Thanks
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-06-12 09:10 +0200 |
| Message-ID | <tRrE6-7tD-9@gated-at.bofh.it> |
| In reply to | #1663171 |
On Sun, Jun 11, 2017 at 09:33:13PM -0300, Fabio Estevam wrote:
> Hi Greg,
>
> On Sat, Jun 3, 2017 at 6:30 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Tue, May 30, 2017 at 03:44:27PM +0200, Peter Senna Tschudin wrote:
> >> On Tue, May 30, 2017 at 02:42:13PM +0100, Alan Cox wrote:
> >>
> >> I sent a second patch recently:
> >>
> >> https://patchwork.kernel.org/patch/9725625/
> >
> > And it's already in linux-next so all should be good here.
>
> linux-next is good, but mainline is not.
>
> Actually we need 4dec2f119e86f9c9 ("imx-serial: RX DMA startup
> latency") to be applied to 4.12-rc as well.
Why? Can't it wait until 4.13-rc1?
thanks,
greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Fabio Estevam <festevam@gmail.com> |
|---|---|
| Date | 2017-06-12 14:00 +0200 |
| Message-ID | <tRwaK-1Dv-21@gated-at.bofh.it> |
| In reply to | #1663277 |
Hi Greg,
On Mon, Jun 12, 2017 at 3:46 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>> linux-next is good, but mainline is not.
>>
>> Actually we need 4dec2f119e86f9c9 ("imx-serial: RX DMA startup
>> latency") to be applied to 4.12-rc as well.
>
> Why? Can't it wait until 4.13-rc1?
Because without 4dec2f119e86f9c9 the imx serial driver behaves badly
in 4.12-rc.
Just tested 4.12-rc5 and there is scary verbose warning:
[ 11.714904] =====================================================
[ 11.721006] WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
[ 11.727628] 4.12.0-rc5 #413 Not tainted
[ 11.731470] -----------------------------------------------------
[ 11.737572] rawtest/219 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
[ 11.744018] (&(&tty->files_lock)->rlock){+.+...}, at: [<c04d83a0>]
imx_startup+0x2c4/0x510
[ 11.752403]
[ 11.752403] and this task is already holding:
[ 11.758241] (&port_lock_key){-.....}, at: [<c04d81e8>]
imx_startup+0x10c/0x510
[ 11.765571] which would create a new lock dependency:
[ 11.770626] (&port_lock_key){-.....} -> (&(&tty->files_lock)->rlock){+.+...}
[ 11.777791]
[ 11.777791] but this new dependency connects a HARDIRQ-irq-safe lock:
[ 11.785712] (&port_lock_key){-.....}
[ 11.785726]
....
Complete stack at: https://pastebin.com/a2gUTwZK
This problem is caused by commit 18a4208826dd0 ("imx-serial: Reduce RX
DMA startup latency when opening for reading").
linux-next has a fix for it: 4dec2f119e86f9c9 ("imx-serial: RX DMA
startup latency")
Applying 4dec2f119e86f9c9 ("imx-serial: RX DMA startup latency") into
4.12-rc5 makes the issue go away.
Thanks
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-06-12 14:10 +0200 |
| Message-ID | <tRwkq-1VP-15@gated-at.bofh.it> |
| In reply to | #1663448 |
On Mon, Jun 12, 2017 at 08:55:44AM -0300, Fabio Estevam wrote:
> Hi Greg,
>
> On Mon, Jun 12, 2017 at 3:46 AM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
>
> >> linux-next is good, but mainline is not.
> >>
> >> Actually we need 4dec2f119e86f9c9 ("imx-serial: RX DMA startup
> >> latency") to be applied to 4.12-rc as well.
> >
> > Why? Can't it wait until 4.13-rc1?
>
> Because without 4dec2f119e86f9c9 the imx serial driver behaves badly
> in 4.12-rc.
>
> Just tested 4.12-rc5 and there is scary verbose warning:
>
> [ 11.714904] =====================================================
> [ 11.721006] WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
> [ 11.727628] 4.12.0-rc5 #413 Not tainted
> [ 11.731470] -----------------------------------------------------
> [ 11.737572] rawtest/219 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
> [ 11.744018] (&(&tty->files_lock)->rlock){+.+...}, at: [<c04d83a0>]
> imx_startup+0x2c4/0x510
> [ 11.752403]
> [ 11.752403] and this task is already holding:
> [ 11.758241] (&port_lock_key){-.....}, at: [<c04d81e8>]
> imx_startup+0x10c/0x510
> [ 11.765571] which would create a new lock dependency:
> [ 11.770626] (&port_lock_key){-.....} -> (&(&tty->files_lock)->rlock){+.+...}
> [ 11.777791]
> [ 11.777791] but this new dependency connects a HARDIRQ-irq-safe lock:
> [ 11.785712] (&port_lock_key){-.....}
> [ 11.785726]
> ....
>
> Complete stack at: https://pastebin.com/a2gUTwZK
>
> This problem is caused by commit 18a4208826dd0 ("imx-serial: Reduce RX
> DMA startup latency when opening for reading").
>
> linux-next has a fix for it: 4dec2f119e86f9c9 ("imx-serial: RX DMA
> startup latency")
>
> Applying 4dec2f119e86f9c9 ("imx-serial: RX DMA startup latency") into
> 4.12-rc5 makes the issue go away.
Ok, if I end up with some more tty/serial fixes for 4.12-final, I'll
consider queueing this one up as well, thanks.
greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web