diff --git a/README.en.md b/README.en.md index e738310dd2038c36aacca6d6735234078479a424..c6e20da2781548ab2510c6162a2307cb1baf14c3 100644 --- a/README.en.md +++ b/README.en.md @@ -1,22 +1,36 @@ # plugsched #### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} +The app of plugsched can live-update the scheduler subsystem of Anolis OS kernel. The kernel scheduler subsystem can be thermally upgraded by decoupling the kernel scheduler subsystem and installing it into the system as a plug-in through plugsched software. Developers can customize the scheduler for different scenarios and install it as a rpm package. #### Software Architecture -Software architecture description +See the https://gitee.com/anolis/plugsched for detail. #### Installation -1. xxxx -2. xxxx -3. xxxx +yum install plugsched --enablerepo=Plus #### Instructions -1. xxxx -2. xxxx -3. xxxx +This app requires kernel-devel and kernel-debuginfo, and needs the source package of kernel. If system has installed these two packages and downloaded the source package, then use the following command to use plugsched app: + +1. Extract source code of kernel from source rpm package: + plugsched-cli extract_src /path/kernel-[version].src.rpm /path/kernel +2. Initialize the development environment: + plugsched-cli init [kernel-version] /path/kernel /path/scheduler +3. Customized scheduler: + cd /path/scheduler + Modify the code of kernel/sched/mod +4. Generate the scheduler plug-in rpm package: + plugsched-cli build /path/scheduler +5. Location of the rpm package of the scheduler plug-in: + /usr/local/lib/plugsched/rpmbuild/RPMS/${arch} +6. Install the scheduler plug-in: + rpm -ivh scheduler-name-version.rpm +7. If there are multiple versions of the same plugin, you can use the following command to install rpm at the same time: + rpm -ivh scheduler-name-version.rpm --oldpackage +8. Remove the scheduler plug-in: + rpm -e plgusched-name-version #### Contribution @@ -25,12 +39,3 @@ Software architecture description 3. Commit your code 4. Create Pull Request - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md index cd99a1ea8a2016b68440c37f277f70dc4db6e6ff..8e26383a27a8971092b868723d48767711bf411a 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,36 @@ # plugsched #### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} +plugsched 软件,可以对 Anolis OS 内核的调度器子系统进行热升级,通过 plugsched 软件,可将内核调度器子系统解耦,以插件的形式安装到系统中,从而可以对内核调度器子系统进行热升级。开发人员可以针对不同的场景定制化调度器,并通过 rpm 的形式安装。 #### 软件架构 -软件架构说明 +详细请看:https://gitee.com/anolis/plugsched #### 安装教程 -1. xxxx -2. xxxx -3. xxxx +yum install plugsched --enablerepo=Plus #### 使用说明 -1. xxxx -2. xxxx -3. xxxx +该软件需要安装 kernel-devel 和 kernel-debuginfo,以及需要内核的 src rpm 包。假设系统中已经安装了 kernel-devel 和 kernel-debuginfo 包,而且下载了 src 包,则可以通过以下方式使用该软件: +1. 从 src 包中提取内核源码: + plugsched-cli extract_src /路径/kernel-[内核版本].src.rpm /路径/kernel +2. 初始化开发环境: + plugsched-cli init $(uname -r) /路径/kernel /路径/scheduler +3. 定制化调度器: + cd /路径/scheduler + 修改 kernel/sched/mod 目录下的调度器代码 +4. 生成调度器插件 rpm 包: + plugsched-cli build /路径/scheduler +5. 调度器插件 rpm 包的位置: + /usr/local/lib/plugsched/rpmbuild/RPMS/${arch} +6. 安装调度器插件 rpm 包: + rpm -ivh scheduler-name-version.rpm +7. 如果同一个插件有多个对应不同的内核版本,同时安装 rpm 时可以使用下面的命令: + rpm -ivh scheduler-name-version.rpm --oldpackage +8. 卸载调度器插件: + rpm -e scheduler-name-version #### 参与贡献 @@ -28,12 +39,3 @@ Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN 3. 提交代码 4. 新建 Pull Request - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/plugsched.spec b/plugsched.spec new file mode 100644 index 0000000000000000000000000000000000000000..c3db86fca8b0006caa49e7e9ff73ea42bd9d0ea0 --- /dev/null +++ b/plugsched.spec @@ -0,0 +1,50 @@ +# Copyright 2019-2022 Alibaba Group Holding Limited. +# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause + +%define anolis_release 1 +%define plugsched_version 1.3 + +%define _prefix /usr/local + +Name: plugsched +Version: %{plugsched_version} +Release: %{anolis_release}%{?dist} +Summary: The package of plugsched SDK of Anolis8 OS. +Packager: Erwei Deng + +Group: System Environment/Kernel +License: GPLv2 +URL: https://gitee.com/anolis/plugsched + +Source0: plugsched.tar.gz + +Requires: gcc, gcc-c++, make, gcc-plugin-devel, gcc-python-plugin +Requires: python3, python3-psutil, python3-pyyaml, python3-sh, python3-colorlog, python3-docopt +Requires: libyaml-devel, systemd, openssl, openssl-devel, platform-python-devel +Requires: glibc-static, zlib-static, libstdc++-static +Requires: elfutils-devel-static, elfutils-libelf-devel +Requires: bison, flex, rpm-build, rsync, bc, perl + +%description +The package of plugsched-sdk, see https://gitee.com/anolis/plugsched for detail. + +%prep +%autosetup -p1 + +%install +mkdir -p %{buildroot}/%{_prefix}/lib/plugsched +mkdir -p %{buildroot}/%{_prefix}/bin + +cp -r ./* %{buildroot}/%{_prefix}/lib/plugsched +ln -s %{_prefix}/lib/plugsched/cli.py %{buildroot}/%{_prefix}/bin/plugsched-cli + +%files +%dir %{_prefix}/lib/plugsched +%{_prefix}/lib/plugsched/* +%{_prefix}/bin/plugsched-cli + + +%changelog +* Tue Mar 23 2023 Erwei Deng - 1.3-1 +- Introduce plugsched-sdk package + diff --git a/plugsched.tar.gz b/plugsched.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..78da6df083945e36396c97338dad3f8de1663c3b Binary files /dev/null and b/plugsched.tar.gz differ