lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211115014628.15017-1-hucool.lihua@huawei.com>
Date:   Mon, 15 Nov 2021 01:46:27 +0000
From:   Li Hua <hucool.lihua@...wei.com>
To:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>
CC:     <yuehaibing@...wei.com>, <weiyongjun1@...wei.com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Daniel Bristot de Oliveira <bristot@...hat.com>,
        <linux-kernel@...r.kernel.org>, <w.f@...wei.com>,
        <hucool.lihua@...wei.com>, <cj.chengjian@...wei.com>,
        <judy.chenhui@...wei.com>
Subject: [PATCH -next 0/1] Restart rt period timer when rt runtime exceeded

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, &param);
		while(1) {}
		return 0;
	}

Following the steps:
lihua@...opus ~ # echo -1 > /proc/sys/kernel/sched_rt_runtime_us
lihua@...opus ~ # /bin/rt_throttled &
lihua@...opus ~ # echo 950000 > /proc/sys/kernel/sched_rt_runtime_us
lihua@...opus ~ # 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@...opus ~ # killall rt_throttled
lihua@...opus ~ # date
Thu Jan  1 01:28:30 UTC 1970
lihua@...opus ~ # date
Thu Jan  1 01:28:33 UTC 1970
lihua@...opus ~ # 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ