linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Better i2c access latencies in high load situations
@ 2009-09-16 11:17 Mika Kuoppala
       [not found] ` <1253099829-17655-1-git-send-email-mika.kuoppala-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Mika Kuoppala @ 2009-09-16 11:17 UTC (permalink / raw)
  To: khali-PUYAD+kWke1g9hUCZPvPmw
  Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA, Mika Kuoppala

Hi,

If low priority thread is holding the bus lock while more high
priority threads needs the same i2c bus, priority inversion occurs and
access latency can grow quite large. In my setup i have seen as high as
150ms access latencies in some workloads when the actual physical
transaction is finished in less than 5ms.

The following patch (in separate email) fixes the priority
inversion problem described above by converting the i2c bus lock mutex
to rt_mutex. rt_mutex uses priority inheritance: low priority thread
holding the mutex will get a kick if high priority thread is trying
to acquire the lock.

Thanks,
-- Mika

Mika Kuoppala (1):
  i2c: Prevent priority inversion on top of bus lock by converting it
    to rt_mutex

 drivers/i2c/i2c-core.c |   13 +++++++------
 include/linux/i2c.h    |    3 +--
 2 files changed, 8 insertions(+), 8 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-21 16:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 11:17 [PATCH 0/1] Better i2c access latencies in high load situations Mika Kuoppala
     [not found] ` <1253099829-17655-1-git-send-email-mika.kuoppala-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-09-16 11:17   ` [PATCH 1/1] i2c: Prevent priority inversion on top of bus lock Mika Kuoppala
     [not found]     ` <1253099829-17655-2-git-send-email-mika.kuoppala-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-09-16 11:51       ` Jean Delvare
     [not found]         ` <20090916135159.0d74f178-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-09-16 12:35           ` Mika Kuoppala
2009-09-16 20:32             ` Jean Delvare
2009-09-16 11:49   ` [PATCH 0/1] Better i2c access latencies in high load situations Jean Delvare
     [not found]     ` <20090916134944.4a329d62-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-09-16 12:08       ` Mika Kuoppala
2009-09-16 20:43         ` Jean Delvare
     [not found]           ` <20090916224328.47e349ab-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2009-09-21 13:14             ` Mika Kuoppala
2009-09-21 16:30               ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).