This commit is contained in:
Gregory Burd 2024-04-29 09:35:35 -04:00
commit 482e719e87
15 changed files with 8220 additions and 0 deletions

View file

@ -0,0 +1,393 @@
<!-- saved from url=(0067)https://web.archive.org/web/20060528133239/http://kernel.jakem.net/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><script src="./Jake Moilanen&#39;s Linux Kernel Homepage_files/analytics.js" type="text/javascript"></script>
<script type="text/javascript">window.addEventListener('DOMContentLoaded',function(){var v=archive_analytics.values;v.service='wb';v.server_name='wwwb-app220.us.archive.org';v.server_ms=485;archive_analytics.send_pageview({});});</script>
<script type="text/javascript" src="./Jake Moilanen&#39;s Linux Kernel Homepage_files/bundle-playback.js" charset="utf-8"></script>
<script type="text/javascript" src="./Jake Moilanen&#39;s Linux Kernel Homepage_files/wombat.js" charset="utf-8"></script>
<script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script>
<script type="text/javascript" src="./Jake Moilanen&#39;s Linux Kernel Homepage_files/ruffle.js"></script>
<script type="text/javascript">
__wm.init("https://web.archive.org/web");
__wm.wombat("http://kernel.jakem.net:80/","20060528133239","https://web.archive.org/","web","https://web-static.archive.org/_static/",
"1148823159");
</script>
<link rel="stylesheet" type="text/css" href="./Jake Moilanen&#39;s Linux Kernel Homepage_files/banner-styles.css">
<link rel="stylesheet" type="text/css" href="./Jake Moilanen&#39;s Linux Kernel Homepage_files/iconochive.css">
<!-- End Wayback Rewrite JS Include -->
<title>Jake Moilanen's Linux Kernel Homepage</title>
<style>
<!--
A:link {text-decoration: none; color:#00000}
A:visited {text-decoration: none; color: #00000}
A:active {text-decoration: none; color:#00000}
A:hover {text-decoration: underline; color: white}
-->
</style>
<link rel="stylesheet" type="text/css" href="./Jake Moilanen&#39;s Linux Kernel Homepage_files/default.css">
</head> <!--bgcolor="#6c6a88"-->
<body text="#333333" link="#5D7790" vlink="#5D7790" alink="#5D7790" data-new-gr-c-s-check-loaded="14.1169.0" data-gr-ext-installed=""><!-- BEGIN WAYBACK TOOLBAR INSERT -->
<script>__wm.rw(0);</script>
<div id="wm-ipp-base" lang="en" style="display: block; direction: ltr; height: 1px;"><template shadowrootmode="closed"><div id="wm-ipp" style="position:fixed;left:0;top:0;right:0;" class="">
<div id="donato" style="position:relative;width:100%;">
<div id="donato-base">
<iframe id="donato-if" src="https://archive.org/includes/donate.php?as_page=1&amp;platform=wb&amp;referer=https%3A//web.archive.org/web/20060528133239/http%3A//kernel.jakem.net/" scrolling="no" frameborder="0" style="width:100%; height:100%">
</iframe>
</div>
</div><div id="wm-ipp-inside" style="display: none;">
<div id="wm-toolbar" style="position:relative;display:flex;flex-flow:row nowrap;justify-content:space-between;">
<div id="wm-logo" style="/*width:110px;*/padding-top:12px;">
<a href="https://web.archive.org/web/" title="Wayback Machine home page"><img src="https://web-static.archive.org/_static/images/toolbar/wayback-toolbar-logo-200.png" srcset="https://web-static.archive.org/_static/images/toolbar/wayback-toolbar-logo-100.png, https://web-static.archive.org/_static/images/toolbar/wayback-toolbar-logo-150.png 1.5x, https://web-static.archive.org/_static/images/toolbar/wayback-toolbar-logo-200.png 2x" alt="Wayback Machine" style="width:100px" border="0"></a>
</div>
<div class="c" style="display:flex;flex-flow:column nowrap;justify-content:space-between;flex:1;">
<form class="u" style="display:flex;flex-direction:row;flex-wrap:nowrap;" target="_top" method="get" action="https://web.archive.org/web/submit" name="wmtb" id="wmtb"><input type="text" name="url" id="wmtbURL" value="http://kernel.jakem.net/" onfocus="this.focus();this.select();" style="flex:1;" autocomplete="off"><input type="hidden" name="type" value="replay"><input type="hidden" name="date" value="20060528133239"><input type="submit" value="Go">
</form>
<div style="display:flex;flex-flow:row nowrap;align-items:flex-end;">
<div class="s" id="wm-nav-captures" style="flex:1;"><a class="t" href="https://web.archive.org/web/*/http://kernel.jakem.net/" title="See a list of every capture for this URL">25 captures</a><div class="r" title="Timespan for captures of this URL">9 Dec 2004 - 20 Dec 2011</div></div>
<div class="k">
<a href="https://web.archive.org/web/20241101000000/http://kernel.jakem.net/" id="wm-graph-anchor">
<div id="wm-ipp-sparkline" title="Explore captures for this URL" style="position: relative">
<canvas id="wm-sparkline-canvas" width="725" height="27" border="0"></canvas>
<div class="yt" style="display: none; width: 25px; height: 27px; left: 700px;"></div><div class="mt" style="display: none; width: 2px; height: 27px; left: 721px;"></div></div>
</a>
</div>
</div>
</div>
<div class="n">
<table>
<tbody>
<!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR -->
<tr class="m">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20051023115820/http://kernel.jakem.net:80/" title="23 Oct 2005"><strong>Oct</strong></a></td>
<td class="c" id="displayMonthEl" title="You are here: 13:32:39 May 28, 2006">May</td>
<td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20060826214450/http://kernel.jakem.net:80/" title="26 Aug 2006"><strong>Aug</strong></a></td>
</tr>
<!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR -->
<tr class="d">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20051023115820/http://kernel.jakem.net:80/" title="11:58:20 Oct 23, 2005"><img src="https://web-static.archive.org/_static/images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0"></a></td>
<td class="c" id="displayDayEl" style="width:34px;font-size:22px;white-space:nowrap;" title="You are here: 13:32:39 May 28, 2006">28</td>
<td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20060618092128/http://kernel.jakem.net:80/" title="09:21:28 Jun 18, 2006"><img src="https://web-static.archive.org/_static/images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"></a></td>
</tr>
<!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR -->
<tr class="y">
<td class="b" nowrap="nowrap"><a href="https://web.archive.org/web/20050403080757/http://kernel.jakem.net:80/" title="03 Apr 2005"><strong>2005</strong></a></td>
<td class="c" id="displayYearEl" title="You are here: 13:32:39 May 28, 2006">2006</td>
<td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20071102052834/http://kernel.jakem.net:80/" title="02 Nov 2007"><strong>2007</strong></a></td>
</tr>
</tbody>
</table>
</div>
<div class="r" style="display:flex;flex-flow:column nowrap;align-items:flex-end;justify-content:space-between;">
<div id="wm-btns" style="text-align:right;height:23px;">
<span class="xxs">
<div id="wm-save-snapshot-success">success</div>
<div id="wm-save-snapshot-fail">fail</div>
<a id="wm-save-snapshot-open" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#" title="Share via My Web Archive" style="display: none;">
<span class="iconochive-web"></span>
</a>
<a href="https://archive.org/account/login.php" title="Sign In" id="wm-sign-in" style="display: inline-block;">
<span class="iconochive-person"></span>
</a>
<span id="wm-save-snapshot-in-progress" class="iconochive-web" style="display: none;"></span>
</span>
<a class="xxs" href="http://faq.web.archive.org/" title="Get some help using the Wayback Machine" style="top:-6px;"><span class="iconochive-question" style="color:rgb(87,186,244);font-size:160%;"></span></a>
<a id="wm-tb-close" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#close" style="top:-2px;" title="Close the toolbar"><span class="iconochive-remove-circle" style="color:#888888;font-size:240%;"></span></a>
</div>
<div id="wm-share" class="xxs">
<a href="https://web.archive.org/web/20060528133239/http://web.archive.org/screenshot/http://kernel.jakem.net/" id="wm-screenshot" title="screenshot" style="visibility: hidden;">
<span class="wm-icon-screen-shot"></span>
</a>
<a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#" id="wm-video" title="video">
<span class="iconochive-movies"></span>
</a>
<a id="wm-share-facebook" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#" data-url="https://web.archive.org/web/20060528133239/http://kernel.jakem.net:80/" title="Share on Facebook" style="margin-right:5px;" target="_blank"><span class="iconochive-facebook" style="color:#3b5998;font-size:160%;"></span></a>
<a id="wm-share-twitter" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#" data-url="https://web.archive.org/web/20060528133239/http://kernel.jakem.net:80/" title="Share on Twitter" style="margin-right:5px;" target="_blank"><span class="iconochive-twitter" style="color:#1dcaff;font-size:160%;"></span></a>
</div>
<div style="padding-right:2px;text-align:right;white-space:nowrap;">
<a id="wm-expand" class="wm-btn wm-closed" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#expand" onclick="__wm.ex(event);return false;"><span id="wm-expand-icon" class="iconochive-down-solid"></span> <span class="xxs" style="font-size:80%;">About this capture</span></a>
</div>
</div>
</div>
<div id="wm-capinfo" style="border-top:1px solid #777;display:none; overflow: hidden">
<div id="wm-capinfo-notice" source="api"></div>
<div id="wm-capinfo-collected-by">
<div style="background-color:#666;color:#fff;font-weight:bold;text-align:center">COLLECTED BY</div>
<div style="padding:3px;position:relative" id="wm-collected-by-content">
<div style="display:inline-block;vertical-align:top;width:50%;">
<span class="c-logo" style="background-image:url(https://archive.org/services/img/alexacrawls);"></span>
Organization: <a style="color:#33f;" href="https://archive.org/details/alexacrawls" target="_new"><span class="wm-title">Alexa Crawls</span></a>
<div style="max-height:75px;overflow:hidden;position:relative;">
<div style="position:absolute;top:0;left:0;width:100%;height:75px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,255) 100%);"></div>
Starting in 1996, <a href="http://www.alexa.com/">Alexa Internet</a> has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to the <a href="http://web.archive.org/">Wayback Machine</a> after an embargo period.
</div>
</div>
<div style="display:inline-block;vertical-align:top;width:49%;">
<span class="c-logo" style="background-image:url(https://archive.org/services/img/alexa_ei)"></span>
<div>Collection: <a style="color:#33f;" href="https://archive.org/details/alexa_ei" target="_new"><span class="wm-title">Alexa Crawl EI</span></a></div>
<div style="max-height:75px;overflow:hidden;position:relative;">
<div style="position:absolute;top:0;left:0;width:100%;height:75px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,255) 100%);"></div>
Crawl EI from Alexa Internet. This data is currently not publicly accessible.
</div>
</div>
</div>
</div>
<div id="wm-capinfo-timestamps">
<div style="background-color:#666;color:#fff;font-weight:bold;text-align:center" title="Timestamps for the elements of this page">TIMESTAMPS</div>
<div>
<div id="wm-capresources" style="margin:0 5px 5px 5px;max-height:250px;overflow-y:scroll !important"></div>
<div id="wm-capresources-loading" style="text-align:left;margin:0 20px 5px 5px;display:none"><img src="https://web-static.archive.org/_static/images/loading.gif" alt="loading"></div>
</div>
</div>
</div></div></div><link rel="stylesheet" type="text/css" href="./Jake Moilanen&#39;s Linux Kernel Homepage_files/banner-styles.css"><link rel="stylesheet" type="text/css" href="./Jake Moilanen&#39;s Linux Kernel Homepage_files/iconochive.css"><div class="wb-autocomplete-suggestions "></div></template>
</div><div id="wm-ipp-print">The Wayback Machine - https://web.archive.org/web/20060528133239/http://kernel.jakem.net:80/</div>
<script type="text/javascript">//<![CDATA[
__wm.bt(725,27,25,2,"web","http://kernel.jakem.net/","20060528133239",1996,"https://web-static.archive.org/_static/",["https://web-static.archive.org/_static/css/banner-styles.css?v=S1zqJCYt","https://web-static.archive.org/_static/css/iconochive.css?v=qtvMKcIJ"], false);
__wm.rw(1);
//]]></script>
<!-- END WAYBACK TOOLBAR INSERT -->
<center>
<table width="80%" height="100%" cellspacing="0" cellpadding="0">
<tbody><tr>
<td style="border-left: 1px solid #b1b1b1; border-top: 1px solid
#b1b1b1; border-bottom: 1px solid #b1b1b1; border-right: 1px
solid #b1b1b1" width="100%" colspan="2">
<h5 style="margin-left: 7; margin-top: 3; margin-bottom:
3; margin-right: 7"><font face="Arial" color="#ece9d8">Jake Moilanen's Linux Kernel Homepage
</font></h5>
</td>
</tr>
<tr>
<td height="30">
</td>
</tr>
<tr>
<td width="20%" height="100%" valign="top" align="center" style="border-left: 1px solid #b1b1b1; border-top: 1px solid
#b1b1b1; border-bottom: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1">
<table width="100%" border="0" height="100%" cellspacing="0" cellpadding="0">
<tbody><tr height="30">
<td class="menu_header" valign="center" align="center">
<a class="nouline" href="https://web.archive.org/web/20060528133239/http://jakem.net/blog">Life story</a>
</td>
</tr>
<tr height="70">
<td class="menu_section" valign="center">
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://jakem.net/blog">Blog</a><br>
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://community.webshots.com/user/moilanencj">Pictures</a><br>
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://jakem.net/websightings.shtml">Web Sightings</a><br>
</td>
</tr>
<tr height="30">
<td class="menu_header" valign="center" align="center">
<a class="nouline" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/">Computer</a>
</td>
</tr>
<tr height="70">
<td class="menu_section" valign="center">
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches">Patches</a><br>
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/">Projects</a><br>
</td>
</tr>
<tr height="30">
<td class="menu_header" valign="center" align="center">
<a class="nouline" href="https://web.archive.org/web/20060528133239/http://jakem.net/archive/college-homepage">Archive</a>
</td>
</tr>
<tr height="70">
<td class="menu_section" valign="center">
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://terminallife.jakem.net/">TerminalLife</a><br>
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://jakem.net/archive/college-homepage">College homepage</a><br>
</td>
</tr>
<tr height="30">
<td class="menu_header" valign="center" align="center">
<a class="nouline" href="https://web.archive.org/web/20060528133239/mailto:moilanen@REMOVECAPLETTERSjakem.net">Contact</a>
</td>
</tr>
<tr height="70">
<td class="menu_section" valign="center">
&nbsp;<a href="https://web.archive.org/web/20060528133239/http://jakem.net/download/Moilanen.pdf">Resume</a><br>
</td>
</tr>
<tr>
<td></td>
</tr>
</tbody></table>
</td>
<td width="80%" valign="top" align="center">
<table width="100%" border="0" height="100%" cellspacing="0" cellpadding="0">
<tbody><tr><td bgcolor="#777777" style="border-top: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1">&nbsp;&nbsp;</td>
<td colspan="1" valign="top" align="left" width="100%" height="70%" bgcolor="#777777" style="border-top: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1; border-right: 1px
solid #b1b1b1">
<!--
------------------------------------------------------------------------------------------------------------------------------
-->
<br>
<b>Genetic Library</b>
<blockquote>
The genetic library patch uses a genetic algorithm to tweak the tunables of various schedulers.<br>
As workloads change, the algorithm adjusts the tunables to optimize for performance.
The patch is very useful for specific workloads that are difficult to tune.
<br><br>
<li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#goal">Goal</a>
</li><li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#current-plugins">Current Plugins</a>
</li><li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#future-work">Future Work</a>
</li><li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#performance">Performance</a>
</li><li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#issues">Issues</a>
</li><li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#why-kernel">Why in kernel</a>
</li><li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#config-locations">Config Locations</a>
</li><li><a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/#patches">Patches</a>
<br><br>
<a name="goal"></a>
<b>Goal</b>
<blockquote>
Tuning for workloads is tough, espcially when there are varying workloads. The goal of this patch
is that sys-admins and users never have to explicitly tune their system, but have it done autonomically.
</blockquote>
<a name="current-plugins"></a>
<b>Currently I have plugins for:</b>
<blockquote>
<li> Zaphod CPU scheduler
</li><li> Anticipatory IO scheduler
</li><li> Deadline IO scheduler (currently broken)
</li></blockquote>
<a name="future-work"></a><b>Possible Future work:</b>
<blockquote>
<li> Incorporate pre-defined "sets of tunables". The child's genes would be a set known good of tunable
configurations, and the algorithm would just use which ever set performed the best.
</li><li> Save optimal tunings for workloads. Recognize changing workloads and switch to optimal settings.
</li><li> Make sure genes can be negative.
</li><li> Investigate using on packet scheduling.
</li><li> Investigate using on SMT scheduler.
</li><li> Investigate using Lamarckian Evolution on discrete parameters.
</li></blockquote>
<a name="performance"></a><b>Performance</b>
<br>
<blockquote>
On FFSB there was an average
improvement of 9%. On some
workloads, I saw a 23%
improvement. The only
degradation was in sequential
read, I saw a less than a 1%.
Which was expected since AS is
tuned for sequential read.
I'll put my formal paper up
soon w/ pretty graphics.
<br><br>
On SpecJBB I've seen about a 1-5% gain on the Zaphod Scheduler plugin.
<br><br>
On UnixBench I saw about a 2% gain for the file read/write/copy on the Anticipatory Scheduler.
<br><br>
I've had no luck getting a performance improvement w/ the Deadline scheduler plugin.
</blockquote>
<a name="issues"></a><b>Issues</b>
<br>
<blockquote>
Many times there is no IO while a child is running. The child that does not get IO is inadvertenly penalized.<br>
</blockquote>
<br>
<a name="why-kernel"></a><b>Why have it in the kernel?</b>
<br>
<blockquote>
<li>Easier to hook
</li><li>Low latency and not have to go inbetween user/kernel (very important for short life cycle)
</li><li>Flexibility for the components to use the library
</li><li>Might have inconsistent results if was application, because it would be dependent on being scheduled, but itself was
in charge of modifying the scheduler. It may set the sched very wrong and never be scheduled.
</li></blockquote>
<br>
<a name="config-locations"></a><b>Config locations</b>
<blockquote>
<li>genetic-library - &nbsp;"Library Routines" -&gt; "Genetic Library"
</li><li>genetic-as-sched - "Device Drivers" -&gt; "Block IO" -&gt; "Genetic Anticipatory IO Scheduler"
</li><li>genetic-zaphod-cpu-sched - "Library Routines" -&gt; "Genetic Library - Zaphod CPU Scheduler"
</li></blockquote>
<a name="patches" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.12/2.6.12-gl2">Patches in development</a>
<br><br>
<a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.12">2.6.12 Patches</a><br><br>
<br><br>
<a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.11">2.6.11 Patches</a><br><br>
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.11/2.6.11-gl1/genetic-lib-2.6.11-gl1.patch">genetic-lib</a>
- Base genetic library patch
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.11/2.6.11-gl1/genetic-zaphod-cpu-sched-2.6.11-gl1.patch">genetic-zaphod-cpu-sched</a>
- Zaphod CPU scheduler plugin.
Depends on <a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.11/2.6.11-gl1/zaphod-v6.2.patch">zaphod
6.2 patch</a>
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.11/2.6.11-gl1/genetic-io-sched-2.6.11-gl1.patch">genetic-io-sched</a>
- Base plugin for IO schedulers
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.11/2.6.11-gl1/genetic-as-sched-2.6.11-gl1.patch">genetic-as-sched</a>
- Anticipatory scheduler plugin. Depends on genetic-io-sched.
<br><br>
<a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.10">2.6.10 Patches</a><br><br>
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.10/2.6.10-gl3/genetic-lib-2.6.10-gl3.patch">genetic-lib</a>
- Base genetic library patch
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.10/2.6.10-gl3/genetic-zaphod-cpu-sched-2.6.10-gl3.patch">genetic-zaphod-cpu-sched</a>
- Zaphod CPU scheduler plugin.
Depends on <a class="blue" href="https://web.archive.org/web/20060528133239/http://sourceforge.net/project/showfiles.php?group_id=112404&amp;package_id=125286&amp;release_id=273135">zaphod
6.2 patch</a>
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.10/2.6.10-gl3/genetic-io-sched-2.6.10-gl3.patch">genetic-io-sched</a>
- Base plugin for IO schedulers
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.10/2.6.10-gl3/genetic-as-sched-2.6.10-gl3.patch">genetic-as-sched</a>
- Anticipatory scheduler plugin. Depends on genetic-io-sched.
<br><br>
<a href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.9">2.6.9 Patches</a><br><br>
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.9/genetic-lib-2.6.9.patch">genetic-lib</a>
- Base genetic library patch
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.9/genetic-zaphod-cpu-sched-2.6.9.patch">genetic-zaphod-cpu-sched</a>
- Zaphod CPU scheduler plugin. Depends on <a class="blue" href="https://web.archive.org/web/20060528133239/http://sourceforge.net/project/showfiles.php?group_id=112404&amp;package_id=125286&amp;release_id=273135">zaphod patch</a>
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.9/genetic-io-sched-2.6.9.patch">genetic-io-sched</a>
- Base plugin for IO schedulers
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.9/genetic-as-sched-2.6.9.patch">genetic-as-sched</a>
- Anticipatory scheduler plugin. Depends on genetic-io-sched.
</li><li><a class="blue" href="https://web.archive.org/web/20060528133239/http://kernel.jakem.net/patches/genetic/2.6.9/genetic-deadline-sched-2.6.9.patch">genetic-deadline-sched</a>
- Deadline scheduler plugin. Depends on genetic-io-sched. (currently broken)
</li></blockquote>
<br>
<!--
------------------------------------------------------------------------------------------------------------------------------
-->
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</center>
</body><grammarly-desktop-integration data-grammarly-shadow-root="true"><template shadowrootmode="open"><style>
div.grammarly-desktop-integration {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select:none;
user-select:none;
}
div.grammarly-desktop-integration:before {
content: attr(data-content);
}
</style><div aria-label="grammarly-integration" role="group" tabindex="-1" class="grammarly-desktop-integration" data-content="{&quot;mode&quot;:&quot;full&quot;,&quot;isActive&quot;:true,&quot;isUserDisabled&quot;:false}"></div></template></grammarly-desktop-integration></html>

View file

@ -0,0 +1,474 @@
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3.0
/* eslint-disable no-var, semi, prefer-arrow-callback, prefer-template */
/**
* Collection of methods for sending analytics events to Archive.org's analytics server.
*
* These events are used for internal stats and sent (in anonymized form) to Google Analytics.
*
* @see analytics.md
*
* @type {Object}
*/
window.archive_analytics = (function defineArchiveAnalytics() {
// keep orignal Date object so as not to be affected by wayback's
// hijacking global Date object
var Date = window.Date;
var ARCHIVE_ANALYTICS_VERSION = 2;
var DEFAULT_SERVICE = 'ao_2';
var NO_SAMPLING_SERVICE = 'ao_no_sampling'; // sends every event instead of a percentage
var startTime = new Date();
/**
* @return {Boolean}
*/
function isPerformanceTimingApiSupported() {
return 'performance' in window && 'timing' in window.performance;
}
/**
* Determines how many milliseconds elapsed between the browser starting to parse the DOM and
* the current time.
*
* Uses the Performance API or a fallback value if it's not available.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/Performance_API
*
* @return {Number}
*/
function getLoadTime() {
var start;
if (isPerformanceTimingApiSupported())
start = window.performance.timing.domLoading;
else
start = startTime.getTime();
return new Date().getTime() - start;
}
/**
* Determines how many milliseconds elapsed between the user navigating to the page and
* the current time.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/Performance_API
*
* @return {Number|null} null if the browser doesn't support the Performance API
*/
function getNavToDoneTime() {
if (!isPerformanceTimingApiSupported())
return null;
return new Date().getTime() - window.performance.timing.navigationStart;
}
/**
* Performs an arithmetic calculation on a string with a number and unit, while maintaining
* the unit.
*
* @param {String} original value to modify, with a unit
* @param {Function} doOperation accepts one Number parameter, returns a Number
* @returns {String}
*/
function computeWithUnit(original, doOperation) {
var number = parseFloat(original, 10);
var unit = original.replace(/(\d*\.\d+)|\d+/, '');
return doOperation(number) + unit;
}
/**
* Computes the default font size of the browser.
*
* @returns {String|null} computed font-size with units (typically pixels), null if it cannot be computed
*/
function getDefaultFontSize() {
var fontSizeStr;
if (!('getComputedStyle' in window))
return null;
var style = window.getComputedStyle(document.documentElement);
if (!style)
return null;
fontSizeStr = style.fontSize;
// Don't modify the value if tracking book reader.
if (document.querySelector('#BookReader'))
return fontSizeStr;
return computeWithUnit(fontSizeStr, function reverseBootstrapFontSize(number) {
// Undo the 62.5% size applied in the Bootstrap CSS.
return number * 1.6;
});
}
/**
* Get the URL parameters for a given Location
* @param {Location}
* @return {Object} The URL parameters
*/
function getParams(location) {
if (!location) location = window.location;
var vars;
var i;
var pair;
var params = {};
var query = location.search;
if (!query) return params;
vars = query.substring(1).split('&');
for (i = 0; i < vars.length; i++) {
pair = vars[i].split('=');
params[pair[0]] = decodeURIComponent(pair[1]);
}
return params;
}
function getMetaProp(name) {
var metaTag = document.querySelector('meta[property=' + name + ']');
return metaTag ? metaTag.getAttribute('content') || null : null;
}
var ArchiveAnalytics = {
/**
* @type {String|null}
*/
service: getMetaProp('service'),
mediaType: getMetaProp('mediatype'),
primaryCollection: getMetaProp('primary_collection'),
/**
* Key-value pairs to send in pageviews (you can read this after a pageview to see what was
* sent).
*
* @type {Object}
*/
values: {},
/**
* Sends an analytics ping, preferably using navigator.sendBeacon()
* @param {Object} values
* @param {Function} [onload_callback] (deprecated) callback to invoke once ping to analytics server is done
* @param {Boolean} [augment_for_ao_site] (deprecated) if true, add some archive.org site-specific values
*/
send_ping: function send_ping(values, onload_callback, augment_for_ao_site) {
if (typeof window.navigator !== 'undefined' && typeof window.navigator.sendBeacon !== 'undefined')
this.send_ping_via_beacon(values);
else
this.send_ping_via_image(values);
},
/**
* Sends a ping via Beacon API
* NOTE: Assumes window.navigator.sendBeacon exists
* @param {Object} values Tracking parameters to pass
*/
send_ping_via_beacon: function send_ping_via_beacon(values) {
var url = this.generate_tracking_url(values || {});
window.navigator.sendBeacon(url);
},
/**
* Sends a ping via Image object
* @param {Object} values Tracking parameters to pass
*/
send_ping_via_image: function send_ping_via_image(values) {
var url = this.generate_tracking_url(values || {});
var loadtime_img = new Image(1, 1);
loadtime_img.src = url;
loadtime_img.alt = '';
},
/**
* Construct complete tracking URL containing payload
* @param {Object} params Tracking parameters to pass
* @return {String} URL to use for tracking call
*/
generate_tracking_url: function generate_tracking_url(params) {
var baseUrl = '//analytics.archive.org/0.gif';
var keys;
var outputParams = params;
var outputParamsArray = [];
outputParams.service = outputParams.service || this.service || DEFAULT_SERVICE;
// Build array of querystring parameters
keys = Object.keys(outputParams);
keys.forEach(function keyIteration(key) {
outputParamsArray.push(encodeURIComponent(key) + '=' + encodeURIComponent(outputParams[key]));
});
outputParamsArray.push('version=' + ARCHIVE_ANALYTICS_VERSION);
outputParamsArray.push('count=' + (keys.length + 2)); // Include `version` and `count` in count
return baseUrl + '?' + outputParamsArray.join('&');
},
/**
* @param {int} page Page number
*/
send_scroll_fetch_event: function send_scroll_fetch_event(page) {
var additionalValues = { ev: page };
var loadTime = getLoadTime();
var navToDoneTime = getNavToDoneTime();
if (loadTime) additionalValues.loadtime = loadTime;
if (navToDoneTime) additionalValues.nav_to_done_ms = navToDoneTime;
this.send_event('page_action', 'scroll_fetch', location.pathname, additionalValues);
},
send_scroll_fetch_base_event: function send_scroll_fetch_base_event() {
var additionalValues = {};
var loadTime = getLoadTime();
var navToDoneTime = getNavToDoneTime();
if (loadTime) additionalValues.loadtime = loadTime;
if (navToDoneTime) additionalValues.nav_to_done_ms = navToDoneTime;
this.send_event('page_action', 'scroll_fetch_base', location.pathname, additionalValues);
},
/**
* @param {Object} [options]
* @param {String} [options.mediaType]
* @param {String} [options.mediaLanguage]
* @param {String} [options.page] The path portion of the page URL
*/
send_pageview: function send_pageview(options) {
var settings = options || {};
var defaultFontSize;
var loadTime = getLoadTime();
var mediaType = settings.mediaType;
var primaryCollection = settings.primaryCollection;
var page = settings.page;
var navToDoneTime = getNavToDoneTime();
/**
* @return {String}
*/
function get_locale() {
if (navigator) {
if (navigator.language)
return navigator.language;
else if (navigator.browserLanguage)
return navigator.browserLanguage;
else if (navigator.systemLanguage)
return navigator.systemLanguage;
else if (navigator.userLanguage)
return navigator.userLanguage;
}
return '';
}
defaultFontSize = getDefaultFontSize();
// Set field values
this.values.kind = 'pageview';
this.values.timediff = (new Date().getTimezoneOffset()/60)*(-1); // *timezone* diff from UTC
this.values.locale = get_locale();
this.values.referrer = (document.referrer == '' ? '-' : document.referrer);
if (loadTime)
this.values.loadtime = loadTime;
if (navToDoneTime)
this.values.nav_to_done_ms = navToDoneTime;
if (settings.trackingId) {
this.values.ga_tid = settings.trackingId;
}
/* START CUSTOM DIMENSIONS */
if (defaultFontSize)
this.values.iaprop_fontSize = defaultFontSize;
if ('devicePixelRatio' in window)
this.values.iaprop_devicePixelRatio = window.devicePixelRatio;
if (mediaType)
this.values.iaprop_mediaType = mediaType;
if (settings.mediaLanguage) {
this.values.iaprop_mediaLanguage = settings.mediaLanguage;
}
if (primaryCollection) {
this.values.iaprop_primaryCollection = primaryCollection;
}
/* END CUSTOM DIMENSIONS */
if (page)
this.values.page = page;
this.send_ping(this.values);
},
/**
* Sends a tracking "Event".
* @param {string} category
* @param {string} action
* @param {string} label
* @param {Object} additionalEventParams
*/
send_event: function send_event(
category,
action,
label,
additionalEventParams
) {
if (!label) label = window.location.pathname;
if (!additionalEventParams) additionalEventParams = {};
if (additionalEventParams.mediaLanguage) {
additionalEventParams.ga_cd4 = additionalEventParams.mediaLanguage;
delete additionalEventParams.mediaLanguage;
}
var eventParams = Object.assign(
{
kind: 'event',
ec: category,
ea: action,
el: label,
cache_bust: Math.random(),
},
additionalEventParams
);
this.send_ping(eventParams);
},
/**
* Sends every event instead of a small percentage.
*
* Use this sparingly as it can generate a lot of events.
*
* @param {string} category
* @param {string} action
* @param {string} label
* @param {Object} additionalEventParams
*/
send_event_no_sampling: function send_event_no_sampling(
category,
action,
label,
additionalEventParams
) {
var extraParams = additionalEventParams || {};
extraParams.service = NO_SAMPLING_SERVICE;
this.send_event(category, action, label, extraParams);
},
/**
* @param {Object} options see this.send_pageview options
*/
send_pageview_on_load: function send_pageview_on_load(options) {
var self = this;
window.addEventListener('load', function send_pageview_with_options() {
self.send_pageview(options);
});
},
/**
* Handles tracking events passed in URL.
* Assumes category and action values are separated by a "|" character.
* NOTE: Uses the unsampled analytics property. Watch out for future high click links!
* @param {Location}
*/
process_url_events: function process_url_events(location) {
var eventValues;
var actionValue;
var eventValue = getParams(location).iax;
if (!eventValue) return;
eventValues = eventValue.split('|');
actionValue = eventValues.length >= 1 ? eventValues[1] : '';
this.send_event_no_sampling(
eventValues[0],
actionValue,
window.location.pathname
);
},
/**
* Attaches handlers for event tracking.
*
* To enable click tracking for a link, add a `data-event-click-tracking`
* attribute containing the Google Analytics Event Category and Action, separated
* by a vertical pipe (|).
* e.g. `<a href="foobar" data-event-click-tracking="TopNav|FooBar">`
*
* To enable form submit tracking, add a `data-event-form-tracking` attribute
* to the `form` tag.
* e.g. `<form data-event-form-tracking="TopNav|SearchForm" method="GET">`
*
* Additional tracking options can be added via a `data-event-tracking-options`
* parameter. This parameter, if included, should be a JSON string of the parameters.
* Valid parameters are:
* - service {string}: Corresponds to the Google Analytics property data values flow into
*/
set_up_event_tracking: function set_up_event_tracking() {
var self = this;
var clickTrackingAttributeName = 'event-click-tracking';
var formTrackingAttributeName = 'event-form-tracking';
var trackingOptionsAttributeName = 'event-tracking-options';
function handleAction(event, attributeName) {
var selector = '[data-' + attributeName + ']';
var eventTarget = event.target;
if (!eventTarget) return;
var target = eventTarget.closest(selector);
if (!target) return;
var categoryAction;
var categoryActionParts;
var options;
categoryAction = target.dataset[toCamelCase(attributeName)];
if (!categoryAction) return;
categoryActionParts = categoryAction.split('|');
options = target.dataset[toCamelCase(trackingOptionsAttributeName)];
options = options ? JSON.parse(options) : {};
self.send_event(
categoryActionParts[0],
categoryActionParts[1],
categoryActionParts[2] || window.location.pathname,
options.service ? { service: options.service } : {}
);
}
function toCamelCase(str) {
return str.replace(/\W+(.)/g, function (match, chr) {
return chr.toUpperCase();
});
};
document.addEventListener('click', function(e) {
handleAction(e, clickTrackingAttributeName);
});
document.addEventListener('submit', function(e) {
handleAction(e, formTrackingAttributeName);
});
},
/**
* @returns {Object[]}
*/
get_data_packets: function get_data_packets() {
return [this.values];
},
/**
* Creates a tracking image for tracking JS compatibility.
*
* @param {string} type The type value for track_js_case in query params for 0.gif
*/
create_tracking_image: function create_tracking_image(type) {
this.send_ping_via_image({
cache_bust: Math.random(),
kind: 'track_js',
track_js_case: type,
});
}
};
return ArchiveAnalytics;
}());
// @license-end

View file

@ -0,0 +1,507 @@
@import 'record.css'; /* for SPN1 */
#wm-ipp-base {
height:65px;/* initial height just in case js code fails */
padding:0;
margin:0;
border:none;
background:none transparent;
}
#wm-ipp {
z-index: 2147483647;
}
#wm-ipp, #wm-ipp * {
font-family:Lucida Grande, Helvetica, Arial, sans-serif;
font-size:12px;
line-height:1.2;
letter-spacing:0;
width:auto;
height:auto;
max-width:none;
max-height:none;
min-width:0 !important;
min-height:0;
outline:none;
float:none;
text-align:left;
border:none;
color: #000;
text-indent: 0;
position: initial;
background: none;
}
#wm-ipp div, #wm-ipp canvas {
display: block;
}
#wm-ipp div, #wm-ipp tr, #wm-ipp td, #wm-ipp a, #wm-ipp form {
padding:0;
margin:0;
border:none;
border-radius:0;
background-color:transparent;
background-image:none;
/*z-index:2147483640;*/
height:auto;
}
#wm-ipp table {
border:none;
border-collapse:collapse;
margin:0;
padding:0;
width:auto;
font-size:inherit;
}
#wm-ipp form input {
padding:1px !important;
height:auto;
display:inline;
margin:0;
color: #000;
background: none #fff;
border: 1px solid #666;
}
#wm-ipp form input[type=submit] {
padding:0 8px !important;
margin:1px 0 1px 5px !important;
width:auto !important;
border: 1px solid #000 !important;
background: #fff !important;
color: #000 !important;
}
#wm-ipp form input[type=submit]:hover {
background: #eee !important;
cursor: pointer !important;
}
#wm-ipp form input[type=submit]:active {
transform: translateY(1px);
}
#wm-ipp a {
display: inline;
}
#wm-ipp a:hover{
text-decoration:underline;
}
#wm-ipp a.wm-btn:hover {
text-decoration:none;
color:#ff0 !important;
}
#wm-ipp a.wm-btn:hover span {
color:#ff0 !important;
}
#wm-ipp #wm-ipp-inside {
margin: 0 6px;
border:5px solid #000;
border-top:none;
background-color:rgba(255,255,255,0.9);
-moz-box-shadow:1px 1px 4px #333;
-webkit-box-shadow:1px 1px 4px #333;
box-shadow:1px 1px 4px #333;
border-radius:0 0 8px 8px;
}
/* selectors are intentionally verbose to ensure priority */
#wm-ipp #wm-logo {
padding:0 10px;
vertical-align:middle;
min-width:100px;
flex: 0 0 100px;
}
#wm-ipp .c {
padding-left: 4px;
}
#wm-ipp .c .u {
margin-top: 4px !important;
}
#wm-ipp .n {
padding:0 0 0 5px !important;
vertical-align: bottom;
}
#wm-ipp .n a {
text-decoration:none;
color:#33f;
font-weight:bold;
}
#wm-ipp .n .b {
padding:0 6px 0 0 !important;
text-align:right !important;
overflow:visible;
white-space:nowrap;
color:#99a;
vertical-align:middle;
}
#wm-ipp .n .y .b {
padding:0 6px 2px 0 !important;
}
#wm-ipp .n .c {
background:#000;
color:#ff0;
font-weight:bold;
padding:0 !important;
text-align:center;
}
#wm-ipp.hi .n td.c {
color:#ec008c;
}
#wm-ipp .n td.f {
padding:0 0 0 6px !important;
text-align:left !important;
overflow:visible;
white-space:nowrap;
color:#99a;
vertical-align:middle;
}
#wm-ipp .n tr.m td {
text-transform:uppercase;
white-space:nowrap;
padding:2px 0;
}
#wm-ipp .c .s {
padding:0 5px 0 0 !important;
vertical-align:bottom;
}
#wm-ipp #wm-nav-captures {
white-space: nowrap;
}
#wm-ipp .c .s a.t {
color:#33f;
font-weight:bold;
line-height: 1.8;
}
#wm-ipp .c .s div.r {
color: #666;
font-size:9px;
white-space:nowrap;
}
#wm-ipp .c .k {
padding-bottom:1px;
}
#wm-ipp .c .s {
padding:0 5px 2px 0 !important;
}
#wm-ipp td#displayMonthEl {
padding: 2px 0 !important;
}
#wm-ipp td#displayYearEl {
padding: 0 0 2px 0 !important;
}
div#wm-ipp-sparkline {
position:relative;/* for positioning markers */
white-space:nowrap;
background-color:#fff;
cursor:pointer;
line-height:0.9;
}
#sparklineImgId, #wm-sparkline-canvas {
position:relative;
z-index:9012;
max-width:none;
}
#wm-ipp-sparkline div.yt {
position:absolute;
z-index:9010 !important;
background-color:#ff0 !important;
top: 0;
}
#wm-ipp-sparkline div.mt {
position:absolute;
z-index:9013 !important;
background-color:#ec008c !important;
top: 0;
}
#wm-ipp .r {
margin-left: 4px;
}
#wm-ipp .r a {
color:#33f;
border:none;
position:relative;
background-color:transparent;
background-repeat:no-repeat !important;
background-position:100% 100% !important;
text-decoration: none;
}
#wm-ipp #wm-capinfo {
/* prevents notice div background from sticking into round corners of
#wm-ipp-inside */
border-radius: 0 0 4px 4px;
}
#wm-ipp #wm-capinfo .c-logo {
display:block;
float:left;
margin-right:3px;
width:90px;
min-height:90px;
max-height: 290px;
border-radius:45px;
overflow:hidden;
background-position:50%;
background-size:auto 90px;
box-shadow: 0 0 2px 2px rgba(208,208,208,128) inset;
}
#wm-ipp #wm-capinfo .c-logo span {
display:inline-block;
}
#wm-ipp #wm-capinfo .c-logo img {
height:90px;
position:relative;
left:-50%;
}
#wm-ipp #wm-capinfo .wm-title {
font-size:130%;
}
#wm-ipp #wm-capinfo a.wm-selector {
display:inline-block;
color: #aaa;
text-decoration:none !important;
padding: 2px 8px;
}
#wm-ipp #wm-capinfo a.wm-selector.selected {
background-color:#666;
}
#wm-ipp #wm-capinfo a.wm-selector:hover {
color: #fff;
}
#wm-ipp #wm-capinfo.notice-only #wm-capinfo-collected-by,
#wm-ipp #wm-capinfo.notice-only #wm-capinfo-timestamps {
display: none;
}
#wm-ipp #wm-capinfo #wm-capinfo-notice .wm-capinfo-content {
background-color:#ff0;
padding:5px;
font-size:14px;
text-align:center;
}
#wm-ipp #wm-capinfo #wm-capinfo-notice .wm-capinfo-content * {
font-size:14px;
text-align:center;
}
#wm-ipp #wm-expand {
right: 1px;
bottom: -1px;
color: #ffffff;
background-color: #666 !important;
padding:0 5px 0 3px !important;
border-radius: 3px 3px 0 0 !important;
}
#wm-ipp #wm-expand span {
color: #ffffff;
}
#wm-ipp #wm-expand #wm-expand-icon {
display: inline-block;
transition: transform 0.5s;
transform-origin: 50% 45%;
}
#wm-ipp #wm-expand.wm-open #wm-expand-icon {
transform: rotate(180deg);
}
#wm-ipp #wmtb {
text-align:right;
}
#wm-ipp #wmtb #wmtbURL {
width: calc(100% - 45px);
}
#wm-ipp #wm-graph-anchor {
border-right:1px solid #ccc;
}
/* time coherence */
html.wb-highlight {
box-shadow: inset 0 0 0 3px #a50e3a !important;
}
.wb-highlight {
outline: 3px solid #a50e3a !important;
}
#wm-ipp-print {
display:none !important;
}
@media print {
#wm-ipp-base {
display:none !important;
}
#wm-ipp-print {
display:block !important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
@media (max-width:414px) {
#wm-ipp .xxs {
display:none !important;
}
}
@media (min-width:1055px) {
#wm-ipp #wm-graph-anchor {
display:block !important;
}
}
@media (max-width:1054px) {
#wm-ipp #wm-graph-anchor {
display:none !important;
}
}
@media (max-width:1163px) {
#wm-logo {
display:none !important;
}
}
#wm-btns {
white-space: nowrap;
margin-top: -2px;
}
#wm-btns #wm-save-snapshot-open {
margin-right: 7px;
top: -6px;
}
#wm-btns #wm-sign-in {
box-sizing: content-box;
display: none;
margin-right: 7px;
top: -8px;
/*
round border around sign in button
*/
border: 2px #000 solid;
border-radius: 14px;
padding-right: 2px;
padding-bottom: 2px;
width: 11px;
height: 11px;
}
#wm-btns #wm-sign-in>.iconochive-person {
font-size: 12.5px;
}
#wm-save-snapshot-open > .iconochive-web {
color:#000;
font-size:160%;
}
#wm-ipp #wm-share {
display: flex;
align-items: flex-end;
justify-content: space-between;
}
#wm-share > #wm-screenshot {
display: inline-block;
margin-right: 3px;
visibility: hidden;
}
#wm-screenshot > .iconochive-image {
color:#000;
font-size:160%;
}
#wm-share > #wm-video {
display: inline-block;
margin-right: 3px;
visibility: hidden;
}
#wm-video > .iconochive-movies {
color: #000;
display: inline-block;
font-size: 150%;
margin-bottom: 2px;
}
#wm-btns #wm-save-snapshot-in-progress {
display: none;
font-size:160%;
opacity: 0.5;
position: relative;
margin-right: 7px;
top: -5px;
}
#wm-btns #wm-save-snapshot-success {
display: none;
color: green;
position: relative;
top: -7px;
}
#wm-btns #wm-save-snapshot-fail {
display: none;
color: red;
position: relative;
top: -7px;
}
.wm-icon-screen-shot {
background: url("../images/web-screenshot.svg") no-repeat !important;
background-size: contain !important;
width: 22px !important;
height: 19px !important;
display: inline-block;
}
#donato {
/* transition effect is disable so as to simplify height adjustment */
/*transition: height 0.5s;*/
height: 0;
margin: 0;
padding: 0;
border-bottom: 1px solid #999 !important;
}
body.wm-modal {
height: auto !important;
overflow: hidden !important;
}
#donato #donato-base {
width: 100%;
height: 100%;
/*bottom: 0;*/
margin: 0;
padding: 0;
position: absolute;
z-index: 2147483639;
}
body.wm-modal #donato #donato-base {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2147483640;
}
.wb-autocomplete-suggestions {
font-family: Lucida Grande, Helvetica, Arial, sans-serif;
font-size: 12px;
text-align: left;
cursor: default;
border: 1px solid #ccc;
border-top: 0;
background: #fff;
box-shadow: -1px 1px 3px rgba(0,0,0,.1);
position: absolute;
display: none;
z-index: 2147483647;
max-height: 254px;
overflow: hidden;
overflow-y: auto;
box-sizing: border-box;
}
.wb-autocomplete-suggestion {
position: relative;
padding: 0 .6em;
line-height: 23px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 1.02em;
color: #333;
}
.wb-autocomplete-suggestion b {
font-weight: bold;
}
.wb-autocomplete-suggestion.selected {
background: #f0f0f0;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,117 @@
BODY {
font-family: verdana, arial, helvetica, sans-serif, Trebuchet MS;
color: black;
background: #555555
}
A:link {
font-family: verdana, ari
helvetica, sans-serif, Trebuchet MS;
# font-size: 14pt;
color: black;
text-decoration: underline
}
A.nouline:link {
font-family: verdana, ari
helvetica, sans-serif, Trebuchet MS;
color:#CCC;
font-size:13px;
font-weight:normal;
background:#333;
linT<EFBFBD>©ight:14px;
text-decoration: none
}
A.nouline:visited {
font-family: verdana, ari
helvetica, sans-serif, Trebuchet MS;
color:#CCC;
font-size:13px;
font-weight:normal;
background:#333;
linT<EFBFBD>©ight:14px;
text-decoration: none
}
A.blue:link {
font-family: verdana, ari
helvetica, sans-serif, Trebuchet MS;
# font-size: 14pt;
color: #77aabb;
text-decoration: underline
}
A:unknown {
font-family: verdana, ari
helvetica, sans-serif, Trebuchet MS;
font-size: 14pt;
}
A:visited {
font-family: verdana, ari
helvetica, sans-serif, Trebuchet MS;
color: #aa99aa;
text-decoration: underline
}
A:hover {
font-family: verdana, ari
helvetica, sans-serif, Trebuchet MS;
color: white;
text-decoration: underline
}
TD {
font-family: verdana, arial, helvetica, sans-serif, Trebuchet MS;
font-size: 12pt;
}
TD.small {
font-family: verdana, arial, helvetica, sans-serif, Trebuchet MS;
font-size: 10pt;
}
.menu_header {
font-family:verdana, arial, sans-serif;
color:#CCC;
font-size:13px;
font-weight:normal;
background:#333;
line-height:14px;
padding-left:10px;
padding-right:10px;
padding-top:10px;
padding-bottom:10px;
# border-left: 1px solid #b1b1b1;
# border-top: 1px solid #b1b1b1;
border-bottom: 1px solid #b1b1b1;
# border-right: 1px solid #b1b1b1;
}
.menu_section {
font-family:verdana, arial, sans-serif;
# color:#CCC;
border-bottom: 1px solid #b1b1b1;
padding-left: 10px;
padding-right: 10px;
padding-top: 10px;
padding-bottom: 10px;
line-height: 14px;
font-size: 12px;
font-weight: normal;
}
/*
FILE ARCHIVED ON 03:14:21 Sep 01, 2005 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 12:49:07 Apr 29, 2024.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
captures_list: 0.768
exclusion.robots: 0.111
exclusion.robots.policy: 0.099
cdx.remote: 0.083
esindex: 0.03
LoadShardBlock: 99.922 (3)
PetaboxLoader3.datanode: 67.4 (4)
PetaboxLoader3.resolve: 150.576 (2)
load_resource: 144.497
*/

View file

@ -0,0 +1,116 @@
@font-face{font-family:'Iconochive-Regular';src:url('https://archive.org/includes/fonts/Iconochive-Regular.eot?-ccsheb');src:url('https://archive.org/includes/fonts/Iconochive-Regular.eot?#iefix-ccsheb') format('embedded-opentype'),url('https://archive.org/includes/fonts/Iconochive-Regular.woff?-ccsheb') format('woff'),url('https://archive.org/includes/fonts/Iconochive-Regular.ttf?-ccsheb') format('truetype'),url('https://archive.org/includes/fonts/Iconochive-Regular.svg?-ccsheb#Iconochive-Regular') format('svg');font-weight:normal;font-style:normal}
[class^="iconochive-"],[class*=" iconochive-"]{font-family:'Iconochive-Regular'!important;speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.iconochive-Uplevel:before{content:"\21b5"}
.iconochive-exit:before{content:"\1f6a3"}
.iconochive-beta:before{content:"\3b2"}
.iconochive-logo:before{content:"\1f3db"}
.iconochive-audio:before{content:"\1f568"}
.iconochive-movies:before{content:"\1f39e"}
.iconochive-software:before{content:"\1f4be"}
.iconochive-texts:before{content:"\1f56e"}
.iconochive-etree:before{content:"\1f3a4"}
.iconochive-image:before{content:"\1f5bc"}
.iconochive-web:before{content:"\1f5d4"}
.iconochive-collection:before{content:"\2211"}
.iconochive-folder:before{content:"\1f4c2"}
.iconochive-data:before{content:"\1f5c3"}
.iconochive-tv:before{content:"\1f4fa"}
.iconochive-article:before{content:"\1f5cf"}
.iconochive-question:before{content:"\2370"}
.iconochive-question-dark:before{content:"\3f"}
.iconochive-info:before{content:"\69"}
.iconochive-info-small:before{content:"\24d8"}
.iconochive-comment:before{content:"\1f5e9"}
.iconochive-comments:before{content:"\1f5ea"}
.iconochive-person:before{content:"\1f464"}
.iconochive-people:before{content:"\1f465"}
.iconochive-eye:before{content:"\1f441"}
.iconochive-rss:before{content:"\221e"}
.iconochive-time:before{content:"\1f551"}
.iconochive-quote:before{content:"\275d"}
.iconochive-disc:before{content:"\1f4bf"}
.iconochive-tv-commercial:before{content:"\1f4b0"}
.iconochive-search:before{content:"\1f50d"}
.iconochive-search-star:before{content:"\273d"}
.iconochive-tiles:before{content:"\229e"}
.iconochive-list:before{content:"\21f6"}
.iconochive-list-bulleted:before{content:"\2317"}
.iconochive-latest:before{content:"\2208"}
.iconochive-left:before{content:"\2c2"}
.iconochive-right:before{content:"\2c3"}
.iconochive-left-solid:before{content:"\25c2"}
.iconochive-right-solid:before{content:"\25b8"}
.iconochive-up-solid:before{content:"\25b4"}
.iconochive-down-solid:before{content:"\25be"}
.iconochive-dot:before{content:"\23e4"}
.iconochive-dots:before{content:"\25a6"}
.iconochive-columns:before{content:"\25af"}
.iconochive-sort:before{content:"\21d5"}
.iconochive-atoz:before{content:"\1f524"}
.iconochive-ztoa:before{content:"\1f525"}
.iconochive-upload:before{content:"\1f4e4"}
.iconochive-download:before{content:"\1f4e5"}
.iconochive-favorite:before{content:"\2605"}
.iconochive-heart:before{content:"\2665"}
.iconochive-play:before{content:"\25b6"}
.iconochive-play-framed:before{content:"\1f3ac"}
.iconochive-fullscreen:before{content:"\26f6"}
.iconochive-mute:before{content:"\1f507"}
.iconochive-unmute:before{content:"\1f50a"}
.iconochive-share:before{content:"\1f381"}
.iconochive-edit:before{content:"\270e"}
.iconochive-reedit:before{content:"\2710"}
.iconochive-gear:before{content:"\2699"}
.iconochive-remove-circle:before{content:"\274e"}
.iconochive-plus-circle:before{content:"\1f5d6"}
.iconochive-minus-circle:before{content:"\1f5d5"}
.iconochive-x:before{content:"\1f5d9"}
.iconochive-fork:before{content:"\22d4"}
.iconochive-trash:before{content:"\1f5d1"}
.iconochive-warning:before{content:"\26a0"}
.iconochive-flash:before{content:"\1f5f2"}
.iconochive-world:before{content:"\1f5fa"}
.iconochive-lock:before{content:"\1f512"}
.iconochive-unlock:before{content:"\1f513"}
.iconochive-twitter:before{content:"\1f426"}
.iconochive-facebook:before{content:"\66"}
.iconochive-googleplus:before{content:"\67"}
.iconochive-reddit:before{content:"\1f47d"}
.iconochive-tumblr:before{content:"\54"}
.iconochive-pinterest:before{content:"\1d4df"}
.iconochive-popcorn:before{content:"\1f4a5"}
.iconochive-email:before{content:"\1f4e7"}
.iconochive-embed:before{content:"\1f517"}
.iconochive-gamepad:before{content:"\1f579"}
.iconochive-Zoom_In:before{content:"\2b"}
.iconochive-Zoom_Out:before{content:"\2d"}
.iconochive-RSS:before{content:"\1f4e8"}
.iconochive-Light_Bulb:before{content:"\1f4a1"}
.iconochive-Add:before{content:"\2295"}
.iconochive-Tab_Activity:before{content:"\2318"}
.iconochive-Forward:before{content:"\23e9"}
.iconochive-Backward:before{content:"\23ea"}
.iconochive-No_Audio:before{content:"\1f508"}
.iconochive-Pause:before{content:"\23f8"}
.iconochive-No_Favorite:before{content:"\2606"}
.iconochive-Unike:before{content:"\2661"}
.iconochive-Song:before{content:"\266b"}
.iconochive-No_Flag:before{content:"\2690"}
.iconochive-Flag:before{content:"\2691"}
.iconochive-Done:before{content:"\2713"}
.iconochive-Check:before{content:"\2714"}
.iconochive-Refresh:before{content:"\27f3"}
.iconochive-Headphones:before{content:"\1f3a7"}
.iconochive-Chart:before{content:"\1f4c8"}
.iconochive-Bookmark:before{content:"\1f4d1"}
.iconochive-Documents:before{content:"\1f4da"}
.iconochive-Newspaper:before{content:"\1f4f0"}
.iconochive-Podcast:before{content:"\1f4f6"}
.iconochive-Radio:before{content:"\1f4fb"}
.iconochive-Cassette:before{content:"\1f4fc"}
.iconochive-Shuffle:before{content:"\1f500"}
.iconochive-Loop:before{content:"\1f501"}
.iconochive-Low_Audio:before{content:"\1f509"}
.iconochive-First:before{content:"\1f396"}
.iconochive-Invisible:before{content:"\1f576"}
.iconochive-Computer:before{content:"\1f5b3"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,68 @@
From: Jake Moilanen <moilanen@austin.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: [ANNOUNCE 0/4] Genetic-lib version 0.2
Date: Tue, 15 Feb 2005 13:29:06 -0600
Cc: Peter Williams <pwil3058@bigpond.net.au>
Here is the next release of the genetic library based against 2.6.10
kernel.
There were numerous changes from the first release, but the major change
in this version is the introduction of phenotypes. A phenotype is a set
of genes the affect an observable property. In genetic-library terms,
it is a set of genes that will affect a particular fitness measurement.
Each phenotype will have a set of children that contain genes that
affect a fitness measure.
Now multiple fitness routines can be ran for each genetic library user.
Then depending on the results of a particular fitness measure, the
specific genes that directly affect that fitness measure can be
modified. This introduces a finer granularity that was missing in the
first release of the genetic-library.
I would like to thank Peter Williams for reworking the Zaphod Scheduler
and help designing the phenotypes.
Some of the other features introduced is shifting the number of
mutations depending on how well a phenotype is performing. If the
current generation outperformed the previous generation, then the rate
of mutation will go down. Conversely if the current generation performed
worst then the previous generation, the mutation rate will go up. This
mutation rate shift will do two things. When generations are improving,
it will reduce the number unnecessary mutations and hone in on the
optimal tunables. When a workload drastically changes, the fitness
should go way down, and the mutation rate will increase in order to test
a greater space of better values quicker. This should decrease the time
it takes to adjust to a new workload. There is a limit at 45% of the
genes being mutated every generation in order to prevent the mutation
rate spiralling out of control.
SpecJBB and UnixBench are still yielding a 1-3% performance improvement,
however (though it's subjective) the interactiveness has had noticeable
improvements.
I have not broke the Anticipatory IO Scheduler down to a fine
granularity in phenotypes yet. Any assistance would be greatly
appreciated.
Currently I am hosting this project off of:
http://kernel.jakem.net
[1/4 genetic-lib]: This is the base patch for the genetic algorithm.
[2/4 genetic-io-sched]: The base patch for the IO schedulers to use the
genetic library.
[3/4 genetic-as-sched]: A genetic-lib hooked anticipatory IO scheduler.
[4/4 genetic-zaphod-cpu-sched]: A hooked zaphod CPU scheduler. Depends
on the zaphod-v6.2 patch.
Thanks,
Jake
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

View file

@ -0,0 +1,416 @@
Change Log
0.2+ 2/17/05
- Limited read_batch_expire not being greater then write_expire.
- Limited write_batch_expire not being greater then read_expire.
- Allowed antic_expire to go down to zero to cause it to go into
deadline mode
---
diff -puN drivers/block/Kconfig.iosched~genetic-as-sched drivers/block/Kconfig.iosched
--- linux-2.6.10/drivers/block/Kconfig.iosched~genetic-as-sched Mon Feb 21 08:38:40 2005
+++ linux-2.6.10-moilanen/drivers/block/Kconfig.iosched Mon Feb 21 08:38:40 2005
@@ -38,4 +38,13 @@ config IOSCHED_CFQ
among all processes in the system. It should provide a fair
working environment, suitable for desktop systems.
+config GENETIC_IOSCHED_AS
+ bool "Genetic Anticipatory I/O scheduler (EXPERIMENTAL)"
+ depends on IOSCHED_AS && GENETIC_LIB && EXPERIMENTAL
+ default n
+ ---help---
+ This will use a genetic algorithm to tweak the tunables of the
+ anticipatory scheduler autonomically and will adapt tunables
+ depending on the present workload.
+
endmenu
diff -puN drivers/block/as-iosched.c~genetic-as-sched drivers/block/as-iosched.c
--- linux-2.6.10/drivers/block/as-iosched.c~genetic-as-sched Mon Feb 21 08:38:40 2005
+++ linux-2.6.10-moilanen/drivers/block/as-iosched.c Wed Feb 23 14:11:15 2005
@@ -20,6 +20,8 @@
#include <linux/hash.h>
#include <linux/rbtree.h>
#include <linux/interrupt.h>
+#include <linux/genetic.h>
+#include <linux/random.h>
#define REQ_SYNC 1
#define REQ_ASYNC 0
@@ -67,6 +69,8 @@
*/
#define MAX_THINKTIME (HZ/50UL)
+unsigned long max_thinktime = MAX_THINKTIME;
+
/* Bits in as_io_context.state */
enum as_io_states {
AS_TASK_RUNNING=0, /* Process has not exitted */
@@ -83,6 +87,94 @@ enum anticipation_status {
* or timed out */
};
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+
+struct disk_stats_snapshot * as_stats_snapshot;
+
+extern void disk_stats_snapshot(phenotype_t * pt);
+
+static void as_num_ops_create_child(genetic_child_t * child);
+static void as_throughput_create_child(genetic_child_t * child);
+static void as_latency_create_child(genetic_child_t * child);
+static void as_general_create_child(genetic_child_t * child);
+
+static void as_general_set_child_genes(void * in_genes);
+
+static void as_num_ops_calc_fitness(genetic_child_t * child);
+static void as_throughput_calc_fitness(genetic_child_t * child);
+static void as_latency_calc_fitness(genetic_child_t * child);
+
+static void as_general_calc_post_fitness(phenotype_t * in_pt);
+
+static void as_shift_mutation_rate(phenotype_t * in_pt);
+
+struct genetic_ops as_num_ops_genetic_ops = {
+ .create_child = as_num_ops_create_child,
+ .calc_fitness = as_num_ops_calc_fitness,
+};
+
+struct genetic_ops as_throughput_genetic_ops = {
+ .create_child = as_throughput_create_child,
+ .calc_fitness = as_throughput_calc_fitness,
+};
+
+struct genetic_ops as_latency_genetic_ops = {
+ .create_child = as_latency_create_child,
+ .calc_fitness = as_latency_calc_fitness,
+};
+
+struct genetic_ops as_general_genetic_ops = {
+ .create_child = as_general_create_child,
+ .set_child_genes = as_general_set_child_genes,
+ .combine_genes = genetic_generic_combine_genes,
+ .mutate_child = genetic_generic_mutate_child,
+ .calc_post_fitness = as_general_calc_post_fitness,
+ .take_snapshot = disk_stats_snapshot,
+ .shift_mutation_rate = as_shift_mutation_rate
+};
+
+#define AS_NUM_CHILDREN 8
+
+#define AS_NUM_OPS_UID 1
+#define AS_NUM_OPS_NUM_GENES 0
+
+#define AS_THROUGHPUT_UID 2
+#define AS_THROUGHPUT_NUM_GENES 0
+
+#define AS_LATENCY_UID 4
+#define AS_LATENCY_NUM_GENES 0
+
+#define AS_GENERAL_UID (AS_NUM_OPS_UID | AS_THROUGHPUT_UID | AS_LATENCY_UID)
+#define AS_GENERAL_NUM_GENES 7
+struct as_genes {
+ unsigned long read_expire;
+ unsigned long write_expire;
+ unsigned long read_batch_expire;
+ unsigned long write_batch_expire;
+ unsigned long antic_expire;
+ unsigned long max_thinktime;
+ unsigned long nr_requests;
+};
+
+gene_param_t as_gene_param[AS_GENERAL_NUM_GENES] = {
+ { HZ/16, 3*HZ/16, default_read_expire, 0}, /* read_expire */
+ { HZ/8, 3*HZ/8, default_write_expire, 0}, /* write_expire */
+ { HZ/4, 3*HZ/4, default_read_batch_expire, 0}, /* read_batch_expire */
+ { HZ/16, 3*HZ/16, default_write_batch_expire, 0},/* write_batch_expire */
+// { HZ/300, HZ/100, default_antic_expire, 0}, /* default_antic_expire */
+ { 0, HZ/100, default_antic_expire, 0}, /* default_antic_expire */
+ { HZ/100, 3*HZ/100, MAX_THINKTIME, 0}, /* max_thinktime */
+ { BLKDEV_MIN_RQ, BLKDEV_MAX_RQ*30, BLKDEV_MAX_RQ, genetic_generic_iterative_mutate_gene} /* nr_requests */
+};
+
+extern void disk_stats_snapshot(phenotype_t * pt);
+extern unsigned long disk_num_ops_calc_fitness(genetic_child_t * child);
+extern unsigned long disk_throughput_calc_fitness(genetic_child_t * child);
+extern unsigned long disk_latency_calc_fitness(genetic_child_t * child);
+
+LIST_HEAD(as_data_list);
+#endif
+
struct as_data {
/*
* run time data
@@ -132,6 +224,9 @@ struct as_data {
unsigned long fifo_expire[2];
unsigned long batch_expire[2];
unsigned long antic_expire;
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+ struct list_head data_list;
+#endif
};
#define list_entry_fifo(ptr) list_entry((ptr), struct as_rq, fifo)
@@ -869,7 +964,7 @@ static void as_update_iohist(struct as_d
if (test_bit(AS_TASK_IORUNNING, &aic->state)
&& in_flight == 0) {
thinktime = jiffies - aic->last_end_request;
- thinktime = min(thinktime, MAX_THINKTIME-1);
+ thinktime = min(thinktime, max_thinktime-1);
} else
thinktime = 0;
as_update_thinktime(ad, aic, thinktime);
@@ -1854,6 +1949,11 @@ static void as_exit_queue(elevator_t *e)
mempool_destroy(ad->arq_pool);
put_io_context(ad->io_context);
+
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+ list_del(&ad->data_list);
+#endif
+
kfree(ad->hash);
kfree(ad);
}
@@ -1916,6 +2016,10 @@ static int as_init_queue(request_queue_t
if (ad->write_batch_count < 2)
ad->write_batch_count = 2;
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+ list_add_tail(&ad->data_list, &as_data_list);
+#endif
+
return 0;
}
@@ -2099,6 +2203,9 @@ static struct elevator_type iosched_as =
static int __init as_init(void)
{
int ret;
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+ genetic_t * genetic = 0;
+#endif
arq_pool = kmem_cache_create("as_arq", sizeof(struct as_rq),
0, 0, NULL, NULL);
@@ -2107,6 +2214,36 @@ static int __init as_init(void)
ret = elv_register(&iosched_as);
if (!ret) {
+
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+ as_stats_snapshot = (struct disk_stats_snapshot *)kmalloc(sizeof(struct disk_stats_snapshot), GFP_KERNEL);
+ if (!as_stats_snapshot)
+ panic("as: failed to malloc enough space");
+
+
+ ret = genetic_init(&genetic, AS_NUM_CHILDREN, 2 * HZ, "as-ioscheduler");
+ if (ret)
+ panic("as: failed to init genetic lib");
+
+ if(genetic_register_phenotype(genetic, &as_num_ops_genetic_ops, AS_NUM_CHILDREN,
+ "num_ops", AS_NUM_OPS_NUM_GENES, AS_NUM_OPS_UID))
+ panic("as: failed to register num_ops phenotype");
+
+ if(genetic_register_phenotype(genetic, &as_throughput_genetic_ops, AS_NUM_CHILDREN,
+ "throughput", AS_THROUGHPUT_NUM_GENES, AS_THROUGHPUT_UID))
+ panic("as: failed to register throughput phenotype");
+
+ if(genetic_register_phenotype(genetic, &as_latency_genetic_ops, AS_NUM_CHILDREN,
+ "latency", AS_LATENCY_NUM_GENES, AS_LATENCY_UID))
+ panic("as: failed to register latency phenotype");
+
+ if(genetic_register_phenotype(genetic, &as_general_genetic_ops, AS_NUM_CHILDREN,
+ "general", AS_GENERAL_NUM_GENES, AS_GENERAL_UID))
+ panic("as: failed to register general phenotype");
+
+ genetic_start(genetic);
+#endif
+
/*
* don't allow AS to get unregistered, since we would have
* to browse all tasks in the system and release their
@@ -2126,6 +2263,180 @@ static void __exit as_exit(void)
elv_unregister(&iosched_as);
}
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+
+static void as_num_ops_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = 0;
+ child->gene_param = 0;
+ child->num_genes = AS_NUM_OPS_NUM_GENES;
+ child->stats_snapshot = as_stats_snapshot;
+}
+
+static void as_throughput_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = 0;
+ child->gene_param = 0;
+ child->num_genes = AS_THROUGHPUT_NUM_GENES;
+ child->stats_snapshot = as_stats_snapshot;
+}
+
+static void as_latency_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = 0;
+ child->gene_param = 0;
+ child->num_genes = AS_LATENCY_NUM_GENES;
+ child->stats_snapshot = as_stats_snapshot;
+}
+
+/* need to create the genes for the child */
+static void as_general_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = (void *)kmalloc(sizeof(struct as_genes), GFP_KERNEL);
+ if (!child->genes)
+ panic("as_general_create_child: error mallocing space");
+
+ child->gene_param = as_gene_param;
+ child->num_genes = AS_GENERAL_NUM_GENES;
+ child->stats_snapshot = as_stats_snapshot;
+
+ genetic_create_child_spread(child, AS_NUM_CHILDREN-1);
+
+ ((struct as_genes *)child->genes)->nr_requests = BLKDEV_MAX_RQ;
+}
+
+static void as_shift_mutation_rate(phenotype_t * in_pt)
+{
+ struct list_head * p;
+ phenotype_t * pt;
+ int count = 0;
+ long rate = 0;
+
+ list_for_each(p, &in_pt->genetic->phenotype) {
+ pt = list_entry(p, phenotype_t, phenotype);
+
+ /* Look at everyone else that contributes to this
+ phenotype */
+ if (pt->uid & AS_GENERAL_UID && pt->uid != AS_GENERAL_UID) {
+
+ switch (pt->uid) {
+ case AS_NUM_OPS_UID:
+ case AS_THROUGHPUT_UID:
+ case AS_LATENCY_UID:
+ rate += pt->mutation_rate;
+ count++;
+ break;
+ default:
+ BUG();
+ }
+ }
+ }
+
+ /* If we are a general phenotype that is made up of other
+ phenotypes then we take the average */
+ if (count)
+ in_pt->mutation_rate = (rate / count);
+ else
+ BUG();
+}
+
+static void as_general_set_child_genes(void * in_genes)
+{
+ struct as_genes * genes = (struct as_genes *)in_genes;
+ struct list_head * d;
+ struct as_data * ad;
+
+ list_for_each(d, &as_data_list) {
+ ad = list_entry(d, struct as_data, data_list);
+ ad->fifo_expire[REQ_SYNC] = genes->read_expire;
+ ad->fifo_expire[REQ_ASYNC] = genes->write_expire;
+ ad->antic_expire = genes->antic_expire;
+
+ if (genes->read_batch_expire > genes->write_expire)
+ genes->read_batch_expire = genes->write_expire;
+ ad->batch_expire[REQ_SYNC] = genes->read_batch_expire;
+
+ if (genes->write_batch_expire > genes->read_expire)
+ genes->write_batch_expire = genes->read_expire;
+ ad->batch_expire[REQ_ASYNC] = genes->write_batch_expire;
+
+ ad->q->nr_requests = genes->nr_requests;
+ }
+ max_thinktime = genes->max_thinktime;
+
+}
+
+static void as_num_ops_calc_fitness(genetic_child_t * child)
+{
+ child->fitness = disk_num_ops_calc_fitness(child);
+}
+
+static void as_throughput_calc_fitness(genetic_child_t * child)
+{
+ child->fitness = disk_throughput_calc_fitness(child);
+}
+
+static void as_latency_calc_fitness(genetic_child_t * child)
+{
+ child->fitness = disk_latency_calc_fitness(child);
+}
+
+/* Make the general the one that takes into account all the fitness
+ * routines, since these are the common genes that effect everything.
+ */
+static void as_general_calc_post_fitness(phenotype_t * in_pt)
+{
+ struct list_head * p;
+ phenotype_t * pt;
+ genetic_t * genetic = in_pt->genetic;
+ int ranking[AS_NUM_CHILDREN];
+ int weight = 1;
+ int i;
+
+ memset(ranking, 0, sizeof(ranking));
+
+ list_for_each(p, &genetic->phenotype) {
+ pt = list_entry(p, phenotype_t, phenotype);
+
+ /* Look at everyone else that contributes to this
+ phenotype */
+ if (pt->uid & AS_GENERAL_UID && pt->uid != AS_GENERAL_UID) {
+
+ switch (pt->uid) {
+ case AS_NUM_OPS_UID:
+ weight = 2;
+ break;
+ case AS_THROUGHPUT_UID:
+ weight = 2;
+ break;
+ case AS_LATENCY_UID:
+ weight = 1;
+ break;
+ default:
+ BUG();
+ }
+
+ for (i = 0; i < pt->num_children; i++)
+ ranking[pt->child_ranking[i]->id] += (i * weight);
+ }
+ }
+
+ for (i = 0; i < in_pt->num_children; i++)
+ in_pt->child_ranking[i]->fitness = ranking[i];
+
+}
+
+#endif
+
+
module_init(as_init);
module_exit(as_exit);
_

View file

@ -0,0 +1,174 @@
Index: 2.6.11/drivers/block/genhd.c
===================================================================
--- 2.6.11.orig/drivers/block/genhd.c 2005-03-02 01:38:08.000000000 -0600
+++ 2.6.11/drivers/block/genhd.c 2005-04-15 11:35:40.763715300 -0500
@@ -31,6 +31,8 @@
char name[16];
} *major_names[MAX_PROBE_HASH];
+LIST_HEAD(gendisks);
+
/* index in the above - for now: assume no multimajor ranges */
static inline int major_to_index(int major)
{
@@ -589,6 +591,7 @@
kobj_set_kset_s(disk,block_subsys);
kobject_init(&disk->kobj);
rand_initialize_disk(disk);
+ list_add_tail(&disk->gendisks, &gendisks);
}
return disk;
}
Index: 2.6.11/drivers/block/ll_rw_blk.c
===================================================================
--- 2.6.11.orig/drivers/block/ll_rw_blk.c 2005-03-02 01:37:48.000000000 -0600
+++ 2.6.11/drivers/block/ll_rw_blk.c 2005-04-15 11:35:40.765716044 -0500
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/swap.h>
#include <linux/writeback.h>
+#include <linux/genetic.h>
/*
* for max sense size
@@ -2140,6 +2141,99 @@
__elv_add_request(q, req, ELEVATOR_INSERT_SORT, 0);
}
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+extern struct list_head gendisks;
+
+void disk_stats_snapshot(phenotype_t * pt)
+{
+ struct list_head * d;
+ struct gendisk *disk;
+ struct disk_stats_snapshot * ss = (struct disk_stats_snapshot *)pt->child_ranking[0]->stats_snapshot;
+
+ memset(ss, 0, sizeof(struct disk_stats_snapshot));
+
+ list_for_each(d, &gendisks) {
+ disk = list_entry(d, struct gendisk, gendisks);
+
+ disk_round_stats(disk);
+
+ ss->reads += disk_stat_read(disk, reads);
+ ss->writes += disk_stat_read(disk, writes);
+ ss->read_sectors += disk_stat_read(disk, read_sectors);
+ ss->write_sectors += disk_stat_read(disk, write_sectors);
+ ss->time_in_queue += disk_stat_read(disk, time_in_queue);
+ }
+}
+
+unsigned long disk_num_ops_calc_fitness(genetic_child_t * child)
+{
+ struct list_head * d;
+ struct gendisk *disk;
+ struct disk_stats_snapshot * ss = (struct disk_stats_snapshot *)child->stats_snapshot;
+ unsigned long reads = 0;
+ unsigned long writes = 0;
+
+ list_for_each(d, &gendisks) {
+ disk = list_entry(d, struct gendisk, gendisks);
+
+ disk_round_stats(disk);
+
+ reads += disk_stat_read(disk, reads);
+ writes += disk_stat_read(disk, writes);
+ }
+
+ reads -= ss->reads;
+ writes -= ss->writes;
+
+ return reads + writes;
+}
+
+unsigned long disk_throughput_calc_fitness(genetic_child_t * child)
+{
+ struct list_head * d;
+ struct gendisk *disk;
+ struct disk_stats_snapshot * ss = (struct disk_stats_snapshot *)child->stats_snapshot;
+ unsigned long read_sectors = 0;
+ unsigned long write_sectors = 0;
+
+ list_for_each(d, &gendisks) {
+ disk = list_entry(d, struct gendisk, gendisks);
+
+ disk_round_stats(disk);
+
+ read_sectors += disk_stat_read(disk, read_sectors);
+ write_sectors += disk_stat_read(disk, write_sectors);
+ }
+
+ read_sectors -= ss->read_sectors;
+ write_sectors -= ss->write_sectors;
+
+ return read_sectors + write_sectors;
+}
+
+unsigned long disk_latency_calc_fitness(genetic_child_t * child)
+{
+ struct list_head * d;
+ struct gendisk *disk;
+ struct disk_stats_snapshot * ss = (struct disk_stats_snapshot *)child->stats_snapshot;
+ unsigned long time_in_queue = 0;
+
+ list_for_each(d, &gendisks) {
+ disk = list_entry(d, struct gendisk, gendisks);
+
+ disk_round_stats(disk);
+
+ time_in_queue += disk_stat_read(disk, time_in_queue);
+ }
+
+ time_in_queue = -(time_in_queue - ss->time_in_queue);
+
+ return time_in_queue;
+}
+
+
+#endif /* GENETIC_IOSCHED_AS */
+
/*
* disk_round_stats() - Round off the performance stats on a struct
* disk_stats.
@@ -2162,7 +2256,6 @@
__disk_stat_add(disk, time_in_queue,
disk->in_flight * (now - disk->stamp));
disk->stamp = now;
-
if (disk->in_flight)
__disk_stat_add(disk, io_ticks, (now - disk->stamp_idle));
disk->stamp_idle = now;
Index: 2.6.11/include/linux/genhd.h
===================================================================
--- 2.6.11.orig/include/linux/genhd.h 2005-03-02 01:37:49.000000000 -0600
+++ 2.6.11/include/linux/genhd.h 2005-04-15 11:35:40.766716416 -0500
@@ -121,6 +121,7 @@
atomic_t sync_io; /* RAID */
unsigned long stamp, stamp_idle;
int in_flight;
+ struct list_head gendisks;
#ifdef CONFIG_SMP
struct disk_stats *dkstats;
#else
Index: 2.6.11/include/linux/blkdev.h
===================================================================
--- 2.6.11.orig/include/linux/blkdev.h 2005-03-02 01:37:50.000000000 -0600
+++ 2.6.11/include/linux/blkdev.h 2005-04-15 11:35:40.767716788 -0500
@@ -724,5 +724,16 @@
#define MODULE_ALIAS_BLOCKDEV_MAJOR(major) \
MODULE_ALIAS("block-major-" __stringify(major) "-*")
+#ifdef CONFIG_GENETIC_IOSCHED_AS
+
+struct disk_stats_snapshot
+{
+ unsigned long reads;
+ unsigned long writes;
+ unsigned long read_sectors;
+ unsigned long write_sectors;
+ unsigned long time_in_queue;
+};
+#endif /* CONFIG_GENETIC_IOSCHED_AS */
#endif

1190
genetic-lib-2.6.11-gl1.patch Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,820 @@
Index: 2.6.11/include/linux/sched.h
===================================================================
--- 2.6.11.orig/include/linux/sched.h 2005-04-15 10:53:39.650077696 -0500
+++ 2.6.11/include/linux/sched.h 2005-04-15 10:58:45.638199368 -0500
@@ -142,6 +142,19 @@
#include <linux/spinlock.h>
/*
+ * These are the 'tuning knobs' of the scheduler:
+ *
+ * Default configurable timeslice is 100 msecs, maximum configurable
+ * timeslice is 1000 msecs and minumum configurable timeslice is 1 jiffy.
+ * Timeslices get renewed on task creation, on wake up and after they expire.
+ */
+#define MIN_TIMESLICE 1
+#define DEF_TIMESLICE (100 * HZ / 1000)
+#define MAX_TIMESLICE (1000 * HZ / 1000)
+
+#define DEFAULT_UNPRIV_RT_THRESHOLD 10
+
+/*
* This serializes "schedule()" and also protects
* the run-queue from deletions/modifications (but
* _adding_ to the beginning of the run-queue has
@@ -557,6 +570,7 @@
unsigned long policy;
cpumask_t cpus_allowed;
unsigned long time_slice;
+ unsigned long time_slice_ran;
#ifdef CONFIG_SCHEDSTATS
struct sched_info sched_info;
@@ -822,6 +836,8 @@
extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
extern task_t *idle_task(int cpu);
+extern void genetic_cpu_sched_init(void);
+
void yield(void);
/*
@@ -1200,9 +1216,62 @@
}
#endif
+enum zaphod_mode_enum {
+ ZAPHOD_MODE_PRIORITY_BASED,
+ ZAPHOD_MODE_ENTITLEMENT_BASED
+};
+
+#ifdef CONFIG_GENETIC_ZAPHOD_CPU_SCHED
extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
+
+#define ZAPHOD_SCHED_NUM_GENES 9
+#define ZAPHOD_SCHED_NUM_CHILDREN 8
+//#define ZAPHOD_SCHED_CHILD_LIFESPAN (9 * (HZ / 2))
+#define ZAPHOD_SCHED_CHILD_LIFESPAN (4 * HZ)
+//#define ZAPHOD_SCHED_CHILD_LIFESPAN (6 * HZ)
+
+struct zaphod_rt_genes {
+ unsigned long sched_rr_time_slice;
+};
+struct zaphod_intr_genes {
+ unsigned long ia_threshold;
+ unsigned long cpu_hog_threshold;
+};
+
+struct zaphod_fork_genes {
+ unsigned long initial_ia_bonus;
+};
+
+struct zaphod_general_genes {
+ unsigned long time_slice;
+ unsigned long max_ia_bonus;
+ unsigned long max_tpt_bonus;
+ unsigned long bgnd_time_slice_multiplier;
+ unsigned long zaphod_mode;
+};
+
+struct zaphod_stats_snapshot {
+ /* from struct runq_cpustats */
+ unsigned long long total_delay;
+ unsigned long long total_rt_delay;
+ unsigned long long total_intr_delay;
+ unsigned long long total_rt_intr_delay;
+ unsigned long long total_fork_delay;
+
+ /* from struct cpu_cpustats */
+ unsigned long long nr_switches;
+
+#ifdef CONFIG_SCHEDSTATS
+ /* from sched_info */
+ unsigned long cpu_time;
+ unsigned long run_delay;
+#endif
+};
+
+#endif /* CONFIG_GENETIC_ZAPHOD_CPU_SCHED */
+
#ifdef CONFIG_MAGIC_SYSRQ
extern void normalize_rt_tasks(void);
Index: 2.6.11/kernel/sched.c
===================================================================
--- 2.6.11.orig/kernel/sched.c 2005-04-15 10:53:39.659081044 -0500
+++ 2.6.11/kernel/sched.c 2005-04-15 10:58:45.642200856 -0500
@@ -45,6 +45,7 @@
#include <linux/seq_file.h>
#include <linux/syscalls.h>
#include <linux/times.h>
+#include <linux/genetic.h>
#include <asm/tlb.h>
#include <asm/unistd.h>
@@ -59,25 +60,13 @@
#define TASK_NICE(p) PRIO_TO_NICE((p)->static_prio)
/*
- * These are the 'tuning knobs' of the scheduler:
- *
- * Default configurable timeslice is 100 msecs, maximum configurable
- * timeslice is 1000 msecs and minumum configurable timeslice is 1 jiffy.
- * Timeslices get renewed on task creation, on wake up and after they expire.
- */
-#define MIN_TIMESLICE 1
-#define DEF_TIMESLICE (100 * HZ / 1000)
-#define MAX_TIMESLICE (1000 * HZ / 1000)
-
-/*
* UNPRIV_RT tasks that have a CPU usage rate less than this threshold
* (in parts per thousand) are treated as psuedo RT tasks
*/
-#define DEFAULT_UNPRIV_RT_THRESHOLD 10
unsigned long unpriv_rt_threshold = PROP_FM_PPT(DEFAULT_UNPRIV_RT_THRESHOLD);
unsigned long time_slice = DEF_TIMESLICE;
-static unsigned long sched_rr_time_slice = (100 * HZ / 1000);
+unsigned long sched_rr_time_slice = (100 * HZ / 1000);
/*
* Background tasks may have longer time slices as compensation
@@ -116,6 +105,11 @@
struct list_head queue;
};
+#define cpu_rq(cpu) (&per_cpu(runqueues, (cpu)))
+#define this_rq() (&__get_cpu_var(runqueues))
+#define task_rq(p) ((p)->rq)
+#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
+
/*
* This is the main, per-CPU runqueue data structure.
*
@@ -211,11 +205,6 @@
#define for_each_domain(cpu, domain) \
for (domain = cpu_rq(cpu)->sd; domain; domain = domain->parent)
-#define cpu_rq(cpu) (&per_cpu(runqueues, (cpu)))
-#define this_rq() (&__get_cpu_var(runqueues))
-#define task_rq(p) ((p)->rq)
-#define cpu_curr(cpu) (cpu_rq(cpu)->curr)
-
#ifdef CONFIG_SMP
void fastcall set_task_cpu(struct task_struct *p, unsigned int cpu)
{
@@ -670,6 +659,7 @@
recalc_task_prio(p, now);
p->time_slice = task_timeslice(p);
+ p->time_slice_ran = 0;
p->flags &= ~PF_UISLEEP;
__activate_task(p);
}
@@ -1156,6 +1146,7 @@
* Give the task a new timeslice.
*/
p->time_slice = task_timeslice(p);
+ p->time_slice_ran = 0;
now = sched_clock();
local_irq_enable();
/*
@@ -1222,7 +1213,7 @@
* No more timeslice fiddling on exit
* (Optionally) log scheduler statistics at exit.
*/
-static int log_at_exit = 0;
+int log_at_exit = 0;
void fastcall sched_exit(task_t * p)
{
struct task_cpustats stats;
@@ -2167,6 +2158,19 @@
}
}
+#ifdef CONFIG_GENETIC_ZAPHOD_CPU_SCHED
+static inline void genetic_fixup_timeslice(task_t * p)
+{
+ unsigned long tmp_timeslice = task_timeslice(p);
+
+ if (p->time_slice > tmp_timeslice)
+ p->time_slice = tmp_timeslice;
+
+ if (++p->time_slice_ran > tmp_timeslice)
+ p->time_slice = 1;
+}
+#endif
+
/*
* Do the virtual profiling signal calculations.
* @p: the process that the cpu time gets accounted to
@@ -2324,6 +2328,10 @@
goto out;
spin_lock(&rq->lock);
+
+#ifdef CONFIG_GENETIC_ZAPHOD_CPU_SCHED
+ genetic_fixup_timeslice(p);
+#endif
/*
* The task was running during this tick
*/
@@ -2338,6 +2346,7 @@
p->prio = effective_prio(p);
p->time_slice = task_timeslice(p);
}
+ p->time_slice_ran = 0;
enqueue_task(p);
}
spin_unlock(&rq->lock);
@@ -5173,3 +5182,174 @@
{ .ctl_name = CPU_SCHED_END_OF_LIST }
};
#endif
+
+#ifdef CONFIG_GENETIC_ZAPHOD_CPU_SCHED
+
+extern unsigned int max_ia_bonus;
+extern unsigned long ia_threshold;
+extern unsigned long cpu_hog_threshold;
+extern unsigned int initial_ia_bonus;
+extern unsigned int max_tpt_bonus;
+extern enum zaphod_mode_enum zaphod_mode;
+
+void zaphod_rt_set_child_genes(void * in_genes)
+{
+ struct zaphod_rt_genes * genes = (struct zaphod_rt_genes *)in_genes;
+
+ sched_rr_time_slice = genes->sched_rr_time_slice;
+}
+
+void zaphod_intr_set_child_genes(void * in_genes)
+{
+ struct zaphod_intr_genes * genes = (struct zaphod_intr_genes *)in_genes;
+
+ ia_threshold = ppt_to_proportion(genes->ia_threshold);
+ cpu_hog_threshold = ppt_to_proportion(genes->cpu_hog_threshold);
+}
+
+void zaphod_fork_set_child_genes(void * in_genes)
+{
+ struct zaphod_fork_genes * genes = (struct zaphod_fork_genes *)in_genes;
+
+ initial_ia_bonus = genes->initial_ia_bonus;
+}
+
+void zaphod_general_set_child_genes(void * in_genes)
+{
+ struct zaphod_general_genes * genes = (struct zaphod_general_genes *)in_genes;
+
+ time_slice = genes->time_slice;
+ base_prom_interval = ((time_slice * 15) / 10);
+ max_ia_bonus = genes->max_ia_bonus;
+ max_tpt_bonus = genes->max_tpt_bonus;
+ bgnd_time_slice_multiplier = genes->bgnd_time_slice_multiplier;
+ zaphod_mode = genes->zaphod_mode;
+
+}
+
+/* Just have the general phenotype take the whole snapshot */
+void zaphod_general_take_snapshot(phenotype_t * pt)
+{
+ struct runq_cpustats * csrq;
+ struct zaphod_stats_snapshot * ss = (struct zaphod_stats_snapshot *)pt->child_ranking[0]->stats_snapshot;
+#ifdef CONFIG_SCHEDSTATS
+ runqueue_t * rq;
+#endif
+ int cpu;
+
+ memset(ss, 0, sizeof(struct zaphod_stats_snapshot));
+
+ /* Get snapshot for this child */
+ for_each_online_cpu(cpu) {
+ csrq = cpu_runq_cpustats(cpu);
+
+ ss->total_delay += csrq->total_delay;
+ ss->total_rt_delay += csrq->total_rt_delay;
+ ss->total_intr_delay += csrq->total_intr_delay;
+ ss->total_rt_intr_delay += csrq->total_rt_intr_delay;
+ ss->total_fork_delay += csrq->total_fork_delay;
+
+ }
+
+#ifdef CONFIG_SCHEDSTATS
+ for_each_online_cpu(cpu) {
+ rq = cpu_rq(cpu);
+
+ ss->cpu_time += rq->rq_sched_info.cpu_time;
+ ss->run_delay += rq->rq_sched_info.run_delay;
+ }
+#endif
+
+ ss->nr_switches += nr_context_switches();
+
+
+
+}
+
+void zaphod_rt_calc_fitness(genetic_child_t * child)
+{
+
+ struct zaphod_stats_snapshot * ss = (struct zaphod_stats_snapshot *)child->stats_snapshot;
+ struct runq_cpustats *csrq;
+ long long total_rt_delay = 0;
+ int cpu;
+
+ for_each_online_cpu(cpu) {
+ csrq = cpu_runq_cpustats(cpu);
+
+ total_rt_delay += csrq->total_rt_delay;
+ }
+ child->fitness = -(total_rt_delay - ss->total_rt_delay);
+
+}
+
+void zaphod_intr_calc_fitness(genetic_child_t * child)
+{
+ struct zaphod_stats_snapshot * ss = (struct zaphod_stats_snapshot *)child->stats_snapshot;
+ struct runq_cpustats *csrq;
+ long long total_intr_delay = 0;
+ int cpu;
+
+ for_each_online_cpu(cpu) {
+ csrq = cpu_runq_cpustats(cpu);
+
+ total_intr_delay += csrq->total_intr_delay;
+ }
+ child->fitness = -(total_intr_delay - ss->total_intr_delay);
+
+}
+
+void zaphod_fork_calc_fitness(genetic_child_t * child)
+{
+ struct zaphod_stats_snapshot * ss = (struct zaphod_stats_snapshot *)child->stats_snapshot;
+ struct runq_cpustats *csrq;
+ long long total_fork_delay = 0;
+ int cpu;
+
+ for_each_online_cpu(cpu) {
+ csrq = cpu_runq_cpustats(cpu);
+
+ total_fork_delay += csrq->total_fork_delay;
+ }
+ child->fitness = -(total_fork_delay - ss->total_fork_delay);
+
+}
+
+void zaphod_total_delay_calc_fitness(genetic_child_t * child)
+{
+ struct zaphod_stats_snapshot * ss = (struct zaphod_stats_snapshot *)child->stats_snapshot;
+ struct runq_cpustats *csrq;
+ long long total_delay = 0;
+ long long total_rt_delay = 0;
+ long long total_intr_delay = 0;
+ long long total_rt_intr_delay = 0;
+ int cpu;
+
+ for_each_online_cpu(cpu) {
+ csrq = cpu_runq_cpustats(cpu);
+
+ total_delay += csrq->total_delay;
+ total_intr_delay += csrq->total_intr_delay;
+ total_rt_delay += csrq->total_rt_delay;
+ total_rt_intr_delay += csrq->total_rt_intr_delay;
+ }
+
+ /* get delta */
+ total_delay -= ss->total_delay;
+ total_rt_delay -= ss->total_rt_delay;
+ total_intr_delay -= ss->total_intr_delay;
+ total_rt_intr_delay -= ss->total_rt_intr_delay;
+
+ child->fitness = -(total_delay - total_rt_delay - (total_intr_delay - total_rt_intr_delay));
+
+}
+
+void zaphod_context_switches_calc_fitness(genetic_child_t * child)
+{
+ struct zaphod_stats_snapshot * ss = (struct zaphod_stats_snapshot *)child->stats_snapshot;
+
+ child->fitness = -(nr_context_switches() - ss->nr_switches);
+}
+
+#endif /* CONFIG_GENETIC_ZAPHOD_CPU_SCHED */
+
Index: 2.6.11/kernel/sched_zaphod.c
===================================================================
--- 2.6.11.orig/kernel/sched_zaphod.c 2005-04-15 10:53:39.661081788 -0500
+++ 2.6.11/kernel/sched_zaphod.c 2005-04-15 10:58:45.643201228 -0500
@@ -21,9 +21,13 @@
*/
#include <linux/sched.h>
#include <linux/proc_fs.h>
+#include <linux/genetic.h>
+#include <linux/random.h>
#include <asm/uaccess.h>
+enum zaphod_mode_enum zaphod_mode = ZAPHOD_MODE_PRIORITY_BASED;
+
#ifdef CONFIG_CPUSCHED_ZAPHOD
#define MAX_PRIO ZAPHOD_MAX_PRIO
#define MIN_NORMAL_PRIO ZAPHOD_MIN_NORMAL_PRIO
@@ -42,13 +46,6 @@
#define EB_YARDSTICK_DECAY_INTERVAL 100
-enum zaphod_mode_enum {
- ZAPHOD_MODE_PRIORITY_BASED,
- ZAPHOD_MODE_ENTITLEMENT_BASED
-};
-
-static enum zaphod_mode_enum zaphod_mode = ZAPHOD_MODE_PRIORITY_BASED;
-
#ifdef CONFIG_SYSCTL
static const char *zaphod_mode_names[] = {
"pb", /* ZAPHOD_MODE_PRIORITY_BASED */
@@ -446,6 +443,353 @@
calculate_pre_bonus_priority(p);
}
+#ifdef CONFIG_GENETIC_ZAPHOD_CPU_SCHED
+
+extern unsigned long sched_rr_time_slice;
+extern unsigned long base_prom_interval;
+static void zaphod_rt_create_child(genetic_child_t *);
+static void zaphod_intr_create_child(genetic_child_t *);
+static void zaphod_fork_create_child(genetic_child_t *);
+static void zaphod_total_delay_create_child(genetic_child_t *);
+static void zaphod_context_switches_create_child(genetic_child_t *);
+static void zaphod_general_create_child(genetic_child_t *);
+static void zaphod_shift_mutation_rate(phenotype_t * in_pt);
+
+void zaphod_rt_set_child_genes(void *);
+void zaphod_intr_set_child_genes(void *);
+void zaphod_fork_set_child_genes(void *);
+void zaphod_general_set_child_genes(void *);
+
+void zaphod_rt_calc_fitness(genetic_child_t *);
+void zaphod_intr_calc_fitness(genetic_child_t *);
+void zaphod_fork_calc_fitness(genetic_child_t *);
+void zaphod_total_delay_calc_fitness(genetic_child_t *);
+void zaphod_context_switches_calc_fitness(genetic_child_t *);
+
+void zaphod_general_calc_post_fitness(phenotype_t *);
+
+void zaphod_general_take_snapshot(phenotype_t *);
+
+/* For real-time tasks */
+struct genetic_ops zaphod_rt_genetic_ops = {
+ .create_child = zaphod_rt_create_child,
+ .set_child_genes = zaphod_rt_set_child_genes,
+ .calc_fitness = zaphod_rt_calc_fitness,
+ .combine_genes = genetic_generic_combine_genes,
+ .mutate_child = genetic_generic_mutate_child,
+};
+
+/* For interactivity */
+struct genetic_ops zaphod_intr_genetic_ops = {
+ .create_child = zaphod_intr_create_child,
+ .set_child_genes = zaphod_intr_set_child_genes,
+ .calc_fitness = zaphod_intr_calc_fitness,
+ .combine_genes = genetic_generic_combine_genes,
+ .mutate_child = genetic_generic_mutate_child,
+};
+
+/* For new processes */
+struct genetic_ops zaphod_fork_genetic_ops = {
+ .create_child = zaphod_fork_create_child,
+ .set_child_genes = zaphod_fork_set_child_genes,
+ .calc_fitness = zaphod_fork_calc_fitness,
+ .combine_genes = genetic_generic_combine_genes,
+ .mutate_child = genetic_generic_mutate_child,
+};
+
+/* For total delay */
+struct genetic_ops zaphod_total_delay_genetic_ops = {
+ .create_child = zaphod_total_delay_create_child,
+ .calc_fitness = zaphod_total_delay_calc_fitness,
+};
+
+/* For context switches */
+struct genetic_ops zaphod_context_switches_genetic_ops = {
+ .create_child = zaphod_context_switches_create_child,
+ .calc_fitness = zaphod_context_switches_calc_fitness,
+};
+
+/* For general genes */
+struct genetic_ops zaphod_general_genetic_ops = {
+ .create_child = zaphod_general_create_child,
+ .set_child_genes = zaphod_general_set_child_genes,
+ .combine_genes = genetic_generic_combine_genes,
+ .mutate_child = genetic_generic_mutate_child,
+ .calc_post_fitness = zaphod_general_calc_post_fitness,
+ .take_snapshot = zaphod_general_take_snapshot,
+ .shift_mutation_rate = zaphod_shift_mutation_rate
+};
+
+#define ZAPHOD_RT_UID 1
+#define ZAPHOD_RT_NUM_GENES 1
+gene_param_t zaphod_rt_gene_param[ZAPHOD_RT_NUM_GENES] = {
+ { MIN_TIMESLICE, MAX_TIMESLICE, (100 * HZ / 1000), 0 }, /* sched_rr_time_slice */
+};
+
+#define ZAPHOD_INTR_UID 2
+#define ZAPHOD_INTR_NUM_GENES 2
+#if 1
+gene_param_t zaphod_intr_gene_param[ZAPHOD_INTR_NUM_GENES] = {
+ { 0, 1000, DEFAULT_IA_THRESHOLD, genetic_generic_iterative_mutate_gene }, /* ia_threshold */
+ { 0, 1000, DEFAULT_CPU_HOG_THRESHOLD, genetic_generic_iterative_mutate_gene }, /* cpu_hog_threshold */
+};
+#else
+gene_param_t zaphod_intr_gene_param[ZAPHOD_INTR_NUM_GENES] = {
+ { 0, 1000, DEFAULT_IA_THRESHOLD, 0 }, /* ia_threshold */
+ { 0, 1000, DEFAULT_CPU_HOG_THRESHOLD, 0 }, /* cpu_hog_threshold */
+};
+#endif
+
+#define ZAPHOD_FORK_UID 4
+#define ZAPHOD_FORK_NUM_GENES 1
+gene_param_t zaphod_fork_gene_param[ZAPHOD_FORK_NUM_GENES] = {
+ { 0, MAX_MAX_IA_BONUS, 1, 0 }, /* initial_ia_bonus */
+};
+
+#define ZAPHOD_TOTAL_DELAY_UID 8
+#define ZAPHOD_TOTAL_DELAY_NUM_GENES 0
+
+#define ZAPHOD_CONTEXT_SWITCHES_UID 16
+#define ZAPHOD_CONTEXT_SWITCHES_NUM_GENES 0
+
+#define ZAPHOD_GENERAL_UID (ZAPHOD_CONTEXT_SWITCHES_UID | ZAPHOD_TOTAL_DELAY_UID | ZAPHOD_INTR_UID | ZAPHOD_RT_UID)
+#define ZAPHOD_GENERAL_NUM_GENES 5
+#if 0
+gene_param_t zaphod_general_gene_param[ZAPHOD_GENERAL_NUM_GENES] = {
+ { MIN_TIMESLICE, MAX_TIMESLICE, DEF_TIMESLICE, genetic_generic_iterative_mutate_gene }, /* time_slice */
+ { 0, MAX_MAX_IA_BONUS, DEFAULT_MAX_IA_BONUS, 0 }, /* max_ia_bonus */
+ { 0, MAX_MAX_TPT_BONUS, DEFAULT_MAX_TPT_BONUS, 0 }, /* max_tpt_bonus */
+ { 1, 100, 1, genetic_generic_iterative_mutate_gene }, /* bgnd_time_slice_multiplier */
+ { 0, 1, 0, 0 }, /* zaphod_mode */
+};
+#else
+gene_param_t zaphod_general_gene_param[ZAPHOD_GENERAL_NUM_GENES] = {
+ { MIN_TIMESLICE, MAX_TIMESLICE, DEF_TIMESLICE, 0 }, /* time_slice */
+ { 0, MAX_MAX_IA_BONUS, DEFAULT_MAX_IA_BONUS, 0 }, /* max_ia_bonus */
+ { 0, MAX_MAX_TPT_BONUS, DEFAULT_MAX_TPT_BONUS, 0 }, /* max_tpt_bonus */
+ { 1, 100, 1, genetic_generic_iterative_mutate_gene }, /* bgnd_time_slice_multiplier */
+ { 0, 1, 0, 0 }, /* zaphod_mode */
+};
+#endif
+
+struct zaphod_stats_snapshot * zaphod_stats_snapshot;
+
+static int __init genetic_zaphod_sched_init(void)
+{
+ genetic_t * genetic = 0;
+
+ zaphod_stats_snapshot = (struct zaphod_stats_snapshot *)kmalloc(sizeof(struct zaphod_stats_snapshot), GFP_KERNEL);
+ if (!zaphod_stats_snapshot)
+ panic("zaphod sched: failed to malloc enough space");
+
+ if(genetic_init(&genetic, ZAPHOD_SCHED_NUM_CHILDREN, ZAPHOD_SCHED_CHILD_LIFESPAN,
+ "zaphod-sched"))
+ panic("zaphod sched: failed to init genetic lib");
+
+ if(genetic_register_phenotype(genetic, &zaphod_rt_genetic_ops, ZAPHOD_SCHED_NUM_CHILDREN,
+ "real-time-tasks", ZAPHOD_RT_NUM_GENES, ZAPHOD_RT_UID))
+ panic("zaphod sched: failed to register real-time tasks phenotype");
+
+ if(genetic_register_phenotype(genetic, &zaphod_intr_genetic_ops, ZAPHOD_SCHED_NUM_CHILDREN,
+ "interactiveness", ZAPHOD_INTR_NUM_GENES, ZAPHOD_INTR_UID))
+ panic("zaphod sched: failed to register interactiveness phenotype");
+
+ if(genetic_register_phenotype(genetic, &zaphod_fork_genetic_ops, ZAPHOD_SCHED_NUM_CHILDREN,
+ "initial-interactiveness", ZAPHOD_FORK_NUM_GENES, ZAPHOD_FORK_UID))
+ panic("zaphod sched: failed to register initial-interactiveness phenotype");
+
+ if(genetic_register_phenotype(genetic, &zaphod_total_delay_genetic_ops, ZAPHOD_SCHED_NUM_CHILDREN,
+ "total-delay", ZAPHOD_TOTAL_DELAY_NUM_GENES, ZAPHOD_TOTAL_DELAY_UID))
+ panic("zaphod sched: failed to register total-delay phenotype");
+
+ if(genetic_register_phenotype(genetic, &zaphod_context_switches_genetic_ops, ZAPHOD_SCHED_NUM_CHILDREN,
+ "context-switches", ZAPHOD_CONTEXT_SWITCHES_NUM_GENES, ZAPHOD_CONTEXT_SWITCHES_UID))
+ panic("zaphod sched: failed to register context-switches phenotype");
+
+ if(genetic_register_phenotype(genetic, &zaphod_general_genetic_ops, ZAPHOD_SCHED_NUM_CHILDREN,
+ "general", ZAPHOD_GENERAL_NUM_GENES, ZAPHOD_GENERAL_UID))
+ panic("zaphod sched: failed to register general phenotype");
+
+ genetic_start(genetic);
+
+ return 0;
+}
+
+void zaphod_rt_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = (void *)kmalloc(sizeof(struct zaphod_rt_genes), GFP_KERNEL);
+ if (!child->genes)
+ panic("zaphod_rt_create_child: error kmalloc'n space");
+
+ child->gene_param = zaphod_rt_gene_param;
+ child->num_genes = ZAPHOD_RT_NUM_GENES;
+ child->stats_snapshot = zaphod_stats_snapshot;
+
+// genetic_create_child_spread(child, ZAPHOD_SCHED_NUM_CHILDREN);
+ genetic_create_child_defaults(child);
+
+}
+
+void zaphod_intr_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = (void *)kmalloc(sizeof(struct zaphod_intr_genes), GFP_KERNEL);
+ if (!child->genes)
+ panic("zaphod_intr_create_child: error kmalloc'n space");
+
+ child->gene_param = zaphod_intr_gene_param;
+ child->num_genes = ZAPHOD_INTR_NUM_GENES;
+ child->stats_snapshot = zaphod_stats_snapshot;
+
+// genetic_create_child_spread(child, ZAPHOD_SCHED_NUM_CHILDREN);
+ genetic_create_child_defaults(child);
+}
+
+void zaphod_fork_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = (void *)kmalloc(sizeof(struct zaphod_fork_genes), GFP_KERNEL);
+ if (!child->genes)
+ panic("zaphod_fork_create_child: error kmalloc'n space");
+
+ child->gene_param = zaphod_fork_gene_param;
+ child->num_genes = ZAPHOD_FORK_NUM_GENES;
+ child->stats_snapshot = zaphod_stats_snapshot;
+
+// genetic_create_child_spread(child, ZAPHOD_SCHED_NUM_CHILDREN);
+ genetic_create_child_defaults(child);
+}
+
+void zaphod_total_delay_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = 0;
+ child->gene_param = 0;
+ child->num_genes = 0;
+ child->stats_snapshot = zaphod_stats_snapshot;
+}
+
+void zaphod_context_switches_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = 0;
+ child->gene_param = 0;
+ child->num_genes = 0;
+ child->stats_snapshot = zaphod_stats_snapshot;
+}
+
+void zaphod_general_create_child(genetic_child_t * child)
+{
+ BUG_ON(!child);
+
+ child->genes = (void *)kmalloc(sizeof(struct zaphod_general_genes), GFP_KERNEL);
+ if (!child->genes)
+ panic("zaphod_general_create_child: error kmalloc'n space");
+
+ child->gene_param = zaphod_general_gene_param;
+ child->num_genes = ZAPHOD_GENERAL_NUM_GENES;
+ child->stats_snapshot = zaphod_stats_snapshot;
+
+ genetic_create_child_spread(child, ZAPHOD_SCHED_NUM_CHILDREN);
+// genetic_create_child_defaults(child);
+}
+
+
+static void zaphod_shift_mutation_rate(phenotype_t * in_pt)
+{
+ struct list_head * p;
+ phenotype_t * pt;
+ int count = 0;
+ long rate = 0;
+
+ list_for_each(p, &in_pt->genetic->phenotype) {
+ pt = list_entry(p, phenotype_t, phenotype);
+
+ /* Look at everyone else that contributes to this
+ phenotype */
+ if (pt->uid & ZAPHOD_GENERAL_UID && pt->uid != ZAPHOD_GENERAL_UID) {
+
+ switch (pt->uid) {
+ case ZAPHOD_RT_UID:
+ break;
+ case ZAPHOD_CONTEXT_SWITCHES_UID:
+ break;
+ case ZAPHOD_INTR_UID:
+ case ZAPHOD_TOTAL_DELAY_UID:
+ rate += pt->mutation_rate;
+ count++;
+ break;
+ default:
+ BUG();
+ }
+ }
+ }
+
+ /* If we are a general phenotype that is made up of other
+ phenotypes then we take the average */
+ if (count)
+ in_pt->mutation_rate = (rate / count);
+ else
+ BUG();
+}
+
+
+/* Make the general the one that takes into account all the fitness
+ * routines, since these are the common genes that effect everything.
+ */
+void zaphod_general_calc_post_fitness(phenotype_t * in_pt)
+{
+ struct list_head * p;
+ phenotype_t * pt;
+ genetic_t * genetic = in_pt->genetic;
+ int ranking[ZAPHOD_SCHED_NUM_CHILDREN];
+ int weight = 1;
+ int i;
+
+ memset(ranking, 0, sizeof(ranking));
+
+ list_for_each(p, &genetic->phenotype) {
+ pt = list_entry(p, phenotype_t, phenotype);
+
+ /* Look at everyone else that contributes to this
+ phenotype */
+ if (pt->uid & ZAPHOD_GENERAL_UID && pt->uid != ZAPHOD_GENERAL_UID) {
+
+ switch (pt->uid) {
+ case ZAPHOD_RT_UID:
+ case ZAPHOD_CONTEXT_SWITCHES_UID:
+ weight = 1;
+ break;
+ case ZAPHOD_INTR_UID:
+ weight = 2;
+ break;
+ case ZAPHOD_TOTAL_DELAY_UID:
+ weight = 3;
+ break;
+ default:
+ BUG();
+ }
+
+ for (i = 0; i < pt->num_children; i++)
+ ranking[pt->child_ranking[i]->id] += (i * weight);
+ }
+ }
+
+ for (i = 0; i < in_pt->num_children; i++)
+ in_pt->child_ranking[i]->fitness = ranking[i];
+
+}
+
+core_initcall(genetic_zaphod_sched_init);
+
+#endif /* CONFIG_GENETIC_ZAPHOD_CPU_SCHED */
+
#if defined(CONFIG_SYSCTL)
static const unsigned int zero = 0;
@@ -456,6 +800,8 @@
{
int res;
+ BUG_ON(zaphod_mode >= 2);
+
strcpy(current_zaphod_mode, zaphod_mode_names[zaphod_mode]);
res = proc_dostring(ctp, write, fp, buffer, lenp, ppos);
Index: 2.6.11/lib/Kconfig
===================================================================
--- 2.6.11.orig/lib/Kconfig 2005-04-15 10:58:26.263606416 -0500
+++ 2.6.11/lib/Kconfig 2005-04-15 10:58:45.644201600 -0500
@@ -36,6 +36,14 @@
This option will build in a genetic library that will tweak
kernel parameters autonomically to improve performance.
+config GENETIC_ZAPHOD_CPU_SCHED
+ bool "Genetic Library - Zaphod CPU scheduler"
+ depends on GENETIC_LIB && EXPERIMENTAL
+ select SCHEDSTATS
+ help
+ This option will enable the genetic library on the zaphod
+ CPU scheduler.
+
#
# compression support is select'ed if needed
#

BIN
ols2005v1-pages-335-346.pdf Normal file

Binary file not shown.

3918
zaphod-v6.2.patch Normal file

File diff suppressed because it is too large Load diff