Code Monkey home page Code Monkey logo

fkoep / dynaccel-kernel-4.18.0 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seneca-cdot/dynaccel-kernel-4.18.0

0.0 0.0 0.0 201.96 MB

Dynamic Accelereted Linux kernel based on CentOS8s

License: MIT License

Shell 0.27% C++ 0.03% Python 0.11% Perl 0.10% C 98.17% Clojure 0.01% Assembly 1.05% Awk 0.01% UnrealScript 0.01% Makefile 0.22% XS 0.01% Yacc 0.01% Lex 0.01% M4 0.01% Roff 0.01% Gherkin 0.01% sed 0.01% SmPL 0.01% Raku 0.01%

dynaccel-kernel-4.18.0's Introduction

Dynamic Accelereted Linux kernel based on CentOS8s

Version: 4.18.0-394.el8.x86_64


Table of Contents


Overview

The Dynaccel kernel is a Linux kernel that can speed up the long-term testing process through accelerated kernel's flow of time. The ratio to which the time is accelerated can be changed dynamically through the kernel interface - /proc.

The idea originated from the repository.
A slides by the original authors (Toshiba) describing this work - PDF.

The kernel is based on the upstream CentOS8s kernel 4.18.0.

Kernel Installation

The Dynaccel kernel can be installed through a DNF update on a Centos8 Strean system:

  • Create dynaccel.repo file in the /etc/yum.repos.d/ folder
  • Add the following content to the created file:
[dynaccel]
name=dynaccel
baseurl=http://portugal.cdot.systems/dynaccel
gpgcheck=0
enabled=1

After the RPM repository is set up locally, a simple dnf update --refresh will install all the packages and update to the Dynaccel kernel.

Project Structure

  • kernel-sources - a folder containing the Dynaccel kernel source code. README.md
  • config-x86_64 - a reference of kernel config for x86_64 used for compilation.
  • dynaccel-patches.patch - a patch file containing the changes for the Dynaccel functionality.
  • kernel-4.18.0-394.el8.dynaccel.src.rpm - a SRC.RPM file containing sources for the RPM package build.

Kernel Usage

The speedup_ratio (acceleration) can be changed with sysctl.
Example: sysctl --write kernel.accel=50.
The current acceleration ratio can be accessed through cat /proc/sys/kernel/accel.

Source RPM Build

Below is the steps required to build the Dynaccel RPM packages:

  1. Install RPM Developer tools - sudo dnf -y install rpmdevtools or sudo yum -y install rpmdevtools.
  2. Set up the RPM build tree - rpmdev-setuptree and cd rpmbuild.

    RPMbuild tree
  3. Copy the *src.rpm to the SRPMS folder and install it - rpm -i kernel*src.rpm.
  4. Build the RPM:
    • With rpmbuild -bb --target=x86_64 SPECS/kernel.spec, if gcc-8 is present.
    • With mock utility - mock -r centos-stream-8-x86_64 *src.rpm, if gcc-8 is not present.
  5. Next steps would be to create and sign an RPM repository. Refer to the Wiki Page on how to do it.

Additionally, there is a good guide on the Fedora Wiki page on how to build a custom kernel RPM package.

Notes

  • The kernel.spec specifies EPOCH 1 for Dynaccel to take precedence over the latest kernel present in DNF.
  • Inner VM's installed under the Dynaccel kernel inherit the flow of time (accelerated as well).
    • However, an Inner VM's Watchdog that kernel should reset periodically does not function properly and goes off early. It causes kernel panics, making the system almost unusable.
      • The issue can temporarily be fixed by disabling the Watchdog with sysctl kernel.nmi_watchdog=0
      • To disable for subsequent boots add kernel.nmi_watchdog=0 line to /etc/sysctl.conf
  • The acceleration ratio can be adjusted in the range of 1 to 1000, but the 'stable' range is from 1 to 200.

Limitations

  • The kernel and SRC.RPM should be compiled under gcc-8 and g++-8, otherwise compilation will fail.
  • The Dynaccel patches were only applied and tested on kernel version 4.18.0.
  • It is not a hardware acceleration, so there isn't any performance boost, just accelerated time.

dynaccel-kernel-4.18.0's People

Contributors

deezzir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.