From: Christian Eggers <ceggers@arri.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: kernel test robot <lkp@intel.com>, <kbuild-all@lists.01.org>,
"Hartmut Knaack" <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] iio: trigger: Don't use RT priority
Date: Mon, 14 Sep 2020 19:36:19 +0200 [thread overview]
Message-ID: <2593270.IIsAztQlyu@n95hx1g2> (raw)
In-Reply-To: <20200913104240.5c1b98ae@archlinux>
Hi Jonathan,
On Sunday, 13 September 2020, 11:43:05 CEST, Jonathan Cameron wrote:
> Looks like we can't do this unless we have a precusor patch to export that
> function for module use.
This patch compiles fine on my development kernel (5.4-rt). I guess that it
doesn't link on latest due to https://lwn.net/Articles/818388/
This raises the important question, which priority to use for the iio trigger.
According to the above link, this should better be chosen by user space than
by the kernel. Some systems may require a medium/high priority thread for data
acquisition, on other systems (like mine) this exposed a number of bugs in the
i2c bus driver which blocked the whole system.
Use space can change the priority of the iio trigger thread using the chrt
command. The question is, which priority should be used by default (RT / non
RT). If desired, I'll port the patch to latest.
What happened on my system (only if interested):
A normal priority user space process was using the i2c bus. Due to noise on
the bus and several bugs in the (noise related) error handling in i2c-imx, the
driver code was caught in a busy wait loop with a 500 ms timeout. This was bad
enough but after the iio trigger irq thread with a RT priority equal to
interrupt threads wanted to access the same i2c bus, the prio of the user
space process was boosted and busy waiting was done with IRQ priority. For the
rest of the 500 ms timeout, no further IRQ threads were serviced.
Best regards
Christian
prev parent reply other threads:[~2020-09-14 17:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 16:22 [PATCH] iio: trigger: Don't use RT priority Christian Eggers
[not found] ` <202009100951.s9xJuuod%lkp@intel.com>
2020-09-13 9:43 ` Jonathan Cameron
2020-09-14 17:36 ` Christian Eggers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2593270.IIsAztQlyu@n95hx1g2 \
--to=ceggers@arri.de \
--cc=jic23@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=pmeerw@pmeerw.net \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox