From: Li Hua <hucool.lihua@huawei.com>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Cc: <yuehaibing@huawei.com>, <weiyongjun1@huawei.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
<linux-kernel@vger.kernel.org>, <w.f@huawei.com>,
<hucool.lihua@huawei.com>, <cj.chengjian@huawei.com>,
<judy.chenhui@huawei.com>
Subject: [PATCH -next 0/1] Restart rt period timer when rt runtime exceeded
Date: Mon, 15 Nov 2021 01:46:27 +0000 [thread overview]
Message-ID: <20211115014628.15017-1-hucool.lihua@huawei.com> (raw)
When rt_runtime is modified from -1 to a valid control value, it may cause
the task to be throttled all the time. Then the task cannot be killed.
E.g:
The FIFO task A execution while(1):
#define _GNU_SOURCE
#include <sched.h>
#include <unistd.h>
int main(int argc,char *argv[])
{
struct sched_param param;
int priority = sched_get_priority_min(SCHED_FIFO);
param.sched_priority = priority;
sched_setscheduler(getpid(), SCHED_FIFO, ¶m);
while(1) {}
return 0;
}
Following the steps:
lihua@octopus ~ # echo -1 > /proc/sys/kernel/sched_rt_runtime_us
lihua@octopus ~ # /bin/rt_throttled &
lihua@octopus ~ # echo 950000 > /proc/sys/kernel/sched_rt_runtime_us
lihua@octopus ~ # ps aux | grep rt_throttled
root 7026 65.1 0.0 1848 180 ttyAMA0 R 01:27 0:26 /bin/rt_throttled
root 7068 0.0 0.0 4072 620 ttyAMA0 S+ 01:28 0:00 grep rt_throttled
lihua@octopus ~ # killall rt_throttled
lihua@octopus ~ # date
Thu Jan 1 01:28:30 UTC 1970
lihua@octopus ~ # date
Thu Jan 1 01:28:33 UTC 1970
lihua@octopus ~ # ps aux | grep rt_throttled
root 7026 41.0 0.0 1848 180 ttyAMA0 R 01:27 0:26 /bin/rt_throttled
root 7097 0.0 0.0 4072 576 ttyAMA0 S+ 01:28 0:00 grep rt_throttled
So the patch try to wake up the timer when rt runtime exceeded.
*** BLURB HERE ***
Li Hua (1):
sched/rt: Try to restart rt period timer when rt runtime exceeded
kernel/sched/rt.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
--
2.17.1
next reply other threads:[~2021-11-15 1:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 1:46 Li Hua [this message]
2021-11-15 1:46 ` [PATCH -next 1/1] sched/rt: Try to restart " Li Hua
2021-11-18 15:20 ` Peter Zijlstra
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=20211115014628.15017-1-hucool.lihua@huawei.com \
--to=hucool.lihua@huawei.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=cj.chengjian@huawei.com \
--cc=dietmar.eggemann@arm.com \
--cc=judy.chenhui@huawei.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=w.f@huawei.com \
--cc=weiyongjun1@huawei.com \
--cc=yuehaibing@huawei.com \
/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
all inboxes | Powered by JetHome®