diff --git a/LKM.svg b/LKM.svg index 6978183..fa87350 100644 --- a/LKM.svg +++ b/LKM.svg @@ -1,5 +1,4 @@ - - - - - - - - - - - + + refY="0.0" + refX="0.0" + id="Arrow1Mend" + style="overflow:visible;"> + id="path10255" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;" + transform="scale(0.4) rotate(180) translate(10,0)" /> + refY="0.0" + refX="0.0" + id="Arrow1Lend" + style="overflow:visible;"> + id="path10249" + d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none;" + transform="scale(0.8) rotate(180) translate(12.5,0)" /> + id="path10398" + d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " + style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(-0.8) translate(-6,0)" /> + id="path10407" + d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " + style="fill-rule:evenodd;fill:#FFFFFF;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.8) translate(-6,0)" /> + transform="scale(-0.6,-0.6)" /> - - - - - - - © 2007, 2010 Constantine Shulyupin + © 2007–2026 Constantine Shulyupin - www.MakeLinux.net/kernel_map + www.MakeLinux.net/kernel/map + id="g7153" + style="display:inline"> + style="opacity:1;display:inline" + sodipodi:insensitive="true"> - - virtual - + xlink:href="https://en.wikipedia.org/wiki/Proxy_pattern"> + + virtual + + logical + style="font-size:42.14634323px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;font-family:Helvetica">logical + + + - electronics + style="font-size:32.63806534px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Helvetica">electronics I/O + style="font-size:31.60975647px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Helvetica">I/O + Input/Output memory + style="font-size:31.60975647px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Helvetica">memory CPU + style="font-size:31.60975647px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Helvetica">CPU + Central Processing Unit - - HI char devices - - + + HI char devices + + + - HI subsystems - - + + HI subsystems + + + - protocol families - - + + address families + + + - sockets access - - + + sockets access + + + - protocols - - + + protocols + + + - network interface - - + + network interfaces + + + - networking - - + + networking + + + - Virtual File System - - + + Virtual File System + + + - block devices - - + + block devices + + + - storage - - + + storage + + + - virtual memory - - + + virtual memory + + + - memory access - - + + memory access + + + - logical memory - - + + logical memory + + + - Page Allocator - - + + Page Allocator + + + - memory - - + + memory + + + - threads - - + + threads + + + - processes - - + + processes + + + - Scheduler - - + + Scheduler + + + - interrupts core - - + + interrupts core + + + - CPU specific - - + + CPU specific + + + - processing - + xlink:href="https://en.wikibooks.org/wiki/The_Linux_Kernel/Multitasking"> + + multitasking + + generic HW access + style="font-size:26.34146309px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Helvetica">generic HW access - - system run - - + + system run + + + - system - - + + system + + + - functionalities - - - layers - - + + functionalities + + + layers + + + + xlink:href="https://en.wikibooks.org/wiki/The_Linux_Kernel/System#User_space_communication"> + + interfaces core + + + interfaces core + x="1007.8545" + y="24.718868" + id="kernel_release" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#a4a4a4;fill-opacity:1;font-family:Helvetica">7.0 + style="font-size:40px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#000000;visibility:visible;display:inline;font-family:Helvetica"> Linux kernel map - logical + file systems - logicalfile systems + + abstract devicesand + HID class drivers - abstract devicesand HID class drivers + + + HI peripheralsdevice drivers - - 2.6.36 - - HI peripheralsdevice drivers + + network + device drivers + y="1261.1146" + id="text7318" + sodipodi:linespacing="100%">networkdevice drivers + control - + disk controllerdrivers - storagedrivers + + + physical memoryoperations - physical memoryoperations + + + device accessand bus drivers + id="text7337" + sodipodi:linespacing="100%">device accessand bus drivers + interfaces interfaces - files & directories + access + y="158.33287" + id="text7349" + sodipodi:linespacing="100%">files & directoriesaccess + user peripherals disk controllers + x="1751.2881" + y="1409.167" + id="tspan4727">storage controllers network controllers - + human interface + id="text7360" + sodipodi:linespacing="100%" + transform="scale(0.8879603,1.1261765)">human interfaces + + + Virtio paravirtualized device descriptor + + virtio_device + + - - - - - + inkscape:connection-end="#text7816" /> - - + inkscape:connection-end="#text8802" + inkscape:connection-start="#a10239" /> - - - - - - + inkscape:connection-end="#text3554" + inkscape:connection-start="#text6722" /> + inkscape:connection-start="#text3286" + inkscape:connection-end="#text3406" /> + inkscape:connection-end="#text7711" /> + inkscape:connection-start="#text4222" + inkscape:connection-end="#text5658" /> + inkscape:connection-end="#text7719" /> + inkscape:connection-start="#text4794" + inkscape:connection-end="#text4766" /> + inkscape:connection-start="#text6022" + inkscape:connection-end="#text9264" /> + inkscape:connection-end="#text2126" + inkscape:connection-start="#text6462" /> + inkscape:connection-start="#text8862" + inkscape:connection-end="#text2614" /> + inkscape:connection-start="#text3486" + inkscape:connection-end="#submit_bio" /> + + - - - - + inkscape:connection-start="#text5042" + inkscape:connection-end="#a8515" /> + inkscape:connection-start="#text7816" + inkscape:connection-end="#text1998" /> - - + inkscape:connection-end="#text5754" + inkscape:connection-start="#text5726" /> - + inkscape:connection-start="#text3595" + inkscape:connection-end="#text6830" /> - - - + inkscape:connection-end="#text11700" + inkscape:connection-start="#text6814" /> + inkscape:connection-end="#text3390" + inkscape:connection-start="#text3564" /> + inkscape:connection-start="#text3629" + inkscape:connection-end="#text3834" /> + + + + + + + + + + + + + + + + style="opacity:0.5;display:inline" + sodipodi:insensitive="true"> + + + + + + + + + + - + + - - synchronization - - + + synchronization + + + - Device Model - - + + Driver Model + + + - swap - - + Swap area - extend memory by paging to disk + + swap + + + networking + storage - networkstorage + + memory + mapping - memorymapping + + - security - - + + security + + + - bridges - - + Decouple abstraction from implementation so that the two can vary independently + + bridges + + + - debugging - - + + debugging + + + - page cache - - + + page cache + + + + socketsplice - - - - sys_init_module - - - timer_interrupt - - jiffies_64 - socketsplice + + + + zero-copy + + + + + Vectored I/O + + + + + Async I/O + + + + + Non-blocking I/O + + + + + + USB mass storage host template + usb_stor_host_template + + + SDIO function device descriptor + + sdio_func + + + + Secure Digital Input Output + + SDIO + + + + Read a 16-bit value from an I/O port + + inw + + + + NVMe storage device drivers + + drivers/nvme/ + + + + Virtio paravirtualized device drivers + + drivers/virtio/ + + + + + Direct Rendering Manager GPU drivers + + drivers/gpu/drm/ + + + + Direct Rendering Manager + + DRM + + + + Enter kernel debugger + + kgdb_breakpoint + + + + cgroup v2 filesystem type + + cgroup2_fs_type + + + + + cgroup v1 filesystem type + + cgroup_fs_type + + + + + + Control Groups + + + + System call to load a kernel module + + sys_init_module + + + + Hardware timer interrupt handler + + timer_interrupt + + + + Monotonic tick counter since boot + jiffies_64 + + + Update wall clock and process timers each tick + do_timer - do_timer + + + Periodic tick handler - update timers and scheduling + tick_periodic - tick_periodic + + - context_switch - - + Switch CPU from one task to another + + context_switch + + + + Allocate a file structure for an open file + alloc_file + y="298.0748" + id="text7707" + sodipodi:linespacing="100%">alloc_file + registers + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Helvetica">registers @@ -3343,10 +3950,11 @@ x="1226.0366" y="1535.1935" id="tspan1864" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">RAM + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">RAM + Random Access Memory @@ -3354,32 +3962,38 @@ x="1399.2159" y="1535.1935" id="tspan1880" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">MMU + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">MMU + Memory Management Unit - - I/O ports - - - I/O mem - + xlink:href="https://en.wikipedia.org/wiki/Input/output"> + + I/O ports + + + I/O mem + + @@ -3387,10 +4001,10 @@ x="305.0159" y="1522.665" id="tspan1968" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">keyboard + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">keyboard @@ -3398,10 +4012,10 @@ x="277.2171" y="1545.2672" id="tspan1984" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:FreeSans;-inkscape-font-specification:FreeSans">mouse + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Helvetica">mouse @@ -3409,10 +4023,10 @@ x="472.95264" y="1545.2672" id="tspan2000" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:FreeSans;-inkscape-font-specification:FreeSans">audio + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Helvetica">audio @@ -3420,32 +4034,40 @@ x="326.91101" y="1545.2672" id="tspan2016" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">graphics card + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">graphics card SCSI + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">SCSI + Small Computer System Interface - - SATA - + xlink:href="https://en.wikipedia.org/wiki/Serial_ATA" + transform="translate(40,0)"> + Serial Advanced Technology Attachment + + SATA + + @@ -3453,43 +4075,61 @@ x="1322.8625" y="1535.7218" id="tspan2096" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">DMA + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">DMA + Direct Memory Access - - Ethernet - - + + Ethernet + + + - WiFi - - + + Wi-Fi + + + - APIC - + xlink:href="https://en.wikipedia.org/wiki/Advanced_Programmable_Interrupt_Controller"> + Advanced Programmable Interrupt Controller + + APIC + + @@ -3497,754 +4137,1184 @@ x="1330.0332" y="847.10571" id="tspan2488" - style="font-size:13.17073154px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:FreeSans;-inkscape-font-specification:FreeSans">physically mapped memory + style="font-size:13.17073154px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;text-anchor:middle;font-family:Helvetica">physically mapped memory - - system files - - + + system files + + + - copy_from_user - + xlink:href="https://elixir.bootlin.com/linux/latest/ident/copy_from_user" + transform="matrix(0.8481793,0,0,0.8481793,699.13969,-8.30381)"> + Copy data from user space to kernel space + + copy_from_user + + + + Copy data from kernel space to user space + copy_to_user + + + Low-level memory copy between user and kernel space using rep movsb + copy_user_generic + + + Set AC flag - enable supervisor access to user pages (SMAP) + stac + + + Clear AC flag - disable supervisor access to user pages (SMAP) + clac + + style="font-size:15px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;visibility:visible;font-family:Helvetica"> © 2007, 2010 Constantine Shulyupin www.MakeLinux.net/kernel_map + x="799.37378">© 2007 Costa Shulyupin makelinux.github.io/kernel/map - - sys_write - - + Write data to a file descriptor + + ksys_write + + + - sys_open - - + Open a file by pathname + + sys_open + + + - sys_execve - - + Replace current process with a new program + + sys_execve + + + - linux_binfmt - - + Executable format handler - ELF, script, etc. + + linux_binfmt + + + - vfs_read - - - task_struct - - + VFS read - common file read path + + vfs_read + + + + Task descriptor - one per thread in a process + + task_struct + + + - usb_driver - - + USB device driver descriptor + + usb_driver + + + - sys_socketcall - - + Multiplexed socket system call entry point + + sys_socketcall + + + - socket - - + Network communication endpoint + + socket + + + - interrupt - - + Hardware interrupt - signal from device to CPU + + interrupt + + + - sys_fork - - + Create a child process with copy-on-write clone of parent's address space + + sys_fork + + + - schedule - - + Main scheduler entry point - pick next task to run + + schedule + + + - do_IRQ - - + Common entry point for hardware interrupts + + common_interrupt + + + - rq - - + Per-CPU run queue - list of runnable tasks + + rq + + + - kmalloc - - + Allocate kernel memory + + kmalloc + + + - kmem_cache - - - vmalloc - - + SLAB cache - pool of fixed-size objects + + kmem_cache + + + - vmlist - - + List of kernel virtual memory mappings + + vmlist + + + - page - - + Physical memory page descriptor + + page + + + - do_page_fault - - + Handle page fault exception + + exc_page_fault + + + - outw - - + Write a 16-bit value to an I/O port + + outw + + + - cdev - - + Character device descriptor + + cdev + + + - /sysfs - - + + /sysfs + + + - /dev - - + + /dev + + + - readw - - + Read a 16-bit value from memory-mapped I/O + + readw + + + - /proc - - + + /proc + + + - cdev_add - - - oss - - + Register a character device with the kernel + + cdev_add + + + - mousedev - - + Mouse input event handler + + mousedev + + + - kbd - - + Keyboard input handler - keymap and key event processing + + kbd + + + - i8042_driver - - + Intel 8042 keyboard and mouse controller driver + + i8042_driver + + + - psmouse - - + PS/2 mouse driver + + psmouse + + + - atkbd_drv - - + AT and PS/2 keyboard driver + + atkbd_drv + + + - tty - - + Terminal device abstraction + + tty + + + - console - - + Console output device + + console + + + - snd_fops - - + ALSA sound device file operations + + snd_fops + + + - video_fops - - + V4L2 video device file operations + + video_fops + + + - console_fops - - + Console device file operations + + console_fops + + + - vga_con - - + VGA text mode console driver + + vga_con + + + - pt_regs - - + Saved CPU register state + + pt_regs + + + - __get_free_pages - - + Allocate free pages and return virtual address + + __get_free_pages + + + - vm_struct - - + Kernel virtual memory area from vmalloc + + vm_struct + + + - sys_mmap - - + Map files or devices into memory + + sys_mmap + + + - /proc/self/maps - - + + /proc/self/maps + + + - timer_list - - + Pending timer entry in the timer wheel + + timer_list + + + - do_softirq - - + Process pending software interrupts + + do_softirq + + + - tasklet_struct - - + Deferred work in softirq context + + tasklet_struct + + + - request_queue - - + Per-device I/O request queue + + request_queue + + + - setup_irq - - + Register an interrupt handler for an IRQ line + + __setup_irq + + + - init_scsi - - + Initialize the SCSI subsystem + + init_scsi + + + - ext4_file_operations - - + ext4 filesystem file operations + + ext4_file_operations + + + - gendisk - - + Representation of a disk device + + gendisk + + + - block_device_operations - - + Block device driver operations + + block_device_operations + + + - sys_sync - - + Flush filesystem caches to disk + + sys_sync + + + - sys_nanosleep - - + Suspend execution for a specified time + + sys_nanosleep + + + - schedule_timeout - - + Sleep for a timeout then return to run queue + + schedule_timeout + + + - sysfs_ops - - + Read and write operations for sysfs attributes + + sysfs_ops + + + - mm_struct - - + Memory descriptor - virtual address space of a task + + mm_struct + + + - module - - + Loadable kernel module descriptor + + module + + + - cdev_map - - + Character device number to device mapping + + cdev_map + + + - request_region - - + Reserve an I/O port range + + request_region + + + - proto_ops - - + Socket protocol operations - bind, connect, accept, sendmsg + + proto_ops + + + - socket_file_ops - + xlink:href="https://elixir.bootlin.com/linux/latest/ident/socket_file_ops"> + File operations for socket file descriptors + + socket_file_ops + + @@ -4252,826 +5322,1174 @@ x="1978.2262" y="838.60516" id="tspan4588" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">/proc/net/protocols + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">/proc/net/protocols - - proto - - + Socket-to-transport layer protocol operations + + proto + + + - tcp_prot - - + TCP protocol handler + + tcp_prot + + + - inet_stream_ops - - + Streaming Internet socket operations + + inet_stream_ops + + + - inet_dgram_ops - - + Datagram Internet socket operations + + inet_dgram_ops + + + - udp_prot - - + UDP protocol handler + + udp_prot + + + - inet_family_ops - - + IPv4 socket address family + + inet_family_ops + + + - __sock_create - - + Create a new socket + + __sock_create + + + - ip_rcv - - + IP protocol receive handler + + ip_rcv + + + - net_device - - + Network device descriptor + + net_device + + + - alloc_netdev_mq - - + Allocate a network device structure + + alloc_netdev_mq + + + - ieee80211_alloc_hw - - + Allocate a new hardware device for mac80211 Wi-Fi stack + + ieee80211_alloc_hw + + + - file_operations - - + VFS operations for file I/O + + file_operations + + + - sys_syslog - - + Read or clear kernel log buffer + + sys_syslog + + + - aic94xx_init - - + MegaRAID SCSI host adapter driver initialization + + megaraid_init + + + - usb_hcd - - + USB host controller driver + + usb_hcd + + + - ehci_irq - - + xHCI host controller interrupt handler + + xhci_irq + + + - usb_hcd_irq - - + USB host controller interrupt handler + + usb_hcd_irq + + + - usb_submit_urb - - + Submit a USB request block for transfer + + usb_submit_urb + + + - ehci_urb_enqueue - - + Submit a USB request block to xHCI controller + + xhci_urb_enqueue + + + - usb_hcd_giveback_urb - - + Return a completed USB request block to the submitter + + usb_hcd_giveback_urb + + + - pci_driver - - + PCI device driver descriptor + + pci_driver + + + - start_kernel - - + Kernel entry point after boot loader + + start_kernel + + + - init/main.c - - + Kernel boot and initialization entry point + + init/main.c + + + - run_init_process - - + Execute the init process + + run_init_process + + + - do_initcalls - - + Call all module init functions at boot + + do_initcalls + + + - sys_reboot - - - do_mmap_pgoff - - + Reboot or power off the system + + sys_reboot + + + - sys_brk - - + Change the program break - grow or shrink heap for user-space memory allocation + + sys_brk + + + - arch/x86/ - - + x86 architecture-specific code + + arch/x86/ + + + - irq_desc - - - setup_timer - - + Per-IRQ descriptor - interrupt state and handler chain + + irq_desc + + + - process_timeout - - + Timer callback to wake up a sleeping process + + process_timeout + + + - activate_task - - + Put a task on the run queue + + activate_task + + + - sys_clone - - + Create a new task with shared resources + + sys_clone + + + - sys_vfork - - + Create a child process sharing parent's address space + + sys_vfork + + + - file - - + Open file descriptor - links process to inode + + file + + + - vm_area_struct - - + Virtual memory area descriptor + + vm_area_struct + + + - inode - - + Filesystem object - file or directory metadata + + inode + + + - fs/exec.c - - + Program execution and binary format loading + + fs/exec.c + + + - address_space - - + Page cache for a file or block device + + address_space + + + - ip_queue_xmit - - + Send a packet via IP routing + + ip_queue_xmit + + + - dev_queue_xmit - - + Transmit a packet on a network device + + dev_queue_xmit + + + - netif_rx - - + Receive a packet from a network device + + netif_rx + + + - ether_setup - - + Initialize Ethernet device defaults + + ether_setup + + + - ieee80211_xmit - - + Transmit a frame via mac80211 WiFi stack + + ieee80211_xmit + + + - ieee80211_rx - - + Receive a frame via mac80211 WiFi stack + + ieee80211_rx + + + - sd_fops - - + SCSI disk block device operations + + sd_fops + + + - scsi_device - - + SCSI device descriptor + + scsi_device + + + - scsi_driver - - + SCSI upper level device driver descriptor + + scsi_driver + + + - sys_socket - - + Create a new socket file descriptor + + sys_socket + + + - linux/syscalls.h - - + System call function prototypes + + linux/syscalls.h + + + - linux/uaccess.h - - + User-space memory access routines + + linux/uaccess.h + + + - pci_read - - + Read from PCI configuration space + + pci_read + + + - pci_write - - + Write to PCI configuration space + + pci_write + + + - ioremap - - + Map device physical memory into kernel virtual address space + + ioremap + + + - request_mem_region - - + Reserve a memory-mapped I/O region + + request_mem_region + + + - kernel_power_off - - + Shut down and power off the machine + + kernel_power_off + + + - kernel_restart - - + Shut down and restart the machine + + kernel_restart + + + - writew - - - inw - - + Write a 16-bit value to memory-mapped I/O + + writew + + + - inet_create - - + Create an IPv4 socket + + inet_create + + + - vfs_write - - + VFS write - common file write path + + vfs_write + + + - ipw2100_pci_init_one - - - zd1201_probe - - + Transmit a frame via iwlwifi driver + + iwl_mvm_mac_tx + + + - unix_family_ops - - + UNIX family socket operations + + unix_family_ops + + + - sys_mount - - + Mount a filesystem on a directory + + sys_mount + + + - load_module - - + Parse and link a kernel module into the kernel + + load_module + + + - ext4_get_sb - - + - file_system_type - - - get_sb - - + Filesystem type descriptor - one per registered filesystem + + file_system_type + + + - super_block - - + Mounted filesystem descriptor + + super_block + + + - __alloc_pages - - + Core page allocator - allocate physical pages + + __alloc_pages + + + - die - + xlink:href="https://elixir.bootlin.com/linux/latest/ident/die"> + Handle fatal CPU exception - print oops and panic + + die + + @@ -5079,210 +6497,305 @@ x="877.14386" y="1347.525" id="tspan6740" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">/proc/interrupts + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">/proc/interrupts - - cli - - + Clear interrupt flag - disable interrupts on local CPU + + cli + + + - sti - - + Set interrupt flag - enable interrupts on local CPU + + sti + + + - switch_to - - + Switch CPU context from one task to another + + switch_to + + + - system_call - - + 64-bit system call entry point from user space + + entry_SYSCALL_64 + + + - trap_init - - + Initialize CPU exception handlers + + trap_init + + + - sys_read - - - do_path_lookup - - + Internal kernel implementation of the read system call + + ksys_read + + + - vfs_create - - + Create a new inode through VFS + + vfs_create + + + - kernel/sched.c - - + Process scheduler implementation + + kernel/sched/ + + + - drivers/net/ - - + Network device drivers + + drivers/net/ + + + - show_regs - - + Print CPU register contents for debugging + + show_regs + + + - block/ - - + Block I/O layer + + block/ + + + - drivers/ - - + Device drivers + + drivers/ + + + - drivers/input/ - - + Input device drivers - keyboard, mouse, touchscreen + + drivers/input/ + + + - sound/ - - + ALSA sound subsystem + + sound/ + + + - drivers/media/ - - + Media device drivers - video capture, TV tuners + + drivers/media/ + + + - init/ - - + Kernel initialization code + + init/ + + + - kernel/ - + xlink:href="https://elixir.bootlin.com/linux/latest/source/kernel/"> + Core kernel code + + kernel/ + + @@ -5290,890 +6803,1234 @@ x="882.99048" y="1233.3175" id="tspan7104" - style="font-size:7.90243912px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">include/asm/ + style="font-size:7.90243912px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">include/asm/ - - mm/slob.c - - + SLOB simple list of blocks memory allocator + + mm/slob.c + + + - /proc/slabinfo - - - ac97_driver - - + + /proc/slabinfo + + + - usb_storage_driver - - + USB mass storage device driver + + usb_storage_driver + + + - bus_type - - + Device bus type descriptor + + bus_type + + + - device - - + Base device structure in the driver model + + device + + + - device_driver - - + Base driver structure in the driver model + + device_driver + + + - probe - - + Driver callback to detect and initialize a device + + probe + + + - class - - + Device class - groups devices by function + + class + + + - device_create - - + Create a device and register it with sysfs + + device_create + + + - driver_register - - + Register a driver with the driver model + + driver_register + + + - drivers/base/ - - + Core driver model infrastructure + + drivers/base/ + + + - kobject - - + Kernel object - base for sysfs representation and reference counting + + kobject + + + - security/ - - + Linux Security Modules framework + + security/ + + + - linux/security.h - - + Security hook function declarations + + linux/security.h + + + - selinux_ops - - - security_ops - - + Initialize SELinux mandatory access control + + selinux_init + + + - security_socket_create - - + LSM hook for socket creation permission check + + security_socket_create + + + - security_inode_create - - + LSM hook for inode creation permission check + + security_inode_create + + + - pci_register_driver - - + Register a PCI driver with the kernel + + pci_register_driver + + + - ahci_pci_driver - + xlink:href="https://elixir.bootlin.com/linux/latest/ident/ahci_pci_driver" + transform="translate(40,0)"> + AHCI SATA PCI device driver + + ahci_pci_driver + + libata + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">libata - - Scsi_Host - - + SCSI host bus adapter instance + + Scsi_Host + + + - may_open - - + Check file open permissions + + may_open + + + - create_workqueue - - + Allocate a workqueue for deferred work execution + + alloc_workqueue + + + - alloc_skb - - + Allocate a network packet buffer + + alloc_skb + + + - alsa - - + Advanced Linux Sound Architecture + + ALSA + + + - inode_operations - - + Inode operations - create, lookup, link, unlink, mkdir + + inode_operations + + + - ramfs_fs_type - - - iscsi_tcp_transport - - - smb_fs_type - - - cifs_file_ops - - - nfs_file_operations - - - sk_buff - - - mm/mmap.c - - - vma_link - - - start_thread - - - find_vma_prepare - - + RAM-based filesystem - basis for tmpfs + + ramfs_fs_type + + + + SMB/CIFS network filesystem file operations + + cifs_file_ops + + + + NFS network filesystem file operations + + nfs_file_operations + + + + Socket buffer - network packet data and metadata + + sk_buff + + + + Virtual memory area management and mmap implementation + + mm/mmap.c + + + + Link a VMA into the address space data structures + + vma_link + + + + Set up CPU registers to start a new user-space thread + + start_thread + + + - virt_to_page - - + Convert kernel virtual address to struct page + + virt_to_page + + + - fb_ops - - + Framebuffer device operations + + fb_ops + + + - pci_request_regions - - + Reserve all PCI I/O and memory regions for a device + + pci_request_regions + + + - fb_fops - - + Framebuffer device file operations + + fb_fops + + + - cdev_add - - + Add a character device to the system + + cdev_add + + + - register_chrdev - - + Register a character device with a major number + + register_chrdev + + + - kset - - + Collection of kobjects of the same type + + kset + + + - msleep - - + Sleep for a specified number of milliseconds + + msleep + + + - do_fork - - + Core implementation of fork, vfork, and clone + + kernel_clone + + + - kernel_thread - - + Create a new kernel thread + + kernel_thread + + + - current - - + Pointer to the currently running task + + current + + + - thread_info - - + Low-level task information stored at bottom of kernel stack + + thread_info + + + - semaphore - - + Sleeping lock with a counter + + semaphore + + + - workqueue_struct - - + Workqueue for scheduling deferred work + + workqueue_struct + + + - work_struct - - + Unit of deferred work submitted to a workqueue + + work_struct + + + - kthread_create - - + Create a kernel thread without starting it + + kthread_create + + + - wake_up - - + Wake up tasks waiting on a wait queue + + wake_up + + + - atomic_t - - + Integer type with atomic operations + + atomic_t + + + - mutex - - + Mutual exclusion sleeping lock + + mutex + + + - add_timer - - + Start a timer on the current CPU + + add_timer + + + - down_interruptible - - + Acquire a semaphore or return if interrupted by a signal + + down + _interruptible + + + - kswapd - - + Kernel swap daemon - reclaim pages under memory pressure + + kswapd + + + - do_swap_page - - + Handle a page fault for a swapped-out page + + do_swap_page + + + - fs/ - - + Filesystem implementations and VFS + + fs/ + + + - mm/ - - + Memory management subsystem + + mm/ + + + - kernel/ - - + Core kernel code + + kernel/ + + + - net/ - - + Networking stack + + net/ + + + - kmem_cache_alloc - - + Allocate an object from a slab cache + + kmem_cache_alloc + + + - kernel/ - - + Core kernel code + + kernel/ + + + - mousedev_handler - - - input_fops - - + Input handler for mouse-compatible devices + + mousedev_handler + + + - get_page_from_freelist - - + Allocate a page from the zone free lists + + get_page_from_freelist + + + - wakeup_kswapd - - + Wake up the page reclaim daemon + + wakeup_kswapd + + + - try_to_free_pages - - + Direct page reclaim entry point + + try_to_free_pages + + + - zone - - - drivers/media/video/ - - + Memory zone - DMA, Normal, HighMem + + zone + + + - video_device - - + V4L2 video device descriptor + + video_device + + + - NF_HOOK - - - nf_hooks - - + Netfilter hook - packet filtering and mangling entry point + + NF_HOOK + + + - tcp_transmit_skb - + xlink:href="https://elixir.bootlin.com/linux/latest/ident/tcp_transmit_skb"> + Build and send a TCP segment + + tcp_transmit_skb + + registers and interrupts - + Send data on a TCP socket + tcp_sendmsg - tcp_sendmsg + + + Receive data from a TCP socket + tcp_recvmsg - tcp_recvmsg + + + Send data over a UDP socket + udp_sendmsg - udp_sendmsg + + + Receive data from a UDP socket + udp_recvmsg - udp_recvmsg + + - netif_receive_skb - - + Process a received network packet + + netif_receive_skb + + + - linux/netdevice.h - - + Network device structure and interface definitions + + linux/netdevice.h + + + + Send an IP packet to the network + ip_output - ip_output + + + System Call Interface + style="font-size:15.12422562px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;visibility:visible;font-family:Helvetica" + xml:space="preserve" + transform="scale(0.956934,1.0450042)">System Call Interface + @@ -6285,182 +8191,260 @@ x="1327.2993" y="298.00357" id="tspan11730" - style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans">/dev/mem + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Helvetica">/dev/mem - - mem_fops - - - mmap_mem - - + File operations for /dev/mem physical memory access + + mem_fops + + + - sock_ioctl - - + Socket ioctl handler + + sock_ioctl + + + - dev_ioctl - - + Network device ioctl handler + + dev_ioctl + + + + Driver model device and class definitions + linux/device.h - linux/device.h + + + Kernel object and kset definitions + linux/kobject.h - linux/kobject.h + + + Device type within a class + device_type - device_type + + + Initialize the driver model subsystem + driver_init - driver_init + + - arch/x86/mm/ - - + x86 memory management - page tables, TLB, PAT + + arch/x86/mm/ + + + + Set a signal handler for a signal + sys_signal - sys_signal + + + ++ - ++ + + + Allocate an interrupt line + request_irq - request_irq + + + Get process and child CPU times + sys_times - sys_times + + + Get time in seconds since epoch + sys_time - sys_time + + + Get time with microsecond precision + sys_gettimeofday - sys_gettimeofday + + + Fast user-space locking system call + sys_futex + y="270.01968" + id="text8803">sys_futex + modules - + Set memory region access protection + sys_mprotect - sys_pivot_root - sys_mprotect + + + Mount the root filesystem during boot + mount_root - mount_root + + + Signal delivery and handling implementation + kernel/signal.c - kernel/signal.c + + + Send a signal to a process + sys_kill - sys_kill + + + Shared memory VMA operations + shm_vm_ops - shm_vm_ops + + + Shared memory control operations + sys_shmctl - sys_shmctl + + + Attach a shared memory segment to process address space + sys_shmat - sys_newfstat - sys_select - sys_chroot - sys_shmat + + + Get file status by file descriptor + sys_newfstat + + + Wait for I/O readiness on multiple file descriptors + kern_select + + + KVM device ioctl handler for VM management + kvm_dev_ioctl - kvm_dev_ioctl + + + Kernel-based Virtual Machine hypervisor + kvm + y="682.2439" + id="text8861">kvm + camera + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;font-family:Helvetica">camera controller - + Universal Serial Bus + USBcontroller - USBcontroller + + + Peripheral Component Interconnect + PCIcontroller - PCIcontroller + + + USB Video Class camera driver + uvc_driver - uvc_driver + + + Device control system call + sys_ioctl - sys_ioctl + + + Register a network device with the kernel + register_netdev - lock_kernel - kernel_flag - register_netdev + + + Set signal handler with extended options + do_sigaction - sys_sigaction + + + Create a pipe with flags + sys_pipe - sys_pipe2 + + + Flush file data and metadata to disk + sys_fsync - sys_fsync + + + VFS helper for filesystem sync + vfs_fsync - bdi_writeback_thread - vfs_fsync + + + Write changed pages to backing store + do_writepages - do_writepages + + + Get a reference to a file by file descriptor + fget - fget + + + File descriptor structure + fd - fd + + + Get filesystem type information + sys_sysfs - sys_sysfs + + + List of registered filesystem types + file_systems - sys_flock - sys_mkdir - file_systems + + + Create an inotify filesystem event watcher + sys_inotify_init - sys_chdir - sys_inotify_init + + + Get file attributes through VFS + vfs_getattr - vfs_getattr + + + Get file status by file descriptor through VFS + vfs_fstat - vfs_fstat + + + Create an epoll event notification instance + sys_epoll_create - sys_epoll_create + + + Allocate an object from a slab cache + kmem_cache_alloc - kmem_cache_alloc + + + Check access permissions on an inode + inode_permission - inode_permission + + + Notify filesystem of inode attribute change + notify_change - notify_change + + + Set inode attributes - size, timestamps, permissions + inode_setattr - inode_setattr + + + Change file access permissions + sys_chmod - sys_chmod + + + Read data into multiple buffers + sys_readv - sys_readv + + + I/O vector for scatter/gather operations + iovec - iovec + + + Wait for events on file descriptors + sys_poll - sys_poll + + + Duplicate pipe content without consuming + sys_tee - sys_tee + + + Get overall system statistics + sys_sysinfo + y="223.28514" + id="text8996">sys_sysinfo + + Enable a swap area for paging + sys_swapon - sys_swapon + + + Swap area descriptor + swap_info - swap_info + + + Synchronize memory mapping with file + sys_msync - sys_msync + + + Map files or devices into memory + do_mmap - - up - - sys_mmap + + + Release a semaphore + + up + + + + Release a mutex lock + mutex_unlock - mutex_unlock + + + Atomic compare and exchange with release ordering + atomic_long_try_cmpxchg_release + + + Queue a task for wakeup + wake_q_add + + + Acquire mutex, interruptible by signals + mutex_lock_interruptible - mutex_lock_interruptible + + + Try to acquire mutex lock + __mutex_trylock_common + + + Atomic compare and exchange with acquire ordering + atomic_long_try_cmpxchg_acquire + + + Page global directory entry + pgd_t - pgd_t + + + Page middle directory entry + pmd_t - pmd_t + + + Page table entry + pte_t + y="989.37628" + id="text9040">pte_t + + Architecture-specific boot initialization + setup_arch - setup_arch + + + Initialize memory management subsystem + mm_init - mm_init + + + Initialize slab allocator + kmem_cache_init - kmem_cache_init + + + Virtual memory statistics counters + vm_stat - vm_stat + + + Set process capabilities + sys_capset - sys_capset + + + x86 platform initialization operations + x86_init - x86_init + + + Ordered list of memory zones for allocation + zonelist - zonelist + + + Free kernel memory + kfree - kfree + + + Free compound or single pages + __free_pages - __free_pages + + + Free a single page to the buddy allocator + __free_one_page - __free_one_page + + + LSM hook for setting process capabilities + security_capset - security_capset + + - handle_sysrq - - + Handle SysRq key command + + handle_sysrq + + + - printk - - + Print message to kernel log ring buffer + + printk + + + - log_buf - - - kgdb_breakpoint - - + Kernel log ring buffer + + log_buf + + + + Trace and control another process + sys_ptrace - oprofile_init - oprofile_start - sys_ptrace + + + Register a kernel probe at a function entry + register_kprobe - register_kprobe + + + Module parameter descriptor + kernel_param - kernel_param + + + Initialize native x86 interrupt controller + native_init_IRQ - native_init_IRQ + + + Set an interrupt gate in the Interrupt Descriptor Table + set_intr_gate - set_intr_gate + + + Queue work on the system workqueue + schedule_work - schedule_work + + + Execute pending tasklets + tasklet_action - tasklet_action + + + Initialize tasklet and hi-tasklet softirqs + softirq_init - softirq_init + + + Declare a kernel module parameter + module_param - module_param + + + Register a bus type in the driver model + bus_register - bus_register + + + Free unused boot memory and finalize memory setup + mem_init - mem_init + + + Initialize vmalloc subsystem + vmalloc_init + y="405.59976" + id="text9160">vmalloc_init + /sys/class/ - /sys/class/ + + Initialize uevent netlink socket + kobject_uevent_init - kobject_uevent_init + + kobject_uevent  - + Send uevent notification to userspace + kobject_uevent + + + Filesystem notification interface for inotify and fanotify + fsnotify - sys_fanotify_init - fsnotify + + + DRM graphics driver descriptor + drm_driver - drm_driver + + + OOM killer - select and kill a process to free memory + out_of_memory - out_of_memory + + + Free vmalloc memory + vfree - vfree + + + . - . + + + . - . + + + Change file owner and group + sys_chown - sys_chown + + + Notify filesystem change event + fsnotify_change - fsnotify_change + + + Handle fanotify filesystem event + fanotify_handle_event + y="358.27643" + id="text9210" + sodipodi:linespacing="100%" + transform="scale(0.7690506,1.3003046)">fanotify_handle_event + /proc/meminfo - /proc/meminfo + + Total number of usable RAM pages + totalram_pages - num_physpages + id="text9216" + sodipodi:linespacing="100%" + transform="scale(0.9139904,1.0941034)">totalram_pages + - + Initialize a work_struct with callback function + INIT_WORK - INIT_WORK + + + Queue work on a workqueue + queue_work - usb_stor_host_template - queue_work + + + Allocate a SCSI host adapter instance + scsi_host_alloc - scsi_host_alloc + + + Read directory entries + sys_getdents - sys_getdents + + + Read ext4 directory entries + ext4_readdir - generic_file_aio_read - ext4_readdir + + + List of free pages in a buddy allocator order + free_list - free_list + + + Buddy allocator free area for a given order + free_area - free_area + + + VM counter for number of free pages + NR_FREE_PAGES - NR_FREE_PAGES + + + /proc/net/ - /proc/net/ + + + Show TCP IPv4 socket info in /proc/net/tcp + tcp4_seq_show - tcp4_seq_show + + + Show SCSI generic device info in /proc + sg_proc_seq_show_dev - sg_proc_seq_show_dev + + + Show routing table trie entries in /proc + rt_cache_seq_show - fib_trie_seq_show + + + Connect a socket to a remote address + sys_connect - sys_connect + + + Accept an incoming connection on a socket + sys_accept - __sys_accept4 + + + Bind a socket to a local address + sys_bind - __sys_bind + + + Mark socket as listening for connections + sys_listen - sys_listen + + + Send a message on a socket + sys_sendmsg - __sys_sendmsg + + + Receive a message from a socket + sys_recvmsg - __sys_recvmsg + + + Set socket options + sys_setsockopt - __sys_setsockopt + + + Zero-copy splice data from a pipe to a socket + sock_sendpage - splice_to_socket + + + Zero-copy splice data from a socket to a pipe + sock_splice_read - sock_splice_read + + + Zero-copy transfer between file descriptors + sys_sendfile - sys_sendfile + + + Zero-copy splice directly between two files via pipe + do_splice_direct - do_splice_direct + + + Core zero-copy splice implementation between two files + sys_splice - __do_splice + + + Intel ICE network driver transmit handler + e1000_xmit_frame - ice_start_xmit + + + Intel ICE miscellaneous interrupt handler + e1000_intr - ice_misc_intr + + + Probe and initialize USB network device + usbnet_probe - usbnet_probe + + + Signal that network link carrier is detected + netif_carrier_on - netif_carrier_on + + + Look up routing table for incoming packet + ip_route_input - ip_route_input + + + Receive incoming UDP packets + udp_rcv - udp_rcv + + + Receive incoming TCP IPv4 packets + tcp_v4_rcv - tcp_v4_rcv + + + Deliver IP packet to upper protocol layers + ip_local_deliver - ip_local_deliver + + + Push pending IP frames to the network + ip_push_pending_frames + y="762.20044" + id="text9361" + transform="scale(0.781625,1.2793859)">ip_push_pending_frames + functionsimplementations + style="font-size:15.80487823px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;visibility:visible;display:inline;font-family:Helvetica" + xml:space="preserve">functionimplementations power management - + Suspend system to disk + hibernate - hibernate + + + Machine-level operations - restart, power off, halt + machine_ops - machine_ops + + + Set up early exception handlers in Interrupt Descriptor Table + early_trap_init - idt_setup_early_traps + + + Initialize IPv4 networking stack + inet_init - udp_sendpage - inet_init + + + Send a message through a socket + tcp_sendpage - sock_sendmsg + + + Zero-copy splice data from TCP socket to pipe + tcp_splice_read - tcp_splice_read + + spin_unlock_irqrestore - + Release spinlock and restore interrupt state + spin_unlock_irqrestore + + + Acquire spinlock and save interrupt state + spin_lock_irqsave - spin_lock_irqsave + + + Sleep until a condition becomes true + wait_event - wait_event + + + Wait for a completion event + wait_for_completion - wait_for_completion + + + Signal a completion event + - + complete - complete + + + Module owner field for reference counting + owner - owner + + + Softirq handler for expired kernel timers + run_timer_softirq - run_timer_softirq + + + Fill sysinfo struct with memory statistics + si_meminfo - si_meminfo + + + Fill sysinfo struct with swap statistics + si_swapinfo - si_swapinfo + + + Check if pages are resident in memory + sys_mincore - sys_mincore + + - ACPI - - + Advanced Configuration and Power Interface + + ACPI + + + - mm/slub.c - - + SLUB slab allocator implementation + + mm/slub.c + + + - mm/slab.c - + xlink:href="https://elixir.bootlin.com/linux/latest/source/mm/slab.c"> + SLAB allocator implementation + + mm/slab.c + + + + input_handler + + + Performance monitoring event descriptor + + perf_event + + + + + Submit I/O requests to block devices + submit_bio + + + NVMe block driver request queue handler + nvme_queue_rq + + + XFS filesystem file operations + xfs_file_operations + + + Common entry point for both prctl and syscall + do_seccomp + + + BPF syscall - load and run eBPF programs + __sys_bpf + + + Trace event descriptor for ftrace + + trace_event + + + + + Video for Linux version 2 + + V4L2 + + + + + + drivers/media/mouse/ + + + + + Allocate virtually contiguous memory + + vmalloc + + + + Allocate a virtual address range for vmalloc + + alloc_vmap_area + + + + + NVMe + + + + + NVMe + + + + Create an epoll file descriptor for I/O event notification + sys_epoll_create + + + Initialize a fanotify notification group + sys_fanotify_init + + + Asynchronous I/O interface + io_uring + + + Change the root filesystem + sys_pivot_root + + + Change root directory + sys_chroot + + + Create a directory relative to a directory fd + sys_mkdirat + + + Change current working directory + sys_chdir + + + Apply advisory lock on an open file + sys_flock + + + Supervisor Mode Access Prevention - protects user pages from kernel access + smap.h + + + Minor device registration for misc character devices + + miscdevice + + + 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"] +|=== +| <> +| <> +| <> +| <> +| <> +| <> + +| +<> + +<