* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early [not found] ` <56FD9080.4090203@cogentembedded.com> @ 2016-03-31 22:48 ` Wolfram Sang 2016-04-01 19:55 ` Sergei Shtylyov 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2016-03-31 22:48 UTC (permalink / raw) To: Sergei Shtylyov Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 1272 bytes --] On Fri, Apr 01, 2016 at 12:02:56AM +0300, Sergei Shtylyov wrote: > Hello. > > On 11/19/2015 06:56 PM, Wolfram Sang wrote: > > >From: Wolfram Sang <wsa+renesas@sang-engineering.com> > > > >If we don't clear START generation as soon as possible, it may cause > >another message to be generated, e.g. when receiving NACK in address > >phase. To keep the race window as small as possible, we clear it right > >at the beginning of the interrupt. We don't need any checks since we > >always want to stop START and STOP generation on the next occasion after > >we started it. > > > >This patch improves the situation but sadly does not completely fix it. > >It is still to be researched if we can do better given this HW design. > > > >Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > Thanks for a great work, Wolfram! > We need this patch in -stable kernels. The R-Car audio just doesn't work > without it... Really only this patch? IIRC my tests showed that if you don't remove the spinlocks (patch 4), the interrupt latency will already be too high again. In any case, you'd need to do some careful backporting to rip this out of the whole refactoring series. But maybe you did that already and have good experiences? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-03-31 22:48 ` [PATCH v3 09/11] i2c: rcar: revoke START request early Wolfram Sang @ 2016-04-01 19:55 ` Sergei Shtylyov 2016-04-01 20:14 ` Wolfram Sang 0 siblings, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2016-04-01 19:55 UTC (permalink / raw) To: Wolfram Sang Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org Hello. On 04/01/2016 01:48 AM, Wolfram Sang wrote: >>> From: Wolfram Sang <wsa+renesas@sang-engineering.com> >>> >>> If we don't clear START generation as soon as possible, it may cause >>> another message to be generated, e.g. when receiving NACK in address >>> phase. To keep the race window as small as possible, we clear it right >>> at the beginning of the interrupt. We don't need any checks since we >>> always want to stop START and STOP generation on the next occasion after >>> we started it. >>> >>> This patch improves the situation but sadly does not completely fix it. >>> It is still to be researched if we can do better given this HW design. >>> >>> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> >> >> Thanks for a great work, Wolfram! >> We need this patch in -stable kernels. The R-Car audio just doesn't work >> without it... > Really only this patch? Well, my "reverse" bisection pointed at it. :-) > IIRC my tests showed that if you don't remove > the spinlocks (patch 4), the interrupt latency will already be too high > again. Thank you for the valuable info! > In any case, you'd need to do some careful backporting to rip > this out of the whole refactoring series. Yes, I've already figured that. > But maybe you did that already > and have good experiences? Not yet, I will report back after more backporting/testing. MBR, Sergei ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-04-01 19:55 ` Sergei Shtylyov @ 2016-04-01 20:14 ` Wolfram Sang 2016-04-01 23:05 ` Sergei Shtylyov 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2016-04-01 20:14 UTC (permalink / raw) To: Sergei Shtylyov Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 265 bytes --] > >IIRC my tests showed that if you don't remove > >the spinlocks (patch 4), the interrupt latency will already be too high > >again. > > Thank you for the valuable info! Oh, and add patch 6 to it. The context switches are a major problem in this. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-04-01 20:14 ` Wolfram Sang @ 2016-04-01 23:05 ` Sergei Shtylyov 2016-04-02 7:27 ` Wolfram Sang 0 siblings, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2016-04-01 23:05 UTC (permalink / raw) To: Wolfram Sang Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org On 04/01/2016 11:14 PM, Wolfram Sang wrote: > >>> IIRC my tests showed that if you don't remove >>> the spinlocks (patch 4), the interrupt latency will already be too high >>> again. >> >> Thank you for the valuable info! > > Oh, and add patch 6 to it. The context switches are a major problem in > this. Thanks again! I ended up backporting all the patches up to #9. Not sure it'd be acceptable for the -stable kernels since there's a lot of refactors involved... MBR, Sergei ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-04-01 23:05 ` Sergei Shtylyov @ 2016-04-02 7:27 ` Wolfram Sang 2016-04-02 12:51 ` Sergei Shtylyov 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2016-04-02 7:27 UTC (permalink / raw) To: Sergei Shtylyov Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 200 bytes --] > Thanks again! I ended up backporting all the patches up to #9. Not sure > it'd be acceptable for the -stable kernels since there's a lot of refactors > involved... That's what I thought, too. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-04-02 7:27 ` Wolfram Sang @ 2016-04-02 12:51 ` Sergei Shtylyov 2016-04-03 8:25 ` Wolfram Sang 0 siblings, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2016-04-02 12:51 UTC (permalink / raw) To: Wolfram Sang Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org On 4/2/2016 10:27 AM, Wolfram Sang wrote: >> Thanks again! I ended up backporting all the patches up to #9. Not sure >> it'd be acceptable for the -stable kernels since there's a lot of refactors >> involved... > > That's what I thought, too. And I still don't feel good about the patch removing the spinlock -- I'm not sure it's SMP-safe... MBR, Sergei ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-04-02 12:51 ` Sergei Shtylyov @ 2016-04-03 8:25 ` Wolfram Sang 2016-04-03 13:35 ` Sergei Shtylyov 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2016-04-03 8:25 UTC (permalink / raw) To: Sergei Shtylyov Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 127 bytes --] > And I still don't feel good about the patch removing the spinlock -- I'm > not sure it's SMP-safe... In what scenario? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-04-03 8:25 ` Wolfram Sang @ 2016-04-03 13:35 ` Sergei Shtylyov 2016-04-03 13:47 ` Wolfram Sang 0 siblings, 1 reply; 9+ messages in thread From: Sergei Shtylyov @ 2016-04-03 13:35 UTC (permalink / raw) To: Wolfram Sang Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org On 04/03/2016 11:25 AM, Wolfram Sang wrote: >> And I still don't feel good about the patch removing the spinlock -- I'm >> not sure it's SMP-safe... > > In what scenario? I've reviewed the patches once again and it looked like they are safe. MBR, Sergei ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v3 09/11] i2c: rcar: revoke START request early 2016-04-03 13:35 ` Sergei Shtylyov @ 2016-04-03 13:47 ` Wolfram Sang 0 siblings, 0 replies; 9+ messages in thread From: Wolfram Sang @ 2016-04-03 13:47 UTC (permalink / raw) To: Sergei Shtylyov Cc: linux-i2c, linux-sh, Magnus Damm, Simon Horman, Laurent Pinchart, Geert Uytterhoeven, Kuninori Morimoto, Yoshihiro Shimoda, stable@vger.kernel.org, linux-renesas-soc@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 236 bytes --] > >> And I still don't feel good about the patch removing the spinlock -- I'm > >>not sure it's SMP-safe... > > > >In what scenario? > > I've reviewed the patches once again and it looked like they are safe. Thanks. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-04-03 13:47 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1447948611-2615-1-git-send-email-wsa@the-dreams.de>
[not found] ` <1447948611-2615-10-git-send-email-wsa@the-dreams.de>
[not found] ` <56FD9080.4090203@cogentembedded.com>
2016-03-31 22:48 ` [PATCH v3 09/11] i2c: rcar: revoke START request early Wolfram Sang
2016-04-01 19:55 ` Sergei Shtylyov
2016-04-01 20:14 ` Wolfram Sang
2016-04-01 23:05 ` Sergei Shtylyov
2016-04-02 7:27 ` Wolfram Sang
2016-04-02 12:51 ` Sergei Shtylyov
2016-04-03 8:25 ` Wolfram Sang
2016-04-03 13:35 ` Sergei Shtylyov
2016-04-03 13:47 ` Wolfram Sang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox