Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1377274 > unrolled thread
| Started by | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| First post | 2016-04-12 23:20 +0200 |
| Last post | 2016-04-16 06:30 +0200 |
| Articles | 2 — 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: [PATCH v3] i2c: mediatek: i2c multi transfer optimization Wolfram Sang <wsa@the-dreams.de> - 2016-04-12 23:20 +0200
Re: [PATCH v3] i2c: mediatek: i2c multi transfer optimization liguo zhang <liguo.zhang@mediatek.com> - 2016-04-16 06:30 +0200
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2016-04-12 23:20 +0200 |
| Subject | Re: [PATCH v3] i2c: mediatek: i2c multi transfer optimization |
| Message-ID | <rndT7-5HZ-71@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi, thanks for the submission! On Tue, Mar 08, 2016 at 02:23:51AM +0800, Liguo Zhang wrote: > Signal complete() in the i2c irq handler after one transfer done, > and then wait_for_completion_timeout() will return, this procedure > may cost much time, so only signal complete() when the entire > transaction has been completed, it will reduce the entire transaction > time. > > Signed-off-by: Liguo Zhang <liguo.zhang@mediatek.com> I wonder. You have less context switches, yes. On the other hand, you likely have bigger interrupt latency because you do more stuff in the interrupt handler. Is it really a gain in the end? Regards, Wolfram
[toc] | [next] | [standalone]
| From | liguo zhang <liguo.zhang@mediatek.com> |
|---|---|
| Date | 2016-04-16 06:30 +0200 |
| Message-ID | <roq1P-6bE-1@gated-at.bofh.it> |
| In reply to | #1377274 |
On Tue, 2016-04-12 at 23:13 +0200, Wolfram Sang wrote: > Hi, > > thanks for the submission! > > On Tue, Mar 08, 2016 at 02:23:51AM +0800, Liguo Zhang wrote: > > Signal complete() in the i2c irq handler after one transfer done, > > and then wait_for_completion_timeout() will return, this procedure > > may cost much time, so only signal complete() when the entire > > transaction has been completed, it will reduce the entire transaction > > time. > > > > Signed-off-by: Liguo Zhang <liguo.zhang@mediatek.com> > > I wonder. You have less context switches, yes. On the other hand, you > likely have bigger interrupt latency because you do more stuff in the > interrupt handler. Is it really a gain in the end? > When doing i2c multi transfer(first i2c write then i2c read, and not using the MTK i2c WRRD mode) repeatedly in our stress test, we found the procedure(complete()-->wait_for_completion_timeout()) may cost much time, and it will affect the following i2c transfer. In our stress test, It will affect the i2c read transfer, the value from the i2c read is not right. So when doing i2c multi transfer, the first is i2c write,then i2c read, we will use the MTK i2c WRRD mode to do i2c multi transfer in the previous patch. But If i2c multi transfer has at least three transfer, we can't use the MTK i2c WRRD mode, this patch may be important. Now we have not already seen the i2c multi transfer scenario, which has at least three transfer. > Regards, > > Wolfram >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web