diff --git a/LKM.svg b/LKM.svg
index 6978183..fa87350 100644
--- a/LKM.svg
+++ b/LKM.svg
@@ -1,5 +1,4 @@
-
diff --git a/Linux_kernel_diagram.dot b/Linux_kernel_diagram.dot
index 634ba50..18f73a5 100644
--- a/Linux_kernel_diagram.dot
+++ b/Linux_kernel_diagram.dot
@@ -1,399 +1,427 @@
-digraph matrix {
- graph [newrank=true,
- nodesep=0.3,
- ranksep=0.2,
- overlap=true,
- splines=false,
- ];
- node [fixedsize=false,
- fontname=Ubuntu
- fontsize=24,
- height=1,
- shape=box,
- style="filled,setlinewidth(5)",
- width=2.2
- ];
- edge [arrowhead=none,
- arrowsize=0.5,
- labelfontname="Ubuntu",
- weight=10,
- style="filled,setlinewidth(5)"
- ];
- {
- node [color="#e27dd6ff"];
- system_ [color="#e27dd6ff",
- fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- shape=point
- ];
- system [color="#e27dd6ff",
- URL="https://en.wikibooks.org/wiki/The_Linux_Kernel/System",
- fillcolor=white,
- fixedsize=true,
- height=0.6,
- row=func,
- width=2];
- system -> system_ [arrowhead="",
- color="#e27dd6ff",
- row=func]
- SCI [color="#e27dd6ff",
- URL="https://en.wikibooks.org/wiki/The_Linux_Kernel/Syscalls",
- fillcolor="#d9e7ee",
- fixedsize=true,
- label="System calls",
- row=usr,
- shape=ellipse];
- sysfs [color="#e27dd6ff",
- fillcolor="#b2d3e4",
- label="proc & sysfs\nfile systems"];
- SCI -> sysfs [color="#e27dd6ff"];
- DM [color="#e27dd6ff",
- fillcolor="#91b5c9",
- fixedsize=true,
- fontsize=20,
- height=0.8,
- label="Device\nModel",
- shape=octagon,
- width=2];
- sysfs -> DM [color="#e27dd6ff"];
- log_sys [color="#e27dd6ff",
- fillcolor="#6a9ab1",
- fontsize=20,
- label="system run,\nmodules,\ngeneric\nHW access "];
- DM -> log_sys [color="#e27dd6ff"];
- bus_drv [color="#e27dd6ff",
- fillcolor="#71809b",
- label="bus drivers"];
- log_sys -> bus_drv [color="#e27dd6ff"];
- H2 [color="#e27dd6ff",
- fillcolor="#777777",
- fontcolor=white,
- fontsize=20,
- label="busess:\nPCI, USB ...",
- row=chip];
- bus_drv -> H2 [color="#e27dd6ff"];
+digraph "Linux_kernel_diagram" {
+ graph [
+ newrank = true,
+ nodesep = 0.3,
+ ranksep = 0.2,
+ overlap = true,
+ splines = false,
+ ]
+ node [
+ fixedsize = false,
+ fontname = "Helvetica,Arial,sans-serif",
+ fontsize = 24,
+ height = 1,
+ shape = box,
+ style = "filled,setlinewidth(5)",
+ width = 2.2
+ ]
+ edge [
+ arrowhead = none,
+ arrowsize = 0.5,
+ labelfontname = "Helvetica,Arial,sans-serif",
+ weight = 10,
+ style = "filled,setlinewidth(5)"
+ ]
+ subgraph system {
+ node [color = "#e27dd6ff"]
+ edge [color = "#e27dd6ff"]
+ system_ [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ shape = point
+ ]
+ system [
+ URL = "https://en.wikibooks.org/wiki/The_Linux_Kernel/System",
+ fillcolor = white,
+ fixedsize = true,
+ height = 0.6,
+ row = func,
+ width = 2]
+ system -> system_ [
+ arrowhead = "",
+ row = func];
+ SCI [
+ URL = "https://en.wikibooks.org/wiki/The_Linux_Kernel/Syscalls",
+ fillcolor = "#d9e7ee",
+ fixedsize = true,
+ label = "System calls",
+ row = usr,
+ shape = ellipse]
+ sysfs [
+ fillcolor = "#b2d3e4",
+ label = "proc & sysfs\nfile systems"]
+ SCI -> sysfs
+ DM [
+ fillcolor = "#91b5c9",
+ fixedsize = true,
+ fontsize = 20,
+ height = 0.8,
+ label = "Device\nModel",
+ shape = octagon,
+ width = 2]
+ sysfs -> DM
+ log_sys [
+ fillcolor = "#6a9ab1",
+ fontsize = 20,
+ label = "system run,\nmodules,\ngeneric\nHW access "]
+ DM -> log_sys
+ bus_drv [
+ fillcolor = "#71809b",
+ label = "bus drivers"]
+ log_sys -> bus_drv
+ buses [
+ fillcolor = "#777777",
+ fontcolor = white,
+ fontsize = 20,
+ label = "buses:\nPCI, USB ...",
+ row = chip]
+ bus_drv -> buses
}
- {
- node [color="#61c2c5"];
- edge [color="#61c2c5"];
- networking_ [color="#61c2c5",
- fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- shape=point
- width=0];
- networking [color="#61c2c5",
- URL="https://en.wikibooks.org/wiki/The_Linux_Kernel/Networking",
- fillcolor=white,
- fixedsize=true,
- height=0.6,
- row=func,
- width=2];
- networking -> networking_ [arrowhead="",
- color="#61c2c5",
- row=func];
- sock [color="#61c2c5",
- fillcolor="#d9e7ee",
- fixedsize=true,
- label=Sockets,
- row=usr,
- shape=ellipse];
- prot_fam [color="#61c2c5",
- fillcolor="#b2d3e4",
- label="protocol\nfamilies"];
- sock -> prot_fam [color="#61c2c5"];
- log_prot [color="#61c2c5",
- fillcolor="#6a9ab1",
- label="protocols:\nTCP, UDP, IP"];
- prot_fam -> log_prot [color="#61c2c5"];
- netif [color="#61c2c5",
- fillcolor="#71809b",
- fontsize=20,
- label="network\ninterfaces\nand drivers"];
- log_prot -> netif [color="#61c2c5"];
- net_hw [color="#61c2c5",
- fillcolor="#777777",
- fontcolor=white,
- fontsize=20,
- label="network:\nEthernet, WiFi ...",
- row=chip];
- netif -> net_hw [color="#61c2c5"];
- NFS [color="#8383cc",
- fillcolor="#91b5c9",
- fixedsize=true,
- height=0.8,
- label=NFS,
- shape=octagon,
- width=1.2];
- NFS -> log_prot [color="#61c2c5",
- weight=0];
+ subgraph networking {
+ node [color = "#61c2c5"]
+ edge [color = "#61c2c5"]
+ networking_ [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ shape = point
+ width = 0]
+ networking [
+ URL = "https://en.wikibooks.org/wiki/The_Linux_Kernel/Networking",
+ fillcolor = white,
+ fixedsize = true,
+ height = 0.6,
+ row = func,
+ width = 2]
+ networking -> networking_ [
+ arrowhead = "",
+ row = func]
+ sock [
+ fillcolor = "#d9e7ee",
+ fixedsize = true,
+ label = Sockets,
+ row = usr,
+ shape = ellipse]
+ prot_fam [
+ fillcolor = "#b2d3e4",
+ label = "protocol\nfamilies"]
+ sock -> prot_fam
+ log_prot [
+ fillcolor = "#6a9ab1",
+ label = "protocols:\nTCP, UDP, IP"]
+ prot_fam -> log_prot
+ netif [
+ fillcolor = "#71809b",
+ fontsize = 20,
+ label = "network\ninterfaces\nand drivers"]
+ log_prot -> netif
+ net_hw [
+ fillcolor = "#777777",
+ fontcolor = white,
+ fontsize = 20,
+ label = "network:\nEthernet, WiFi ...",
+ row = chip]
+ netif -> net_hw
+ NFS [
+ color = "#8383cc",
+ fillcolor = "#91b5c9",
+ fixedsize = true,
+ height = 0.8,
+ label = NFS,
+ shape = octagon,
+ width = 1.2]
+ NFS -> log_prot [weight = 0]
}
- {
- node [color="#8383cc"];
- edge [color="#8383cc"];
+ subgraph multitasking {
+ node [color = "#c46747"]
+ edge [color = "#c46747"]
+ multitasking_ [
+ fixedsize = true,
+ height = 0,
+ shape = point
+ style = invis,
+ width = 0]
+ multitasking [
+ URL = "https://en.wikibooks.org/wiki/The_Linux_Kernel/Multitasking",
+ fillcolor = white,
+ fixedsize = true,
+ height = 0.6,
+ row = func,
+ width = 2]
+ multitasking -> multitasking_ [
+ arrowhead = "",
+ row = func]
+ proc [
+ fillcolor = "#d9e7ee",
+ fixedsize = true,
+ label = Processes,
+ row = usr,
+ shape = ellipse]
+ Tasks [
+ fillcolor = "#b2d3e4"]
+ proc -> Tasks
+ sync [
+ fillcolor = "#91b5c9",
+ fixedsize = true,
+ fontsize = 20,
+ fontname = "Helvetica,Arial,sans-serif",
+ label = synchronization,
+ height = 0.7,
+ //width = 2,
+ shape = octagon]
+ Tasks -> sync
+ sched [
+ fillcolor = "#6a9ab1",
+ label = Scheduler]
+ sync -> sched
+ IRQ [
+ fillcolor = "#71809b",
+ fontsize = 20,
+ label = "interrupts\ncore,\nCPU arch"]
+ sched -> IRQ
+ CPU [
+ fillcolor = "#777777",
+ fontcolor = white,
+ fontsize = 20,
+ row = chip]
+ IRQ -> CPU
+ } // multitasking
+ subgraph mem {
+ node [
+ color = "#51bf5b",
+ height = 1
+ ]
+ edge [color = "#51bf5b"]
+ MA [
+ color = "#51bf5b",
+ fillcolor = "#d9e7ee",
+ fixedsize = true,
+ label = "memory\naccess",
+ row = usr,
+ height = 1,
+ shape = ellipse]
+ MA -> VM
+ mmap [
+ fillcolor = "#91b5c9",
+ fixedsize = true,
+ fontsize = 20,
+ height = 0.8,
+ label = "memory\nmapping",
+ shape = octagon,
+ width = 2]
+ mmap -> log_mem
+ log_mem -> PA
+ SW [
+ color = "#8383cc",
+ fillcolor = "#91b5c9",
+ fixedsize = true,
+ label = Swap,
+ height = 0.8,
+ shape = octagon,
+ width = 1.2]
+ mmap -> SW [weight = 1]
+ SW -> block [
+ color = "#8383cc", weight = 1]
+ PA [
+ fillcolor = "#71809b",
+ label = "Page\nAllocator"
+ ]
+ PC -> PA [weight = 0 color="#51bf5b"]
+ RAM [
+ color = "#51bf5b",
+ fillcolor = "#777777",
+ fontcolor = white,
+ fontsize = 20,
+ label = "MMU, RAM",
+ height = 1,
+ row = chip]
+ PA -> RAM
+ memory -> memory_ [
+ arrowhead = "",
+ row = func]
+ VM -> mmap
+ } // mem
+ subgraph storage {
+ node [color = "#8383cc"]
+ edge [color = "#8383cc"]
NFS;
- storage_ [color="#8383cc",
- shape=point
- fixedsize=true,
- height=0,
- style=invis,
- width=0];
- storage [color="#8383cc",
- URL="https://en.wikibooks.org/wiki/The_Linux_Kernel/Storage",
- fillcolor=white,
- fixedsize=true,
- height=0.6,
- row=func,
- width=2];
- storage -> storage_ [arrowhead="",
- color="#8383cc",
- row=func];
- FS [color="#8383cc",
- fillcolor="#d9e7ee",
- fixedsize=true,
- label="files and\ndirectories",
- row=usr,
- shape=ellipse];
- VFS [color="#8383cc",
- fillcolor="#b2d3e4",
- label="Virtual\nFile System"];
- FS -> VFS [color="#8383cc"];
- VFS -> NFS [color="#8383cc",
- weight=0];
- logFS [color="#8383cc",
- fillcolor="#6a9ab1",
- fontsize=20,
- label="logical\nfilesystems:\next3, xfs ..."];
- VFS -> logFS [color="#8383cc"];
- PC [color="#51bf5b",
- fillcolor="#91b5c9",
- fixedsize=true,
- fontsize=20,
- height=0.8,
- label="page\ncache",
- shape=octagon,
- width=1.2];
- VFS -> PC [color="#8383cc",
- weight=0];
- mmap [color="#51bf5b",
- fillcolor="#91b5c9",
- fixedsize=true,
- fontsize=20,
- height=0.8,
- label="memory\nmapping",
- shape=octagon,
- width=2];
- VFS -> mmap [color="#8383cc",
- weight=0];
- block [color="#8383cc",
- fillcolor="#71809b",
- fontsize=20,
- label="Block\ndevices\nand drivers"];
- logFS -> block [color="#8383cc"];
- PA [color="#51bf5b",
- fillcolor="#71809b",
- label="Page\nAllocator"];
- PC -> PA [color="#51bf5b",
- weight=0];
- H4 [color="#8383cc",
- fillcolor="#777777",
- fontcolor=white,
- fontsize=20,
- label="storage devices:\nSCSI, NVMe ...",
- row=chip];
- block -> H4 [color="#8383cc"];
- SW [color="#8383cc",
- fillcolor="#91b5c9",
- fixedsize=true,
- label=Swap,
- height=0.8,
- shape=octagon,
- width=1.2];
- SW -> block [color="#8383cc",
- weight=0];
- }
- {
- node [color="#c46747"];
- edge [color="#c46747"];
- processing_ [color="#c46747",
- fixedsize=true,
- height=0,
- shape=point
- style=invis,
- width=0];
- processing [color="#c46747",
- URL="https://en.wikibooks.org/wiki/The_Linux_Kernel/Processing",
- fillcolor=white,
- fixedsize=true,
- height=0.6,
- row=func,
- width=2];
- processing -> processing_ [arrowhead="",
- color="#c46747",
- row=func];
- proc [color="#c46747",
- fillcolor="#d9e7ee",
- fixedsize=true,
- label=Processes,
- row=usr,
- shape=ellipse];
- Tasks [color="#c46747",
- fillcolor="#b2d3e4"];
- proc -> Tasks [color="#c46747"];
- sync [color="#c46747",
- fillcolor="#91b5c9",
- fixedsize=true,
- fontsize=20,
- fontname="Ubuntu Condensed"
- label=synchronization,
- height=0.7,
- //width=2,
- shape=octagon];
- Tasks -> sync [color="#c46747"];
- sched [color="#c46747",
- fillcolor="#6a9ab1",
- label=Scheduler];
- sync -> sched [color="#c46747"];
- IRQ [color="#c46747",
- fillcolor="#71809b",
- fontsize=20,
- label="interrupts\ncore,\nCPU arch"];
- sched -> IRQ [color="#c46747"];
- CPU [color="#c46747",
- fillcolor="#777777",
- fontcolor=white,
- fontsize=20,
- row=chip];
- IRQ -> CPU [color="#c46747"];
- }
- {
- node [color="#cfbf57ff",
-
- ];
- edge [color="#cfbf57ff",
- weight=10
- ];
- HI_ [color="#cfbf57ff",
- fixedsize=true,
- height=0,
- shape=point
- style=invis,
- width=0];
- HI [color="#cfbf57ff",
- URL="https://en.wikibooks.org/wiki/The_Linux_Kernel",
- fillcolor=white,
- fixedsize=true,
- fontsize=12,
- height=0.6,
- label="human\ninterface",
- row=func,
- width=2];
- HI -> HI_ [arrowhead="",
- color="#cfbf57ff",
- row=func];
- char [color="#cfbf57ff",
- fillcolor="#d9e7ee",
- fixedsize=true,
- label="char\ndevices",
- row=usr,
- shape=ellipse];
- input [color="#cfbf57ff",
- fillcolor="#b2d3e4",
- label="input\nsubsystem"];
- char -> input [color="#cfbf57ff"];
- F7 [color="#cfbf57ff",
- fillcolor="#6a9ab1",
- label="HI class\ndrivers"];
- input -> F7 [color="#cfbf57ff"];
- HID [color="#cfbf57ff",
- fillcolor="#71809b",
- fontsize=20,
- URL="https://www.kernel.org/doc/html/latest/hid/",
- label="HI\nperipherals\ndrivers"];
- F7 -> HID [color="#cfbf57ff"
- ];
- H7 [color="#cfbf57ff",
- fillcolor="#777777",
- fontcolor=white,
- fontsize=20,
- label="display, keyboard,\nmouse, audio",
- row=chip];
- HID -> H7 [color="#cfbf57ff" ];
- }
- {
- graph [rank=same];
- edge [style=invis,
- weight=1
- ];
+ storage_ [
+ shape = point,
+ fixedsize = true,
+ height = 0,
+ style = invis,
+ width = 0]
+ storage [
+ URL = "https://en.wikibooks.org/wiki/The_Linux_Kernel/Storage",
+ fillcolor = white,
+ fixedsize = true,
+ height = 0.6,
+ row = func,
+ width = 2]
+ storage -> storage_ [
+ arrowhead = "",
+ row = func]
+ FS [
+ fillcolor = "#d9e7ee",
+ fixedsize = true,
+ label = "files and\ndirectories",
+ row = usr,
+ shape = ellipse]
+ VFS [
+ fillcolor = "#b2d3e4",
+ label = "Virtual\nFile System"]
+ FS -> VFS
+ VFS -> mmap [weight = 0]
+ VFS -> NFS [weight = 0]
+ logFS [
+ fillcolor = "#6a9ab1",
+ fontsize = 20,
+ label = "logical\nfilesystems:\next3, xfs ..."]
+ VFS -> logFS
+ PC [
+ fillcolor = "#91b5c9",
+ fixedsize = true,
+ fontsize = 20,
+ height = 0.8,
+ label = "page\ncache",
+ shape = octagon,
+ width = 1.2]
+ VFS -> PC [weight = 0]
+ block [
+ fillcolor = "#71809b",
+ fontsize = 20,
+ label = "Block\ndevices\nand drivers"]
+ logFS -> block
+ SD [
+ fillcolor = "#777777",
+ fontcolor = white,
+ fontsize = 20,
+ label = "storage devices:\nSCSI, NVMe ...",
+ row = chip]
+ block -> SD
+ } // storge
+ subgraph HI {
+ node [color = "#cfbf57ff"]
+ edge [
+ color = "#cfbf57ff",
+ weight = 10
+ ]
+ HI_ [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ width = 0]
+ HI [
+ URL = "https://en.wikibooks.org/wiki/The_Linux_Kernel/Human_interfaces",
+ fillcolor = white,
+ fixedsize = true,
+ fontsize = 12,
+ height = 0.6,
+ label = "human\ninterface",
+ row = func,
+ width = 2]
+ HI -> HI_ [
+ arrowhead = "",
+ row = func]
+ char [
+ fillcolor = "#d9e7ee",
+ fixedsize = true,
+ label = "char\ndevices",
+ row = usr,
+ shape = ellipse]
+ input [
+ fillcolor = "#b2d3e4",
+ label = "input\nsubsystem"]
+ char -> input
+ F7 [
+ fillcolor = "#6a9ab1",
+ label = "HI class\ndrivers"]
+ input -> F7
+ HID [
+ fillcolor = "#71809b",
+ fontsize = 20,
+ URL = "https://www.kernel.org/doc/html/latest/hid/",
+ label = "HI\nperipherals\ndrivers"]
+ F7 -> HID
+ display [
+ fillcolor = "#777777",
+ fontcolor = white,
+ fontsize = 19,
+ label = "keyboard, mouse,\ndisplay, audio",
+ row = chip]
+ HID -> display
+ } // HI
+ subgraph functions {
+ graph [rank = same]
+ edge [
+ style = invis,
+ weight = 1
+ ]
system;
networking;
- system -> networking [weight=1];
- storage;
- networking -> storage [weight=1];
- memory [color="#51bf5b",
- URL="https://en.wikibooks.org/wiki/The_Linux_Kernel/Memory",
- fillcolor=white,
- fixedsize=true,
- height=0.6,
- row=func,
- width=2];
- storage -> memory [weight=1];
- processing;
- HI;
- processing -> HI [weight=1];
- memory -> processing [weight=1];
- functions_ [fixedsize=true,
- height=0,
- shape=point
- style=invis,
- width=0];
- functions_ -> system [weight=1];
- functions [color=gray,
- tooltip="Columns represent main functionalities of the kernel",
- URL="http://www.makelinux.net/ldd3/chp-1-sect-2.shtml",
- fillcolor=gray,
- fixedsize=true,
- height=0.6,
- row=func,
- style=dashed,
- width=1.6];
- functions -> functions_ [arrowhead="",
- color=gray,
- style="",
- weight=""];
+ system -> multitasking [weight = 1]
+ storage -> networking [weight = 1]
+ memory [
+ color = "#51bf5b",
+ URL = "https://en.wikibooks.org/wiki/The_Linux_Kernel/Memory",
+ fillcolor = white,
+ fixedsize = true,
+ height = 0.6,
+ row = func,
+ width = 2]
+ memory -> storage [weight = 1]
+ multitasking -> memory [weight = 1]
+ functions_ [
+ fixedsize = true,
+ height = 0,
+ shape = point
+ style = invis,
+ width = 0]
+ functions_ -> HI -> system [weight = 1]
+ functions [
+ color = gray,
+ tooltip = "Columns represent main functionalities of the kernel",
+ URL = "https://www.oreilly.com/library/view/linux-device-drivers/0596000081/ch01s02.html",
+ fillcolor = gray,
+ fixedsize = true,
+ height = 0.6,
+ row = func,
+ style = dashed,
+ width = 1.6]
+ functions -> functions_ [
+ arrowhead = "",
+ color = gray,
+ style = "",
+ weight = ""]
}
- {
- graph [rank=same];
+ subgraph interfaces {
+ graph [rank = same]
SCI;
sock;
FS;
proc;
char;
- usr_ [fixedsize=true,
- height=0,
- shape=point
- style=invis,
- width=0.5];
- usr [fillcolor="#d9e7eeff",
- fixedsize=true,
- label="user space\ninterfaces",
- row=usr,
- shape=ellipse,
- style="filled,setlinewidth(0)"];
- MA [color="#51bf5b",
- fillcolor="#d9e7ee",
- fixedsize=true,
- label="memory\naccess",
- row=usr,
- shape=ellipse];
+ usr_ [
+ fixedsize = true,
+ height = 0,
+ shape = point
+ style = invis,
+ width = 0.5]
+ usr [
+ fillcolor = "#d9e7eeff",
+ fixedsize = true,
+ label = "user space\ninterfaces",
+ row = usr,
+ shape = ellipse,
+ style = "filled,setlinewidth(0)"]
+ MA;
}
{
- edge [style=invis,
- weight=10
- ];
+ edge [style = invis weight = 10 ]
system_;
SCI;
system_ -> SCI;
@@ -403,198 +431,197 @@ digraph matrix {
storage_;
FS;
storage_ -> FS;
- processing_;
+ multitasking_;
proc;
- processing_ -> proc;
+ multitasking_ -> proc;
HI_;
char;
HI_ -> char;
MA;
- memory_ [fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- width=0];
+ memory_ [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ width = 0]
memory_ -> MA;
}
- {
- graph [rank=same];
+ subgraph virtual {
+ graph [rank = same]
sysfs;
prot_fam;
VFS;
Tasks;
input;
- D0 [fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- width=0];
- virt [fillcolor="#b2d3e4",
- label="virtual\nsubsystems",
- URL="https://en.wikipedia.org/wiki/Proxy_pattern",
- tooltip="proxy between standard user space interfaces and internal implementations",
- style="filled,setlinewidth(0)"];
- VM [color="#51bf5b",
- fillcolor="#b2d3e4",
- label="Virtual\nmemory"];
+ D0 [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ width = 0]
+ virt [
+ fillcolor = "#b2d3e4",
+ label = "virtual\nsubsystems",
+ URL = "https://en.wikipedia.org/wiki/Proxy_pattern",
+ tooltip = "proxy between standard user space interfaces and internal implementations",
+ style = "filled,setlinewidth(0)"]
+ VM [
+ color = "#51bf5b",
+ fillcolor = "#b2d3e4",
+ label = "Virtual\nmemory"]
}
- {
- graph [rank=same];
+ subgraph bridges {
+ graph [rank = same]
+ bridges [
+ fillcolor = "#91b5c9",
+ shape = octagon,
+ tooltip = "bridges between uniform virtual interfaces and various implementations",
+ URL = "https://en.wikipedia.org/wiki/Bridge_pattern",
+ style = "filled,setlinewidth(0)"]
DM;
NFS;
mmap;
sync;
- E0 [fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- width=0];
- bridges [fillcolor="#91b5c9",
- shape=octagon,
- tooltip="bridges between uniform virtual interfaces and various implementations",
- URL="https://en.wikipedia.org/wiki/Bridge_pattern",
- style="filled,setlinewidth(0)"];
+ E0 [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ width = 0]
+ //PC
}
- {
- graph [rank=same];
+ subgraph logical {
+ graph [rank = same]
log_sys;
log_prot;
logFS;
sched;
F7;
- F0 [fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- width=0];
- logical [fillcolor="#6a9ab1",
- style="filled,setlinewidth(0)"];
- log_mem [color="#51bf5b",
- fillcolor="#6a9ab1",
- label="logical\nmemory"];
+ F0 [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ width = 0]
+ logical [
+ fillcolor = "#6a9ab1",
+ style = "filled,setlinewidth(0)"]
+ log_mem [
+ color = "#51bf5b",
+ fillcolor = "#6a9ab1",
+ label = "logical\nmemory"]
+ //SW
}
- {
- graph [rank=same];
+ subgraph HWI {
+ graph [rank = same]
+ HWI [
+ fillcolor = "#71809b",
+ label = "hardware\ninterfaces",
+ style = "filled,setlinewidth(0)"]
bus_drv;
netif;
block;
- PA;
+ //PA;
IRQ;
HID;
- G0 [fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- width=0];
- HWI [fillcolor="#71809b",
- label="hardware\ninterfaces",
- style="filled,setlinewidth(0)"];
+ G0 [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ width = 0]
}
- {
- graph [rank=same];
- H2;
+ subgraph HW {
+ graph [rank = same]
+ HW [
+ fillcolor = "#777777",
+ fontcolor = white,
+ label = "electronics,\nhardware",
+ row = chip,
+ style = "filled,setlinewidth(0)"]
+ buses;
net_hw;
- H4;
+ SD;
CPU;
- H7;
- H0 [fixedsize=true,
- height=0,
- shape=point,
- style=invis,
- width=0];
- HW [fillcolor="#777777",
- fontcolor=white,
- label="electronics,\nhardware",
- row=chip,
- style="filled,setlinewidth(0)"];
- H5 [color="#51bf5b",
- fillcolor="#777777",
- fontcolor=white,
- fontsize=20,
- label="MMU, RAM",
- row=chip];
- }
- subgraph mem {
- node [color="#51bf5b",
- height=0.5
- ];
- edge [color="#51bf5b"];
- PC;
- mmap;
- SW;
- mmap -> SW [color="#51bf5b",
- weight=0];
- log_mem;
- mmap -> log_mem [color="#51bf5b"];
- PA;
- H5;
- PA -> H5 [color="#51bf5b"];
- memory;
- memory_;
- memory -> memory_ [arrowhead="",
- color="#51bf5b",
- row=func];
- MA;
- VM;
- MA -> VM [color="#51bf5b"];
- VM -> mmap [color="#51bf5b"];
- log_mem -> PA [color="#51bf5b"];
+ display;
+ H0 [
+ fixedsize = true,
+ height = 0,
+ shape = point,
+ style = invis,
+ width = 0]
+ RAM;
}
- bottom [label="© 2007-2020 Constantine Shulyupin http://www.MakeLinux.net/kernel/diagram",
- shape=plaintext,
- style=""];
- H4 -> bottom [style=invis];
- layers [fillcolor=lightgray,
- tooltip="Functionalities are divided to common layers. It is approximate division.",
- height=0.1,
- style="filled,setlinewidth(0)",
- width=0.5];
- functions -> layers [ style=invis ];
- usr -> usr_ [arrowhead="",
- color="#d9e7eeff",
- minlen=2];
- usr -> virt [color="#d9e7eeff"];
- virt -> D0 [arrowhead="",
- color="#b2d3e4",
- minlen=2];
- virt -> bridges [color="#b2d3e4"];
- bridges -> E0 [arrowhead="",
- color="#91b5c9",
- minlen=2,
- style="filled,setlinewidth(6)",
- weight=""];
- bridges -> logical [color="#91b5c9",
- style="filled,setlinewidth(6)"];
- logical -> F0 [arrowhead="",
- color="#6a9ab1",
- minlen=2,
- row=logical,
- style="filled,setlinewidth(6)",
- weight=""];
- logical -> HWI [color="#6a9ab1",
- row=logical,
- style="filled,setlinewidth(6)"];
- HWI -> G0 [arrowhead="",
- color="#71809b",
- minlen=2,
- row=HWI,
- style="filled,setlinewidth(6)",
- weight=""];
- HWI -> HW [color="#71809b",
- row=HWI,
- style="filled,setlinewidth(6)"];
- HW -> H0 [arrowhead="",
- color="#777777",
- minlen=2,
- row=chip,
- style="filled,setlinewidth(6)",
- weight=""];
- layers -> usr [arrowhead="",
- color=gray,
- style="filled,setlinewidth(1)"];
- LKD [fontsize=40,
- label="Linux kernel diagram",
- shape=plain,
- style=""];
- LKD -> storage [style=invis];
+ bottom [
+ label = "© 2007 Constantine Shulyupin https://makelinux.github.io/kernel/diagram",
+ shape = plaintext,
+ style = ""]
+ CPU -> bottom [style = invis]
+ layers [
+ fillcolor = lightgray,
+ tooltip = "Functionalities are divided to common layers. It is approximate division.",
+ height = 0.1,
+ style = "filled,setlinewidth(0)",
+ width = 0.5]
+ functions -> layers [style = invis ]
+ usr -> usr_ [
+ arrowhead = "",
+ color = "#d9e7eeff",
+ minlen = 2]
+ usr -> virt [
+ color = "#d9e7eeff"]
+ virt -> D0 [
+ arrowhead = "",
+ color = "#b2d3e4",
+ minlen = 2]
+ virt -> bridges [
+ color = "#b2d3e4"]
+ bridges -> E0 [
+ arrowhead = "",
+ color = "#91b5c9",
+ minlen = 2,
+ style = "filled,setlinewidth(6)",
+ weight = ""]
+ bridges -> logical [
+ color = "#91b5c9",
+ style = "filled,setlinewidth(6)"]
+ logical -> F0 [
+ arrowhead = "",
+ color = "#6a9ab1",
+ minlen = 2,
+ row = logical,
+ style = "filled,setlinewidth(6)",
+ weight = ""]
+ logical -> HWI [
+ color = "#6a9ab1",
+ row = logical,
+ style = "filled,setlinewidth(6)"]
+ HWI -> G0 [
+ arrowhead = "",
+ color = "#71809b",
+ minlen = 2,
+ row = HWI,
+ style = "filled,setlinewidth(6)",
+ weight = ""]
+ HWI -> HW [
+ color = "#71809b",
+ row = HWI,
+ style = "filled,setlinewidth(6)"]
+ HW -> H0 [
+ arrowhead = "",
+ color = "#777777",
+ minlen = 2,
+ row = chip,
+ style = "filled,setlinewidth(6)",
+ weight = ""]
+ layers -> usr [
+ arrowhead = "",
+ color = gray,
+ style = "filled,setlinewidth(1)"]
+ LKD [
+ fontsize = 40,
+ label = "Linux kernel diagram",
+ shape = plain,
+ style = ""]
+ LKD -> multitasking [style = invis]
}
diff --git a/README.md b/README.md
index 287e251..7d7c29b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,12 @@
# linux_kernel_map
+
Linux kernel map
Edited with Inkscape 0.46 on Ubuntu 9.04.
-Latter vesions of Inkscape don't render connetors propely.
+Recent versions of Inkscape don't render connectors properly.
+
+Online demo:
+https://makelinux.github.io/kernel/map/
+
+Online demo of the Linux kernel diagram:
+https://makelinux.github.io/kernel/diagram/
diff --git a/ignore.txt b/ignore.txt
index 5acf874..c76a5bd 100644
--- a/ignore.txt
+++ b/ignore.txt
@@ -1,253 +1,345 @@
-AT_FDCWD
-BDI_SHOW
-BUG
-BUG_ON
-EAGAIN
-EBADF
-EBUSY
-EFAULT
-EINTR
-EINVAL
-EIO
-ENODEV
-ENOENT
-ENOMEM
-ENOSYS
-ENOTSUPP
-EOPNOTSUPP
-EOPNOTSUPP
-EPERM
-ERR_PTR
-ESRCH
-FMODE_WRITE
-GFP_KERNEL
-HPAGE_PMD_NR
-INIT_LIST_HEAD
-IS_ENABLED
-IS_ERR
-LOOKUP_EMPTY
-LOOKUP_FOLLOW
-LOOKUP_REVAL
-NAPI_GRO_CB
-NODE_DATA
-NULL
-NUMA_NO_NODE
-O_CLOEXEC
-O_LARGEFILE
-PAGE_MASK
-PAGE_SHIFT
-PAGE_SIZE
-PTR_ERR
-PVOP_CALLEE0
-PVOP_VCALLEE0
-PVOP_VCALLEE1
-PageLocked
-READ_ONCE
-SIGKILL
-SIGSTOP
-UL
-VM_BUG_ON
-VM_BUG_ON_PAGE
-WARN_ON
-WARN_ON_ONCE
-XXstart
-_RET_IP_
-__user
-__user
abort_creds
access_ok
+__acquires
addr
aligned
+__alignof__
+ARRAY_SIZE
+asm
+assert
+AT_FDCWD
+atomic_add
+atomic_cmpxchg
+atomic_dec
+atomic_dec_return
+atomic_inc_return
+ATOMIC_INIT
+atomic_notifier_call_chain
atomic_read
+atomic_set
+__attribute__
+barrier
+BDI_SHOW
bool
+BUG
+BUG_ON
+BUILD_BUG_ON
+__builtin_constant_p
capable
+__clear_bit
clear_bit
+cmpxchg
commit_creds
+compare
+__compiletime_error
compound_head
cond_resched
container_of
-copy_from_user
-copy_to_user
-cpu_to_le16
cpumask_bits
-cred
+cpu_of
+cpu_relax
+cpu_to_le16
current
-current_cred
current_user_ns
-d_inode
+DECLARE_BITMAP
+DECLARE_COMPLETION_ONSTACK
+DECLARE_WAITQUEUE
defined
+DEFINE_IO_COMP_BATCH
+DEFINE_MUTEX
+dequeue_entity
+dev_dbg
+dev_err
+device_add
+dev_info
+devm_kfree
+devm_kmalloc
+devm_kzalloc
+devres_alloc
+dev_warn
+dev_WARN_ONCE
+d_inode
+disable_irq
+DIV_ROUND_UP
+DMA_BIT_MASK
+dma_rmb
+dma_set_mask_and_coherent
dput
+drm_dev_dbg
+dump_stack
+EAGAIN
+EBADF
+EBUSY
+EFAULT
+EINTR
+EINVAL
+EIO
end
+ENODEV
+ENOENT
+ENOMEM
+ENOSYS
+ENOTSUPP
entry
+EOPNOTSUPP
+EOPNOTSUPP
+EPERM
err
error
-f_mode
-f_path
+ERR_PTR
+ESRCH
false
-fd_install
+FAULT_FLAG_REMOTE
+FAULT_FLAG_TRIED
+FAULT_FLAG_WRITE
fdget
+fd_install
fdput
+ffz
+__field
file_inode
find_task_by_vpid
flags
+fls64
+f_mode
+FMODE_WRITE
+fn
+format
+f_path
+fprintf
+FUNC
+get
+getname
get_page
+get_status
get_timespec64
+__get_user
get_user
-getname
+GFP_KERNEL
+HARD_TX_LOCK
+HARD_TX_UNLOCK
+HAS_UNMAPPED_ID
+HPAGE_PMD_NR
i
+ia64_getf_exp
if
+ilog2
+in_interrupt
+init_completion
+__initdata
+INIT_LIST_HEAD
+init_waitqueue_head
+inw
+irq_state_set_disabled
+irq_state_set_masked
+IS_ENABLED
+IS_ERR
+IS_ERR_OR_NULL
+kasprintf
+kdebug
kfree
+kfree_const
+klist_init
+kmalloc
+kobject_init
+kobject_put
+kobject_set_name_vargs
+kstrdup
+_kstrtol
+kstrtoll
+_kstrtoul
+kstrtoull
+kvasprintf_const
kzalloc
+le16_to_cpu
+le32_to_cpu
likely
list
list_add
list_del
list_empty
list_for_each_entry
+llist_for_each_entry
+local_irq_disable
+local_irq_enable
+local_irq_restore
+local_irq_save
loff_t
+LOOKUP_EMPTY
lookup_flags
+LOOKUP_FOLLOW
+LOOKUP_REVAL
+MAJOR
+match
max
+mb
+mdelay
memcpy
memset
+might_sleep
min
+MINOR
+min_t
+MKDEV
+msleep
+mutex_init
mutex_lock
mutex_unlock
name
+NAPI_GRO_CB
+ndelay
+net_warn_ratelimited
next
+NODE_DATA
nr_pages
ns_capable
+NULL
+NUMA_NO_NODE
+O_CLOEXEC
offset
+offsetof
+O_LARGEFILE
old
out
+outb_p
+PAGE_ALIGN
+PageLocked
+PAGE_MASK
+PAGE_SHIFT
+PAGE_SIZE
page_to_nid
page_to_pfn
page_zone
+parent_entity
path_put
path_put
+pci_dev_put
+pci_err
+pci_err
+pci_name
pci_set_drvdata
+pci_warn
percpu_ref_put
pfn
pfn_to_page
pgoff_t
+__platform_driver_register
+platform_get_drvdata
pmd_t
+pm_runtime_disable
+pm_runtime_enable
+pm_runtime_set_autosuspend_delay
+pm_runtime_use_autosuspend
pos
pos_from_hilo
pr_debug
-pr_err
-pr_info
preempt_disable
preempt_enable
-prepare_creds
+pr_err
+pr_fmt
+pr_info
+pr_info_once
+__printf
+printk
+printk_once
+pr_warn
pte_t
ptl
+PTR_ERR
+putname
put_page
put_user
-putname
+PVOP_CALLEE0
+PVOP_VCALLEE0
+PVOP_VCALLEE1
raw_local_irq_save
+raw_spin_*lock
+raw_spin_lock
+raw_spin_lock_irq
+raw_spin_lock_irqsave
+raw_spin_unlock
+raw_spin_unlock_irq
+raw_spin_unlock_irqrestore
rcu_read_lock
rcu_read_unlock
+rdtsc
read_lock
+readl_relaxed
+READ_ONCE
read_unlock
real_mount
+reg_write
+__releases
+resource_size
ret
+_RET_IP_
retry
retry_estale
+rmb
+rq_list_empty
+__set_bit
sigdelsetmask
+SIGKILL
sigset_t
+SIGSTOP
+simple_strtoul
size
size_t
+smp_mb
+smp_mb__after_spinlock
+smp_rmb
+smp_wmb
+spi_master_get_devdata
spin_lock
+spin_lock_init
spin_lock_irq
spin_lock_irqsave
+spinlock_t
spin_unlock
spin_unlock_irq
spin_unlock_irqrestore
-spinlock_t
sprintf
+sscanf
ssize_t
-ssize_t
+ssleep
+strchr
+strcmp
+strerror
+strlen
swp_entry_t
-task_pid_vnr
tasklist_lock
+task_pid_vnr
test_bit
+to_platform_device
+trace_*
trace_hardirqs_off
+trace_net_dev_queue
+tracing_on
true
tv_nsec
typeof
u32
u64
u8
+udelay
+UL
unlikely
unlock_page
-user_path_at
-
-spin_lock_init
-dev_warn
-dev_info
-dev_err
-printk
-dma_set_mask_and_coherent
-DMA_BIT_MASK
-atomic_inc_return
-atomic_dec
-BUILD_BUG_ON
-offsetof
-MAJOR
-dev_WARN_ONCE
-atomic_dec_return
-__field
-reset
-device_add
-__acquires
-__releases
-get_status
-pci_err
-msleep
-ssleep
-pci_dev_put
-pci_err
-__virtio_test_bit
-might_sleep
-raw_spin_lock_irqsave
-raw_spin_unlock_irqrestore
-DECLARE_BITMAP
-__set_bit
-handler
-cmpxchg
-barrier
-llist_for_each_entry
-?panic
-atomic_set
-ndelay
-__clear_bit
-__attribute__
-format
-_kstrtoul
-_kstrtol
-kstrtoull
-kstrtoll
-__alignof__
-local_irq_disable
-atomic_cmpxchg
-va_start
+__user
+__user
va_end
-atomic_notifier_call_chain
-mdelay
-local_irq_enable
-fprintf
-strerror
-poweroff
-set_bit
-pr_fmt
-atomic_add
-mb
-rmb
-__get_user
-rdtsc
-pr_warn
-match
+validate_creds
+validate_process_creds
+va_start
+__virtio_test_bit
+VM_BUG_ON
+VM_BUG_ON_PAGE
__volatile__
-asm
-__compiletime_error
-assert
-tracing_on
+WARN
+WARN_ON
+WARN_ON_ONCE
+wmb
+writel
+writel_relaxed
+write_reg16
+XXstart
diff --git a/linux.adoc b/linux.adoc
new file mode 100644
index 0000000..d057f13
--- /dev/null
+++ b/linux.adoc
@@ -0,0 +1,17181 @@
+:toc:
+:toclevels: 10
+:toc-title: Contents
+:toc-class: floating-toc
+
+The initial implementation handles the debug (-D) option, with more
+common options to be migrated in future patches.
+
+= Costa's Linux kernel research scratchpad
+
+keywords:
+
+ CONFIG_ACPI_HOTPLUG_CPU
+
+
+ scale_freq_tick
+ "Scheduler frequency invariance went wobbly, disabling!"
+
+ task_work_run
+
+
+ notify_cpu_starting
+ rcutree_report_cpu_starting
+
+ vfs_rmdir
+ kernfs_iop_rmdir
+ cgroup_rmdir
+ cgroup_destroy_locked
+ kill_css
+
+ cgroup_base_files
+ cgroup_subtree_control_write
+ cgroup_finalize_control
+ cgroup_apply_control_disable
+ kill_css
+
+ kill_css
+ percpu_ref_kill_and_confirm
+ &css_killed_ref_fn
+ offline_css
+ cpuset_css_offline
+ update_prstate ->
+ css_put
+
+ ktimers/7-94 [007] dN.11 110543.408319: ipi_send_cpu: cpu=7 callsite=irq_work_queue_on+0xe1/0xf0 callback=rcu_preempt_deferred_qs_handler+0x0/0x20
+
+ include/linux/context_tracking_irq.h
+
+ __trace_stack
+ ct_irq_enter_irqson
+ ct_irq_enter
+ ct_nmi_enter
+ rcu_watching Startirq
+ __ftrace_trace_stack
+ ct_irq_exit_irqson
+ ct_irq_exit
+ ct_nmi_exit
+ rcu_watching Endirq
+
+ rcu_read_unlock_special
+ @rcu_preempt_deferred_qs_handler
+ init_irq_work
+ irq_work_queue_on
+
+ cpuset_write_resmask housekeeping_exlude_isolcpus cpu_up
+
+ vim format paragpaph: gqip
+
+== Intro
+
+=== Table TOC
+
+[cols="6*",options="header,footer,autowidth"]
+|===
+| <>
+| <>
+| <>
+| <>
+| <>
+| <>
+
+|
+<> +
+<