-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign the
Task
struct to reduce lock contention (#433)
* Move a Task's `ExitValue` out of its `RunState` so that `RunState` can be separately accessed atomically. * Move immutable fields into `Task` and mutable fields into `TaskInner` (excluding atomic fields), which reduces lock contention. Most fields can now be accessed without acquiring locks. * Use properly-aligned and -sized atomic types such that native atomic instructions are actually used. For this, we switch from `atomic::Atomic` to `crossbeam_utils::atomic::AtomicCell` since it actually compiles down to native atomics. * Statically assert that all types wrapped in `AtomicCell` actually use native atomic instructions. * The `runstate` and `running_on_cpu` fields of `Task` are now atomically accessible in a lock-free manner. This is beneficial for blocking/unblocking tasks in a lock-free context, e.g., within an interrupt handler. * Remove now-unnecessary unsafe statements from `schedule()` df721e3
- Loading branch information
1 parent
982ddd4
commit 78696d4
Showing
125 changed files
with
1,307 additions
and
1,008 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `APIC_SPURIOUS_INTERRUPT_VECTOR` constant in crate `apic`."><meta name="keywords" content="rust, rustlang, rust-lang, APIC_SPURIOUS_INTERRUPT_VECTOR"><title>APIC_SPURIOUS_INTERRUPT_VECTOR in apic - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><script src="../crates.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg"> | ||
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png"> | ||
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc constant"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../apic/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><p class="location"><a href="index.html">apic</a></p><div id="sidebar-vars" data-name="APIC_SPURIOUS_INTERRUPT_VECTOR" data-ty="constant" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" id="help-button">?</button> | ||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">apic</a>::<wbr><a class="constant" href="">APIC_SPURIOUS_INTERRUPT_VECTOR</a><button id="copy-path" onclick="copy_path(this)"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/apic/lib.rs.html#180" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const APIC_SPURIOUS_INTERRUPT_VECTOR: u32 = 0xFF;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="apic" data-search-index-js="../search-index.js" data-search-js="../search.js"></div> | ||
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Constant <a href="index.html">apic</a>::<wbr><a class="constant" href="">APIC_SPURIOUS_INTERRUPT_VECTOR</a><button id="copy-path" onclick="copy_path(this)"><img src="../clipboard.svg" width="19" height="18" alt="Copy item import"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../src/apic/lib.rs.html#183" title="goto source code">[src]</a></span></h1><pre class="rust const">pub const APIC_SPURIOUS_INTERRUPT_VECTOR: u32 = 0xFF;</pre></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="apic" data-search-index-js="../search-index.js" data-search-js="../search.js"></div> | ||
<script src="../main.js"></script></body></html> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.