Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
68e0dc55bd
!14 [sync] PR-13: add support for loongarch64
From: @openeuler-sync-bot 
Reviewed-by: @duyiwei7w 
Signed-off-by: @duyiwei7w
2023-08-11 06:23:39 +00:00
lvgenggeng
eddf673e6e add support for loongarch64
Signed-off-by: lvgenggeng <lvgenggeng@uniontech.com>
(cherry picked from commit 27d2e16a654ff505d3e27fbf16d347c383cebbba)
2023-08-02 09:28:07 +08:00
openeuler-ci-bot
9c3a94d32d
!12 Specification NestOS Project Component Description File
From: @duyiwei7w 
Reviewed-by: @fu-shanqing 
Signed-off-by: @fu-shanqing
2023-06-21 07:15:03 +00:00
duyiwei
8fab3ba5c5
Specification NestOS Project Component Description File
Signed-off-by: duyiwei <duyiwei@kylinos.cn>
2023-06-21 06:21:40 +00:00
openeuler-ci-bot
093f73d767
!10 【轻量级 PR】: [sync]手动同步master分支代码
From: @dingdingaaaaa 
Reviewed-by: @duyiwei7w 
Signed-off-by: @duyiwei7w
2022-12-09 07:04:05 +00:00
丁紫薇
d8fbb7d34d
[sync]手动同步master分支代码
Signed-off-by: 丁紫薇 <dingziwei@kylinos.cn>
2022-12-09 06:25:51 +00:00
openeuler-ci-bot
74837cd080
!7 【NestOS】22.03-LTS-SP1选型升级至1.16
From: @duyiwei7w 
Reviewed-by: @fu-shanqing 
Signed-off-by: @fu-shanqing
2022-11-14 05:54:38 +00:00
duyiwei
9ba7d74376 upgrade to 1.16 2022-11-11 09:07:01 +08:00
openeuler-ci-bot
4fae86ef9b
!4 [sync] PR-2: upgrade stalld to 1.15
From: @openeuler-sync-bot 
Reviewed-by: @duyiwei7w 
Signed-off-by: @duyiwei7w
2022-11-07 07:00:38 +00:00
duyiwei
c6fc15d4f8 upgrade to 1.15
(cherry picked from commit 08c1dd04cd8dec05aee74893875171efd92e6c43)
2022-06-07 16:17:37 +08:00
7 changed files with 87 additions and 18 deletions

View File

@ -0,0 +1,12 @@
diff -up ./src/stalld.h.old ./src/stalld.h
--- ./src/stalld.h.old 2023-07-20 10:28:58.525933347 +0800
+++ ./src/stalld.h 2023-07-20 10:29:25.674132507 +0800
@@ -83,7 +83,7 @@ struct cpu_info {
#elif __arm__
# define __NR_sched_setattr 380
# define __NR_sched_getattr 381
-#elif __aarch64__
+#elif __aarch64__ || __loongarch64
# define __NR_sched_setattr 274
# define __NR_sched_getattr 275
#elif __powerpc__

View File

@ -8,7 +8,7 @@ Software architecture description
#### Installation
1. xxxx
1. xxx
2. xxxx
3. xxxx

View File

@ -1,30 +1,73 @@
# stalld
#### 介绍
The stalld program is a mechanism to prevent the starvation of operating system threads in a Linux system.
The stalld program (which stands for 'stall daemon') is a
mechanism to prevent the starvation of operating system threads in a
Linux system. The premise is to start up on a housekeeping cpu (one
that is not used for real-application purposes) and to periodically
monitor the state of each thread in the system, looking for a thread
that has been on a run queue (i.e. ready to run) for a specifed length
of time without being run. This condition is usually hit when the
thread is on the same cpu as a high-priority cpu-intensive task and
therefore is being given no opportunity to run.
When a thread is judged to be starving, stalld changes
that thread to use the SCHED_DEADLINE policy and gives the thread a
small slice of time for that cpu (specified on the command line). The
thread then runs and when that timeslice is used, the thread is then
returned to its original scheduling policy and stalld then
continues to monitor thread states.
There is now an experimental option to boost using SCHED_FIFO. This
logic is used if the running kernel does not support the
SCHED_DEADLINE policy and may be forced by using the -F/--force_fifo
option.
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
Install stalld rpm package:
yum install stalld
#### 使用说明
Logging options
1. xxxx
2. xxxx
3. xxxx
-l/--log_only: only log information (do not boost) [false]
-v/--verbose: print info to the std output [false]
-k/--log_kmsg: print log to the kernel buffer [false]
-s/--log_syslog: print log to syslog [true]
Startup options
-c/--cpu: list of cpus to monitor for stalled threads [all cpus]
-f/--foreground: run in foreground [false but true when -v]
-P/--pidfile: write daemon pid to specified file [no pidfile]
Boosting options
-p/--boost_period: SCHED_DEADLINE period [ns] that the starving task will receive [1000000000]
-r/--boost_runtime: SCHED_DEADLINE runtime [ns] that the starving task will receive [20000]
-d/--boost_duration: how long [s] the starving task will run with SCHED_DEADLINE [3]
-F/--force_fifo: force using SCHED_FIFO for boosting
Monitoring options
-t/--starving_threshold: how long [s] the starving task will wait before being boosted [60]
-A/--aggressive_mode: dispatch one thread per run queue, even when there is no starving
threads on all CPU (uses more CPU/power). [false]
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
master分支使用最新的上游版本如果检测到上游有最新版本发布先形成issue后再提交对应PR更新流程如下。
1. 提交issue
2. Fork 本仓库
3. 新建 Feat_xxx 分支
4. 提交代码
5. 新建 Pull Request
#### 特技

Binary file not shown.

BIN
stalld-1.16.tar.bz2 Normal file

Binary file not shown.

View File

@ -1,11 +1,12 @@
Name: stalld
Version: 1.14.1
Release: 1
Version: 1.16
Release: 2
Summary: Daemon that finds starving tasks and gives them a temporary boost
License: GPLv2
URL: https://gitlab.com/rt-linux-tools/%{name}.git
URL: https://gitlab.com/rt-linux-tools/%{name}
Source0: https://gitlab.com/rt-linux-tools/%{name}/-/archive/v%{version}/%{name}-%{version}.tar.bz2
Patch0: 0001-Add-support-for-loongarch.patch
BuildRequires: glibc-devel
BuildRequires: gcc
@ -23,7 +24,7 @@ boost using the SCHED_DEADLINE policy. The default is to
allow 10 microseconds of runtime for 1 second of clock time.
%prep
%autosetup
%autosetup -p1
%build
%make_build CFLAGS="%{optflags} %{build_cflags} -DVERSION="\\\"%{version}\\\""" LDFLAGS="%{build_ldflags}"
@ -51,5 +52,14 @@ allow 10 microseconds of runtime for 1 second of clock time.
%systemd_postun_with_restart %{name}.service
%changelog
* Thu Jul 20 2023 lvgenggeng <lvgenggeng@uniontech.com> - 1.16-2
- add support for loongarch64
* Mon Nov 07 2022 duyiwei <duyiwei@kylinos.cn> - 1.16-1
- upgrade version to 1.16
* Tue Jun 7 2022 duyiwei <duyiwei@kylinos.cn> - 1.15-1
- upgrade to 1.15
* Mon Jan 24 2022 duyiwei <duyiwei@kylinos.cn> - 1.14.1-1
- Package init

4
stalld.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: gitlab
src_repo: rt-linux-tools/stalld
tag_prefix: "v"
separator: "."