Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'docs-6.3' of git://git.lwn.net/linux

Pull documentation updates from Jonathan Corbet:
"It has been a moderately calm cycle for documentation; the significant
changes include:

- Some significant additions to the memory-management documentation

- Some improvements to navigation in the HTML-rendered docs

- More Spanish and Chinese translations

... and the usual set of typo fixes and such"

* tag 'docs-6.3' of git://git.lwn.net/linux: (68 commits)
Documentation/watchdog/hpwdt: Fix Format
Documentation/watchdog/hpwdt: Fix Reference
Documentation: core-api: padata: correct spelling
docs/mm: Physical Memory: correct spelling in reference to CONFIG_PAGE_EXTENSION
docs: Use HTML comments for the kernel-toc SPDX line
docs: Add more information to the HTML sidebar
Documentation: KVM: Update AMD memory encryption link
printk: Document that CONFIG_BOOT_PRINTK_DELAY required for boot_delay=
Documentation: userspace-api: correct spelling
Documentation: sparc: correct spelling
Documentation: driver-api: correct spelling
Documentation: admin-guide: correct spelling
docs: add workload-tracing document to admin-guide
docs/admin-guide/mm: remove useless markup
docs/mm: remove useless markup
docs/mm: Physical Memory: remove useless markup
docs/sp_SP: Add process magic-number translation
docs: ftrace: always use canonical ftrace path
Doc/damon: fix the data path error
dma-buf: Add "dma-buf" to title of documentation
...

+3355 -914
+8 -2
Documentation/Kconfig
··· 1 + if COMPILE_TEST 2 + 3 + menu "Documentation" 4 + 1 5 config WARN_MISSING_DOCUMENTS 2 6 bool "Warn if there's a missing documentation file" 3 - depends on COMPILE_TEST 4 7 help 5 8 It is not uncommon that a document gets renamed. 6 9 This option makes the Kernel to check for missing dependencies, ··· 14 11 15 12 config WARN_ABI_ERRORS 16 13 bool "Warn if there are errors at ABI files" 17 - depends on COMPILE_TEST 18 14 help 19 15 The files under Documentation/ABI should follow what's 20 16 described at Documentation/ABI/README. Yet, as they're manually ··· 22 20 scripts/get_abi.pl. Add a check to verify them. 23 21 24 22 If unsure, select 'N'. 23 + 24 + endmenu 25 + 26 + endif
+3 -3
Documentation/PCI/index.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - ======================= 4 - Linux PCI Bus Subsystem 5 - ======================= 3 + ================= 4 + PCI Bus Subsystem 5 + ================= 6 6 7 7 .. toctree:: 8 8 :maxdepth: 2
+1 -1
Documentation/accel/introduction.rst
··· 69 69 70 70 - device char files - /dev/accel/accel* 71 71 - sysfs - /sys/class/accel/accel*/ 72 - - debugfs - /sys/kernel/debug/accel/accel*/ 72 + - debugfs - /sys/kernel/debug/accel/*/ 73 73 74 74 Getting Started 75 75 ===============
+1 -1
Documentation/admin-guide/bcache.rst
··· 204 204 This should present your unmodified backing device data in /dev/loop0 205 205 206 206 If your cache is in writethrough mode, then you can safely discard the 207 - cache device without loosing data. 207 + cache device without losing data. 208 208 209 209 210 210 E) Wiping a cache device
+1 -1
Documentation/admin-guide/cgroup-v1/blkio-controller.rst
··· 106 106 see Documentation/block/bfq-iosched.rst. 107 107 108 108 blkio.bfq.weight_device 109 - Specifes per cgroup per device weights, overriding the default group 109 + Specifies per cgroup per device weights, overriding the default group 110 110 weight. For more details, see Documentation/block/bfq-iosched.rst. 111 111 112 112 Following is the format::
+5 -5
Documentation/admin-guide/cgroup-v2.rst
··· 624 624 Limits 625 625 ------ 626 626 627 - A child can only consume upto the configured amount of the resource. 627 + A child can only consume up to the configured amount of the resource. 628 628 Limits can be over-committed - the sum of the limits of children can 629 629 exceed the amount of resource available to the parent. 630 630 ··· 642 642 Protections 643 643 ----------- 644 644 645 - A cgroup is protected upto the configured amount of the resource 645 + A cgroup is protected up to the configured amount of the resource 646 646 as long as the usages of all its ancestors are under their 647 647 protected levels. Protections can be hard guarantees or best effort 648 648 soft boundaries. Protections can also be over-committed in which case 649 - only upto the amount available to the parent is protected among 649 + only up to the amount available to the parent is protected among 650 650 children. 651 651 652 652 Protections are in the range [0, max] and defaults to 0, which is ··· 1079 1079 1080 1080 $MAX $PERIOD 1081 1081 1082 - which indicates that the group may consume upto $MAX in each 1082 + which indicates that the group may consume up to $MAX in each 1083 1083 $PERIOD duration. "max" for $MAX indicates no limit. If only 1084 1084 one number is written, $MAX is updated. 1085 1085 ··· 2289 2289 For a valid partition root with the sibling cpu exclusivity 2290 2290 rule enabled, changes made to "cpuset.cpus" that violate the 2291 2291 exclusivity rule will invalidate the partition as well as its 2292 - sibiling partitions with conflicting cpuset.cpus values. So 2292 + sibling partitions with conflicting cpuset.cpus values. So 2293 2293 care must be taking in changing "cpuset.cpus". 2294 2294 2295 2295 A valid non-root parent partition may distribute out all its CPUs
+2 -2
Documentation/admin-guide/cifs/usage.rst
··· 399 399 sep 400 400 if first mount option (after the -o), overrides 401 401 the comma as the separator between the mount 402 - parms. e.g.:: 402 + parameters. e.g.:: 403 403 404 404 -o user=myname,password=mypassword,domain=mydom 405 405 ··· 765 765 Some debugging statements are not compiled into the 766 766 cifs kernel unless CONFIG_CIFS_DEBUG2 is enabled in the 767 767 kernel configuration. cifsFYI may be set to one or 768 - nore of the following flags (7 sets them all):: 768 + more of the following flags (7 sets them all):: 769 769 770 770 +-----------------------------------------------+------+ 771 771 | log cifs informational messages | 0x01 |
+1 -1
Documentation/admin-guide/device-mapper/cache-policies.rst
··· 70 70 cache block). 71 71 72 72 All this means smq uses ~25bytes per cache block. Still a lot of 73 - memory, but a substantial improvement nontheless. 73 + memory, but a substantial improvement nonetheless. 74 74 75 75 Level balancing 76 76 ^^^^^^^^^^^^^^^
+1 -1
Documentation/admin-guide/device-mapper/dm-ebs.rst
··· 31 31 32 32 Optional parameter: 33 33 34 - <underyling sectors>: 34 + <underlying sectors>: 35 35 Number of sectors defining the logical block size of <dev path>. 36 36 2^N supported, e.g. 8 = emulate 8 sectors of 512 bytes = 4KiB. 37 37 If not provided, the logical block size of <dev path> will be used.
+1 -1
Documentation/admin-guide/device-mapper/dm-zoned.rst
··· 46 46 The zones of the device(s) are separated into 2 types: 47 47 48 48 1) Metadata zones: these are conventional zones used to store metadata. 49 - Metadata zones are not reported as useable capacity to the user. 49 + Metadata zones are not reported as usable capacity to the user. 50 50 51 51 2) Data zones: all remaining zones, the vast majority of which will be 52 52 sequential zones used exclusively to store user data. The conventional
+5 -5
Documentation/admin-guide/device-mapper/unstriped.rst
··· 35 35 36 36 This small bash script will setup 4 loop devices and use the existing 37 37 striped target to combine the 4 devices into one. It then will use 38 - the unstriped target ontop of the striped device to access the 38 + the unstriped target on top of the striped device to access the 39 39 individual backing loop devices. We write data to the newly exposed 40 40 unstriped devices and verify the data written matches the correct 41 41 underlying device on the striped array:: ··· 110 110 Example dmsetup usage 111 111 ===================== 112 112 113 - unstriped ontop of Intel NVMe device that has 2 cores 114 - ----------------------------------------------------- 113 + unstriped on top of Intel NVMe device that has 2 cores 114 + ------------------------------------------------------ 115 115 116 116 :: 117 117 ··· 124 124 /dev/mapper/nvmset0 125 125 /dev/mapper/nvmset1 126 126 127 - unstriped ontop of striped with 4 drives using 128K chunk size 128 - -------------------------------------------------------------- 127 + unstriped on top of striped with 4 drives using 128K chunk size 128 + --------------------------------------------------------------- 129 129 130 130 :: 131 131
+1 -1
Documentation/admin-guide/dynamic-debug-howto.rst
··· 330 330 331 331 // boot-args example, with newlines and comments for readability 332 332 Kernel command line: ... 333 - // see whats going on in dyndbg=value processing 333 + // see what's going on in dyndbg=value processing 334 334 dynamic_debug.verbose=3 335 335 // enable pr_debugs in the btrfs module (can be builtin or loadable) 336 336 btrfs.dyndbg="+p"
+1 -1
Documentation/admin-guide/gpio/gpio-sim.rst
··· 123 123 directory for each exposed line 124 124 (e.g. ``/sys/devices/platform/gpio-sim.X/gpiochipY/``). The name of each group 125 125 is of the form: ``'sim_gpioX'`` where X is the offset of the line. Inside each 126 - group there are two attibutes: 126 + group there are two attributes: 127 127 128 128 ``pull`` - allows to read and set the current simulated pull setting for 129 129 every line, when writing the value must be one of: ``'pull-up'``,
+2 -2
Documentation/admin-guide/hw-vuln/mds.rst
··· 64 64 Attack scenarios 65 65 ---------------- 66 66 67 - Attacks against the MDS vulnerabilities can be mounted from malicious non 68 - priviledged user space applications running on hosts or guest. Malicious 67 + Attacks against the MDS vulnerabilities can be mounted from malicious non- 68 + privileged user space applications running on hosts or guest. Malicious 69 69 guest OSes can obviously mount attacks as well. 70 70 71 71 Contrary to other speculation based vulnerabilities the MDS vulnerability
+11
Documentation/admin-guide/index.rst
··· 56 56 57 57 sysfs-rules 58 58 59 + This is the beginning of a section with information of interest to 60 + application developers and system integrators doing analysis of the 61 + Linux kernel for safety critical applications. Documents supporting 62 + analysis of kernel interactions with applications, and key kernel 63 + subsystems expectations will be found here. 64 + 65 + .. toctree:: 66 + :maxdepth: 1 67 + 68 + workload-tracing 69 + 59 70 The rest of this manual consists of various unordered guides on how to 60 71 configure specific aspects of kernel behavior to your liking. 61 72
+75 -73
Documentation/admin-guide/kernel-parameters.txt
··· 378 378 autoconf= [IPV6] 379 379 See Documentation/networking/ipv6.rst. 380 380 381 - show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller 382 - Limit apic dumping. The parameter defines the maximal 383 - number of local apics being dumped. Also it is possible 384 - to set it to "all" by meaning -- no limit here. 385 - Format: { 1 (default) | 2 | ... | all }. 386 - The parameter valid if only apic=debug or 387 - apic=verbose is specified. 388 - Example: apic=debug show_lapic=all 389 - 390 381 apm= [APM] Advanced Power Management 391 382 See header of arch/x86/kernel/apm_32.c. 383 + 384 + apparmor= [APPARMOR] Disable or enable AppArmor at boot time 385 + Format: { "0" | "1" } 386 + See security/apparmor/Kconfig help text 387 + 0 -- disable. 388 + 1 -- enable. 389 + Default value is set via kernel config option. 392 390 393 391 arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards 394 392 Format: <io>,<irq>,<nodeID> ··· 478 480 See Documentation/block/cmdline-partition.rst 479 481 480 482 boot_delay= Milliseconds to delay each printk during boot. 481 - Values larger than 10 seconds (10000) are changed to 482 - no delay (0). 483 + Only works if CONFIG_BOOT_PRINTK_DELAY is enabled, 484 + and you may also have to specify "lpj=". Boot_delay 485 + values larger than 10 seconds (10000) are assumed 486 + erroneous and ignored. 483 487 Format: integer 484 488 485 489 bootconfig [KNL] ··· 673 673 Sets the size of kernel per-numa memory area for 674 674 contiguous memory allocations. A value of 0 disables 675 675 per-numa CMA altogether. And If this option is not 676 - specificed, the default value is 0. 676 + specified, the default value is 0. 677 677 With per-numa CMA enabled, DMA users on node nid will 678 678 first try to allocate buffer from the pernuma area 679 679 which is located in node nid, if the allocation fails, ··· 945 945 driver code when a CPU writes to (or reads from) a 946 946 random memory location. Note that there exists a class 947 947 of memory corruptions problems caused by buggy H/W or 948 - F/W or by drivers badly programing DMA (basically when 948 + F/W or by drivers badly programming DMA (basically when 949 949 memory is written at bus level and the CPU MMU is 950 950 bypassed) which are not detectable by 951 951 CONFIG_DEBUG_PAGEALLOC, hence this option will not help ··· 1046 1046 can be useful when debugging issues that require an SLB 1047 1047 miss to occur. 1048 1048 1049 - stress_slb [PPC] 1050 - Limits the number of kernel SLB entries, and flushes 1051 - them frequently to increase the rate of SLB faults 1052 - on kernel addresses. 1053 - 1054 - stress_hpt [PPC] 1055 - Limits the number of kernel HPT entries in the hash 1056 - page table to increase the rate of hash page table 1057 - faults on kernel addresses. 1058 - 1059 1049 disable= [IPV6] 1060 1050 See Documentation/networking/ipv6.rst. 1061 1051 1062 1052 disable_radix [PPC] 1063 1053 Disable RADIX MMU mode on POWER9 1064 - 1065 - radix_hcall_invalidate=on [PPC/PSERIES] 1066 - Disable RADIX GTSE feature and use hcall for TLB 1067 - invalidate. 1068 1054 1069 1055 disable_tlbie [PPC] 1070 1056 Disable TLBIE instruction. Currently does not work ··· 1152 1166 Enable debug messages at boot time. See 1153 1167 Documentation/admin-guide/dynamic-debug-howto.rst 1154 1168 for details. 1155 - 1156 - nopku [X86] Disable Memory Protection Keys CPU feature found 1157 - in some Intel CPUs. 1158 - 1159 - <module>.async_probe[=<bool>] [KNL] 1160 - If no <bool> value is specified or if the value 1161 - specified is not a valid <bool>, enable asynchronous 1162 - probe on this module. Otherwise, enable/disable 1163 - asynchronous probe on this module as indicated by the 1164 - <bool> value. See also: module.async_probe 1165 1169 1166 1170 early_ioremap_debug [KNL] 1167 1171 Enable debug messages in early_ioremap support. This ··· 1729 1753 boot-time allocation of gigantic hugepages is skipped. 1730 1754 1731 1755 hugetlb_free_vmemmap= 1732 - [KNL] Reguires CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP 1756 + [KNL] Requires CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP 1733 1757 enabled. 1734 1758 Control if HugeTLB Vmemmap Optimization (HVO) is enabled. 1735 1759 Allows heavy hugetlb users to free up some more ··· 1767 1791 hv_nopvspin [X86,HYPER_V] Disables the paravirt spinlock optimizations 1768 1792 which allow the hypervisor to 'idle' the 1769 1793 guest on lock contention. 1770 - 1771 - keep_bootcon [KNL] 1772 - Do not unregister boot console at start. This is only 1773 - useful for debugging when something happens in the window 1774 - between unregistering the boot console and initializing 1775 - the real console. 1776 1794 1777 1795 i2c_bus= [HW] Override the default board specific I2C bus speed 1778 1796 or register an additional I2C bus that is not ··· 2337 2367 js= [HW,JOY] Analog joystick 2338 2368 See Documentation/input/joydev/joystick.rst. 2339 2369 2340 - nokaslr [KNL] 2341 - When CONFIG_RANDOMIZE_BASE is set, this disables 2342 - kernel and module base offset ASLR (Address Space 2343 - Layout Randomization). 2344 - 2345 2370 kasan_multi_shot 2346 2371 [KNL] Enforce KASAN (Kernel Address Sanitizer) to print 2347 2372 report on every invalid memory access. Without this 2348 2373 parameter KASAN will print report only for the first 2349 2374 invalid access. 2375 + 2376 + keep_bootcon [KNL] 2377 + Do not unregister boot console at start. This is only 2378 + useful for debugging when something happens in the window 2379 + between unregistering the boot console and initializing 2380 + the real console. 2350 2381 2351 2382 keepinitrd [HW,ARM] 2352 2383 ··· 3297 3326 For details see: 3298 3327 Documentation/admin-guide/hw-vuln/processor_mmio_stale_data.rst 3299 3328 3329 + <module>.async_probe[=<bool>] [KNL] 3330 + If no <bool> value is specified or if the value 3331 + specified is not a valid <bool>, enable asynchronous 3332 + probe on this module. Otherwise, enable/disable 3333 + asynchronous probe on this module as indicated by the 3334 + <bool> value. See also: module.async_probe 3335 + 3300 3336 module.async_probe=<bool> 3301 3337 [KNL] When set to true, modules will use async probing 3302 3338 by default. To enable/disable async probing for a ··· 3687 3709 implementation; requires CONFIG_GENERIC_IDLE_POLL_SETUP 3688 3710 to be effective. This is useful on platforms where the 3689 3711 sleep(SH) or wfi(ARM,ARM64) instructions do not work 3690 - correctly or when doing power measurements to evalute 3712 + correctly or when doing power measurements to evaluate 3691 3713 the impact of the sleep instructions. This is also 3692 3714 useful when using JTAG debugger. 3693 3715 ··· 3758 3780 3759 3781 nojitter [IA-64] Disables jitter checking for ITC timers. 3760 3782 3783 + nokaslr [KNL] 3784 + When CONFIG_RANDOMIZE_BASE is set, this disables 3785 + kernel and module base offset ASLR (Address Space 3786 + Layout Randomization). 3787 + 3761 3788 no-kvmclock [X86,KVM] Disable paravirtualized KVM clock driver 3762 3789 3763 3790 no-kvmapf [X86,KVM] Disable paravirtualized asynchronous page ··· 3807 3824 pagetables) support. 3808 3825 3809 3826 nopcid [X86-64] Disable the PCID cpu feature. 3827 + 3828 + nopku [X86] Disable Memory Protection Keys CPU feature found 3829 + in some Intel CPUs. 3830 + 3831 + nopv= [X86,XEN,KVM,HYPER_V,VMWARE] 3832 + Disables the PV optimizations forcing the guest to run 3833 + as generic guest with no PV drivers. Currently support 3834 + XEN HVM, KVM, HYPER_V and VMWARE guest. 3835 + 3836 + nopvspin [X86,XEN,KVM] 3837 + Disables the qspinlock slow path using PV optimizations 3838 + which allow the hypervisor to 'idle' the guest on lock 3839 + contention. 3810 3840 3811 3841 norandmaps Don't use address space randomization. Equivalent to 3812 3842 echo 0 > /proc/sys/kernel/randomize_va_space ··· 4587 4591 quiet [KNL] Disable most log messages 4588 4592 4589 4593 r128= [HW,DRM] 4594 + 4595 + radix_hcall_invalidate=on [PPC/PSERIES] 4596 + Disable RADIX GTSE feature and use hcall for TLB 4597 + invalidate. 4590 4598 4591 4599 raid= [HW,RAID] 4592 4600 See Documentation/admin-guide/md.rst. ··· 5584 5584 1 -- enable. 5585 5585 Default value is 1. 5586 5586 5587 - apparmor= [APPARMOR] Disable or enable AppArmor at boot time 5588 - Format: { "0" | "1" } 5589 - See security/apparmor/Kconfig help text 5590 - 0 -- disable. 5591 - 1 -- enable. 5592 - Default value is set via kernel config option. 5593 - 5594 5587 serialnumber [BUGS=X86-32] 5595 5588 5596 5589 sev=option[,option...] [X86-64] See Documentation/x86/x86_64/boot-options.rst 5597 5590 5598 5591 shapers= [NET] 5599 5592 Maximal number of shapers. 5593 + 5594 + show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller 5595 + Limit apic dumping. The parameter defines the maximal 5596 + number of local apics being dumped. Also it is possible 5597 + to set it to "all" by meaning -- no limit here. 5598 + Format: { 1 (default) | 2 | ... | all }. 5599 + The parameter valid if only apic=debug or 5600 + apic=verbose is specified. 5601 + Example: apic=debug show_lapic=all 5600 5602 5601 5603 simeth= [IA-64] 5602 5604 simscsi= ··· 6039 6037 be used to filter out binaries which have 6040 6038 not yet been made aware of AT_MINSIGSTKSZ. 6041 6039 6040 + stress_hpt [PPC] 6041 + Limits the number of kernel HPT entries in the hash 6042 + page table to increase the rate of hash page table 6043 + faults on kernel addresses. 6044 + 6045 + stress_slb [PPC] 6046 + Limits the number of kernel SLB entries, and flushes 6047 + them frequently to increase the rate of SLB faults 6048 + on kernel addresses. 6049 + 6042 6050 sunrpc.min_resvport= 6043 6051 sunrpc.max_resvport= 6044 6052 [NFS,SUNRPC] ··· 6302 6290 that can be enabled or disabled just as if you were 6303 6291 to echo the option name into 6304 6292 6305 - /sys/kernel/debug/tracing/trace_options 6293 + /sys/kernel/tracing/trace_options 6306 6294 6307 6295 For example, to enable stacktrace option (to dump the 6308 6296 stack trace of each event), add to the command line: ··· 6335 6323 [FTRACE] enable this option to disable tracing when a 6336 6324 warning is hit. This turns off "tracing_on". Tracing can 6337 6325 be enabled again by echoing '1' into the "tracing_on" 6338 - file located in /sys/kernel/debug/tracing/ 6326 + file located in /sys/kernel/tracing/ 6339 6327 6340 6328 This option is useful, as it disables the trace before 6341 6329 the WARNING dump is called, which prevents the trace to ··· 6790 6778 functions are at fixed addresses, they make nice 6791 6779 targets for exploits that can control RIP. 6792 6780 6793 - emulate [default] Vsyscalls turn into traps and are 6794 - emulated reasonably safely. The vsyscall 6795 - page is readable. 6781 + emulate Vsyscalls turn into traps and are emulated 6782 + reasonably safely. The vsyscall page is 6783 + readable. 6796 6784 6797 - xonly Vsyscalls turn into traps and are 6785 + xonly [default] Vsyscalls turn into traps and are 6798 6786 emulated reasonably safely. The vsyscall 6799 6787 page is not readable. 6800 6788 ··· 6990 6978 preferred over the 2-level event handling, as it is 6991 6979 fairer and the number of possible event channels is 6992 6980 much higher. Default is on (use fifo events). 6993 - 6994 - nopv= [X86,XEN,KVM,HYPER_V,VMWARE] 6995 - Disables the PV optimizations forcing the guest to run 6996 - as generic guest with no PV drivers. Currently support 6997 - XEN HVM, KVM, HYPER_V and VMWARE guest. 6998 - 6999 - nopvspin [X86,XEN,KVM] 7000 - Disables the qspinlock slow path using PV optimizations 7001 - which allow the hypervisor to 'idle' the guest on lock 7002 - contention. 7003 6981 7004 6982 xirc2ps_cs= [NET,PCMCIA] 7005 6983 Format:
+1 -1
Documentation/admin-guide/kernel-per-CPU-kthreads.rst
··· 25 25 26 26 - In order to locate kernel-generated OS jitter on CPU N: 27 27 28 - cd /sys/kernel/debug/tracing 28 + cd /sys/kernel/tracing 29 29 echo 1 > max_graph_depth # Increase the "1" for more detail 30 30 echo function_graph > current_tracer 31 31 # run workload
+1 -1
Documentation/admin-guide/laptops/thinkpad-acpi.rst
··· 1488 1488 Text corresponding to keyboard layout to be set in sysfs are: be(Belgian), 1489 1489 cz(Czech), da(Danish), de(German), en(English), es(Spain), et(Estonian), 1490 1490 fr(French), fr-ch(French(Switzerland)), hu(Hungarian), it(Italy), jp (Japan), 1491 - nl(Dutch), nn(Norway), pl(Polish), pt(portugese), sl(Slovenian), sv(Sweden), 1491 + nl(Dutch), nn(Norway), pl(Polish), pt(portuguese), sl(Slovenian), sv(Sweden), 1492 1492 tr(Turkey) 1493 1493 1494 1494 WWAN Antenna type
+1 -1
Documentation/admin-guide/md.rst
··· 317 317 suspended (not supported yet) 318 318 All IO requests will block. The array can be reconfigured. 319 319 320 - Writing this, if accepted, will block until array is quiessent 320 + Writing this, if accepted, will block until array is quiescent 321 321 322 322 readonly 323 323 no resync can happen. no superblocks get written.
+1 -1
Documentation/admin-guide/media/bttv.rst
··· 909 909 - TVPhone98 (Bt878) 910 910 - AVerTV und TVCapture98 w/VCR (Bt 878) 911 911 - AVerTVStudio und TVPhone98 w/VCR (Bt878) 912 - - AVerTV GO Serie (Kein SVideo Input) 912 + - AVerTV GO Series (Kein SVideo Input) 913 913 - AVerTV98 (BT-878 chip) 914 914 - AVerTV98 mit Fernbedienung (BT-878 chip) 915 915 - AVerTV/FM98 (BT-878 chip)
+1 -1
Documentation/admin-guide/media/building.rst
··· 137 137 from remote controllers. 138 138 139 139 The ``Support for eBPF programs attached to lirc devices`` option allows 140 - the usage of special programs (called eBPF) that would allow aplications 140 + the usage of special programs (called eBPF) that would allow applications 141 141 to add extra remote controller decoding functionality to the Linux Kernel. 142 142 143 143 The ``Remote controller decoders`` option allows selecting the
+1 -1
Documentation/admin-guide/media/si476x.rst
··· 142 142 indicator 143 143 0x18 lassi Signed Low side adjacent Channel 144 144 Strength indicator 145 - 0x19 hassi ditto fpr High side 145 + 0x19 hassi ditto for High side 146 146 0x20 mult Multipath indicator 147 147 0x21 dev Frequency deviation 148 148 0x24 assi Adjacent channel SSI
+1 -1
Documentation/admin-guide/media/vivid.rst
··· 580 580 ---------------- 581 581 582 582 The Metadata capture generates UVC format metadata. The PTS and SCR are 583 - transmitted based on the values set in vivid contols. 583 + transmitted based on the values set in vivid controls. 584 584 585 585 The Metadata device will only work for the Webcam input, it will give 586 586 back an error for all other inputs.
+5 -8
Documentation/admin-guide/mm/concepts.rst
··· 1 - .. _mm_concepts: 2 - 3 1 ================= 4 2 Concepts overview 5 3 ================= ··· 84 86 hugetlbfs. It is a pseudo filesystem that uses RAM as its backing 85 87 store. For the files created in this filesystem the data resides in 86 88 the memory and mapped using huge pages. The hugetlbfs is described at 87 - :ref:`Documentation/admin-guide/mm/hugetlbpage.rst <hugetlbpage>`. 89 + Documentation/admin-guide/mm/hugetlbpage.rst. 88 90 89 91 Another, more recent, mechanism that enables use of the huge pages is 90 92 called `Transparent HugePages`, or THP. Unlike the hugetlbfs that 91 93 requires users and/or system administrators to configure what parts of 92 94 the system memory should and can be mapped by the huge pages, THP 93 95 manages such mappings transparently to the user and hence the 94 - name. See 95 - :ref:`Documentation/admin-guide/mm/transhuge.rst <admin_guide_transhuge>` 96 - for more details about THP. 96 + name. See Documentation/admin-guide/mm/transhuge.rst for more details 97 + about THP. 97 98 98 99 Zones 99 100 ===== ··· 122 125 constructs an independent memory management subsystem. A node has its 123 126 own set of zones, lists of free and used pages and various statistics 124 127 counters. You can find more details about NUMA in 125 - :ref:`Documentation/mm/numa.rst <numa>` and in 126 - :ref:`Documentation/admin-guide/mm/numa_memory_policy.rst <numa_memory_policy>`. 128 + Documentation/mm/numa.rst` and in 129 + Documentation/admin-guide/mm/numa_memory_policy.rst. 127 130 128 131 Page cache 129 132 ==========
+2 -2
Documentation/admin-guide/mm/damon/lru_sort.rst
··· 54 54 To let sysadmins enable or disable it and tune for the given system, 55 55 DAMON_LRU_SORT utilizes module parameters. That is, you can put 56 56 ``damon_lru_sort.<parameter>=<value>`` on the kernel boot command line or write 57 - proper values to ``/sys/modules/damon_lru_sort/parameters/<parameter>`` files. 57 + proper values to ``/sys/module/damon_lru_sort/parameters/<parameter>`` files. 58 58 59 59 Below are the description of each parameter. 60 60 ··· 283 283 20%, it asks DAMON_LRU_SORT to do nothing again, so that we can fall back to 284 284 the LRU-list based page granularity reclamation. :: 285 285 286 - # cd /sys/modules/damon_lru_sort/parameters 286 + # cd /sys/module/damon_lru_sort/parameters 287 287 # echo 500 > hot_thres_access_freq 288 288 # echo 120000000 > cold_min_age 289 289 # echo 10 > quota_ms
+2 -2
Documentation/admin-guide/mm/damon/reclaim.rst
··· 46 46 To let sysadmins enable or disable it and tune for the given system, 47 47 DAMON_RECLAIM utilizes module parameters. That is, you can put 48 48 ``damon_reclaim.<parameter>=<value>`` on the kernel boot command line or write 49 - proper values to ``/sys/modules/damon_reclaim/parameters/<parameter>`` files. 49 + proper values to ``/sys/module/damon_reclaim/parameters/<parameter>`` files. 50 50 51 51 Below are the description of each parameter. 52 52 ··· 251 251 do nothing again, so that we can fall back to the LRU-list based page 252 252 granularity reclamation. :: 253 253 254 - # cd /sys/modules/damon_reclaim/parameters 254 + # cd /sys/module/damon_reclaim/parameters 255 255 # echo 30000000 > min_age 256 256 # echo $((1 * 1024 * 1024 * 1024)) > quota_sz 257 257 # echo 1000 > quota_reset_interval_ms
+2 -4
Documentation/admin-guide/mm/hugetlbpage.rst
··· 1 - .. _hugetlbpage: 2 - 3 1 ============= 4 2 HugeTLB Pages 5 3 ============= ··· 84 86 85 87 Note: When the feature of freeing unused vmemmap pages associated with each 86 88 hugetlb page is enabled, we can fail to free the huge pages triggered by 87 - the user when ths system is under memory pressure. Please try again later. 89 + the user when the system is under memory pressure. Please try again later. 88 90 89 91 Pages that are used as huge pages are reserved inside the kernel and cannot 90 92 be used for other purposes. Huge pages cannot be swapped out under ··· 311 313 resulting effect on persistent huge page allocation is as follows: 312 314 313 315 #. Regardless of mempolicy mode [see 314 - :ref:`Documentation/admin-guide/mm/numa_memory_policy.rst <numa_memory_policy>`], 316 + Documentation/admin-guide/mm/numa_memory_policy.rst], 315 317 persistent huge pages will be distributed across the node or nodes 316 318 specified in the mempolicy as if "interleave" had been specified. 317 319 However, if a node in the policy does not contain sufficient contiguous
+2 -5
Documentation/admin-guide/mm/idle_page_tracking.rst
··· 1 - .. _idle_page_tracking: 2 - 3 1 ================== 4 2 Idle Page Tracking 5 3 ================== ··· 68 70 queried pages as idle. Subsequent runs of the tool can then show which pages have 69 71 their idle flag cleared in the interim. 70 72 71 - See :ref:`Documentation/admin-guide/mm/pagemap.rst <pagemap>` for more 72 - information about ``/proc/pid/pagemap``, ``/proc/kpageflags``, and 73 - ``/proc/kpagecgroup``. 73 + See Documentation/admin-guide/mm/pagemap.rst for more information about 74 + ``/proc/pid/pagemap``, ``/proc/kpageflags``, and ``/proc/kpagecgroup``. 74 75 75 76 .. _impl_details: 76 77
+1 -2
Documentation/admin-guide/mm/index.rst
··· 16 16 .. _man 5 proc: http://man7.org/linux/man-pages/man5/proc.5.html 17 17 18 18 Linux memory management has its own jargon and if you are not yet 19 - familiar with it, consider reading 20 - :ref:`Documentation/admin-guide/mm/concepts.rst <mm_concepts>`. 19 + familiar with it, consider reading Documentation/admin-guide/mm/concepts.rst. 21 20 22 21 Here we document in detail how to interact with various mechanisms in 23 22 the Linux memory management.
-2
Documentation/admin-guide/mm/ksm.rst
··· 1 - .. _admin_guide_ksm: 2 - 3 1 ======================= 4 2 Kernel Samepage Merging 5 3 =======================
-2
Documentation/admin-guide/mm/memory-hotplug.rst
··· 1 - .. _admin_guide_memory_hotplug: 2 - 3 1 ================== 4 2 Memory Hot(Un)Plug 5 3 ==================
+2 -4
Documentation/admin-guide/mm/numa_memory_policy.rst
··· 1 - .. _numa_memory_policy: 2 - 3 1 ================== 4 2 NUMA Memory Policy 5 3 ================== ··· 244 246 interleaved system default policy works in this mode. 245 247 246 248 MPOL_PREFERRED_MANY 247 - This mode specifices that the allocation should be preferrably 249 + This mode specifies that the allocation should be preferably 248 250 satisfied from the nodemask specified in the policy. If there is 249 251 a memory pressure on all nodes in the nodemask, the allocation 250 252 can fall back to all existing numa nodes. This is effectively ··· 358 360 2) examination of the policy to determine the policy mode and associated node 359 361 or node lists, if any, for page allocation. This is considered a "hot 360 362 path". Note that for MPOL_BIND, the "usage" extends across the entire 361 - allocation process, which may sleep during page reclaimation, because the 363 + allocation process, which may sleep during page reclamation, because the 362 364 BIND policy nodemask is used, by reference, to filter ineligible nodes. 363 365 364 366 We can avoid taking an extra reference during the usages listed above as
-2
Documentation/admin-guide/mm/numaperf.rst
··· 1 - .. _numaperf: 2 - 3 1 ============= 4 2 NUMA Locality 5 3 =============
+4 -7
Documentation/admin-guide/mm/pagemap.rst
··· 1 - .. _pagemap: 2 - 3 1 ============================= 4 2 Examining Process Page Tables 5 3 ============================= ··· 17 19 * Bits 0-4 swap type if swapped 18 20 * Bits 5-54 swap offset if swapped 19 21 * Bit 55 pte is soft-dirty (see 20 - :ref:`Documentation/admin-guide/mm/soft-dirty.rst <soft_dirty>`) 22 + Documentation/admin-guide/mm/soft-dirty.rst) 21 23 * Bit 56 page exclusively mapped (since 4.2) 22 24 * Bit 57 pte is uffd-wp write-protected (since 5.13) (see 23 - :ref:`Documentation/admin-guide/mm/userfaultfd.rst <userfaultfd>`) 25 + Documentation/admin-guide/mm/userfaultfd.rst) 24 26 * Bits 58-60 zero 25 27 * Bit 61 page is file-page or shared-anon (since 3.5) 26 28 * Bit 62 page swapped ··· 103 105 A compound page with order N consists of 2^N physically contiguous pages. 104 106 A compound page with order 2 takes the form of "HTTT", where H donates its 105 107 head page and T donates its tail page(s). The major consumers of compound 106 - pages are hugeTLB pages 107 - (:ref:`Documentation/admin-guide/mm/hugetlbpage.rst <hugetlbpage>`), 108 + pages are hugeTLB pages (Documentation/admin-guide/mm/hugetlbpage.rst), 108 109 the SLUB etc. memory allocators and various device drivers. 109 110 However in this interface, only huge/giga pages are made visible 110 111 to end users. ··· 125 128 Zero page for pfn_zero or huge_zero page. 126 129 25 - IDLE 127 130 The page has not been accessed since it was marked idle (see 128 - :ref:`Documentation/admin-guide/mm/idle_page_tracking.rst <idle_page_tracking>`). 131 + Documentation/admin-guide/mm/idle_page_tracking.rst). 129 132 Note that this flag may be stale in case the page was accessed via 130 133 a PTE. To make sure the flag is up-to-date one has to read 131 134 ``/sys/kernel/mm/page_idle/bitmap`` first.
-2
Documentation/admin-guide/mm/shrinker_debugfs.rst
··· 1 - .. _shrinker_debugfs: 2 - 3 1 ========================== 4 2 Shrinker Debugfs Interface 5 3 ==========================
-2
Documentation/admin-guide/mm/soft-dirty.rst
··· 1 - .. _soft_dirty: 2 - 3 1 =============== 4 2 Soft-Dirty PTEs 5 3 ===============
-2
Documentation/admin-guide/mm/swap_numa.rst
··· 1 - .. _swap_numa: 2 - 3 1 =========================================== 4 2 Automatically bind swap device to numa node 5 3 ===========================================
-2
Documentation/admin-guide/mm/transhuge.rst
··· 1 - .. _admin_guide_transhuge: 2 - 3 1 ============================ 4 2 Transparent Hugepage Support 5 3 ============================
-2
Documentation/admin-guide/mm/userfaultfd.rst
··· 1 - .. _userfaultfd: 2 - 3 1 =========== 4 2 Userfaultfd 5 3 ===========
-2
Documentation/admin-guide/mm/zswap.rst
··· 1 - .. _zswap: 2 - 3 1 ===== 4 2 zswap 5 3 =====
+1 -1
Documentation/admin-guide/perf/hns3-pmu.rst
··· 53 53 event pair. And the bit 16 of config indicates getting counter 0 or 54 54 counter 1 of hardware event. 55 55 56 - After getting two values of event pair in usersapce, the formula of 56 + After getting two values of event pair in userspace, the formula of 57 57 computation to calculate real performance data is::: 58 58 59 59 counter 0 / counter 1
+1 -1
Documentation/admin-guide/pm/amd-pstate.rst
··· 473 473 474 474 * We can introduce more functional or performance tests to align the result together, it will benefit power and performance scale optimization. 475 475 476 - 1. Test case decriptions 476 + 1. Test case descriptions 477 477 478 478 1). Basic tests 479 479
+2 -2
Documentation/admin-guide/pm/intel_pstate.rst
··· 712 712 The following sequence of shell commands can be used to enable them and see 713 713 their output (if the kernel is generally configured to support event tracing):: 714 714 715 - # cd /sys/kernel/debug/tracing/ 715 + # cd /sys/kernel/tracing/ 716 716 # echo 1 > events/power/pstate_sample/enable 717 717 # echo 1 > events/power/cpu_frequency/enable 718 718 # cat trace ··· 732 732 P-state is called, the ``ftrace`` filter can be set to 733 733 :c:func:`intel_pstate_set_pstate`:: 734 734 735 - # cd /sys/kernel/debug/tracing/ 735 + # cd /sys/kernel/tracing/ 736 736 # cat available_filter_functions | grep -i pstate 737 737 intel_pstate_set_pstate 738 738 intel_pstate_cpu_init
+2 -2
Documentation/admin-guide/spkguide.txt
··· 1105 1105 Alternatively, you can add the above line to your file 1106 1106 ~/.bashrc or ~/.bash_profile. 1107 1107 1108 - If your system administrator ran himself the script, all the users will be able 1109 - to change from English to the language choosed by root and do directly 1108 + If your system administrator himself ran the script, all the users will be able 1109 + to change from English to the language chosen by root and do directly 1110 1110 speakupconf load (or add this to the ~/.bashrc or 1111 1111 ~/.bash_profile file). If there are several languages to handle, the 1112 1112 administrator (or every user) will have to run the first steps until speakupconf
+2 -2
Documentation/admin-guide/sysctl/vm.rst
··· 356 356 357 357 But, these values are not used directly. The kernel calculates # of protection 358 358 pages for each zones from them. These are shown as array of protection pages 359 - in /proc/zoneinfo like followings. (This is an example of x86-64 box). 359 + in /proc/zoneinfo like the following. (This is an example of x86-64 box). 360 360 Each zone has an array of protection pages like this:: 361 361 362 362 Node 0, zone DMA ··· 433 433 that cannot be handled by the kernel. In some cases (like the page 434 434 still having a valid copy on disk) the kernel will handle the failure 435 435 transparently without affecting any applications. But if there is 436 - no other uptodate copy of the data it will kill to prevent any data 436 + no other up-to-date copy of the data it will kill to prevent any data 437 437 corruptions from propagating. 438 438 439 439 1: Kill all processes that have the corrupted and not reloadable page mapped
+1 -1
Documentation/admin-guide/sysrq.rst
··· 138 138 ``v`` Forcefully restores framebuffer console 139 139 ``v`` Causes ETM buffer dump [ARM-specific] 140 140 141 - ``w`` Dumps tasks that are in uninterruptable (blocked) state. 141 + ``w`` Dumps tasks that are in uninterruptible (blocked) state. 142 142 143 143 ``x`` Used by xmon interface on ppc/powerpc platforms. 144 144 Show global PMU Registers on sparc64.
+1 -1
Documentation/admin-guide/thermal/intel_powerclamp.rst
··· 87 87 belong to the offlined CPUs will be terminated immediately. 88 88 89 89 Running as SCHED_FIFO and relatively high priority, also allows such 90 - scheme to work for both preemptable and non-preemptable kernels. 90 + scheme to work for both preemptible and non-preemptible kernels. 91 91 Alignment of idle time around jiffies ensures scalability for HZ 92 92 values. This effect can be better visualized using a Perf timechart. 93 93 The following diagram shows the behavior of kernel thread
+606
Documentation/admin-guide/workload-tracing.rst
··· 1 + .. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY-4.0) 2 + 3 + ====================================================== 4 + Discovering Linux kernel subsystems used by a workload 5 + ====================================================== 6 + 7 + :Authors: - Shuah Khan <skhan@linuxfoundation.org> 8 + - Shefali Sharma <sshefali021@gmail.com> 9 + :maintained-by: Shuah Khan <skhan@linuxfoundation.org> 10 + 11 + Key Points 12 + ========== 13 + 14 + * Understanding system resources necessary to build and run a workload 15 + is important. 16 + * Linux tracing and strace can be used to discover the system resources 17 + in use by a workload. The completeness of the system usage information 18 + depends on the completeness of coverage of a workload. 19 + * Performance and security of the operating system can be analyzed with 20 + the help of tools such as: 21 + `perf <https://man7.org/linux/man-pages/man1/perf.1.html>`_, 22 + `stress-ng <https://www.mankier.com/1/stress-ng>`_, 23 + `paxtest <https://github.com/opntr/paxtest-freebsd>`_. 24 + * Once we discover and understand the workload needs, we can focus on them 25 + to avoid regressions and use it to evaluate safety considerations. 26 + 27 + Methodology 28 + =========== 29 + 30 + `strace <https://man7.org/linux/man-pages/man1/strace.1.html>`_ is a 31 + diagnostic, instructional, and debugging tool and can be used to discover 32 + the system resources in use by a workload. Once we discover and understand 33 + the workload needs, we can focus on them to avoid regressions and use it 34 + to evaluate safety considerations. We use strace tool to trace workloads. 35 + 36 + This method of tracing using strace tells us the system calls invoked by 37 + the workload and doesn't include all the system calls that can be invoked 38 + by it. In addition, this tracing method tells us just the code paths within 39 + these system calls that are invoked. As an example, if a workload opens a 40 + file and reads from it successfully, then the success path is the one that 41 + is traced. Any error paths in that system call will not be traced. If there 42 + is a workload that provides full coverage of a workload then the method 43 + outlined here will trace and find all possible code paths. The completeness 44 + of the system usage information depends on the completeness of coverage of a 45 + workload. 46 + 47 + The goal is tracing a workload on a system running a default kernel without 48 + requiring custom kernel installs. 49 + 50 + How do we gather fine-grained system information? 51 + ================================================= 52 + 53 + strace tool can be used to trace system calls made by a process and signals 54 + it receives. System calls are the fundamental interface between an 55 + application and the operating system kernel. They enable a program to 56 + request services from the kernel. For instance, the open() system call in 57 + Linux is used to provide access to a file in the file system. strace enables 58 + us to track all the system calls made by an application. It lists all the 59 + system calls made by a process and their resulting output. 60 + 61 + You can generate profiling data combining strace and perf record tools to 62 + record the events and information associated with a process. This provides 63 + insight into the process. "perf annotate" tool generates the statistics of 64 + each instruction of the program. This document goes over the details of how 65 + to gather fine-grained information on a workload's usage of system resources. 66 + 67 + We used strace to trace the perf, stress-ng, paxtest workloads to illustrate 68 + our methodology to discover resources used by a workload. This process can 69 + be applied to trace other workloads. 70 + 71 + Getting the system ready for tracing 72 + ==================================== 73 + 74 + Before we can get started we will show you how to get your system ready. 75 + We assume that you have a Linux distribution running on a physical system 76 + or a virtual machine. Most distributions will include strace command. Let’s 77 + install other tools that aren’t usually included to build Linux kernel. 78 + Please note that the following works on Debian based distributions. You 79 + might have to find equivalent packages on other Linux distributions. 80 + 81 + Install tools to build Linux kernel and tools in kernel repository. 82 + scripts/ver_linux is a good way to check if your system already has 83 + the necessary tools:: 84 + 85 + sudo apt-get build-essentials flex bison yacc 86 + sudo apt install libelf-dev systemtap-sdt-dev libaudit-dev libslang2-dev libperl-dev libdw-dev 87 + 88 + cscope is a good tool to browse kernel sources. Let's install it now:: 89 + 90 + sudo apt-get install cscope 91 + 92 + Install stress-ng and paxtest:: 93 + 94 + apt-get install stress-ng 95 + apt-get install paxtest 96 + 97 + Workload overview 98 + ================= 99 + 100 + As mentioned earlier, we used strace to trace perf bench, stress-ng and 101 + paxtest workloads to show how to analyze a workload and identify Linux 102 + subsystems used by these workloads. Let's start with an overview of these 103 + three workloads to get a better understanding of what they do and how to 104 + use them. 105 + 106 + perf bench (all) workload 107 + ------------------------- 108 + 109 + The perf bench command contains multiple multi-threaded microkernel 110 + benchmarks for executing different subsystems in the Linux kernel and 111 + system calls. This allows us to easily measure the impact of changes, 112 + which can help mitigate performance regressions. It also acts as a common 113 + benchmarking framework, enabling developers to easily create test cases, 114 + integrate transparently, and use performance-rich tooling subsystems. 115 + 116 + Stress-ng netdev stressor workload 117 + ---------------------------------- 118 + 119 + stress-ng is used for performing stress testing on the kernel. It allows 120 + you to exercise various physical subsystems of the computer, as well as 121 + interfaces of the OS kernel, using "stressor-s". They are available for 122 + CPU, CPU cache, devices, I/O, interrupts, file system, memory, network, 123 + operating system, pipelines, schedulers, and virtual machines. Please refer 124 + to the `stress-ng man-page <https://www.mankier.com/1/stress-ng>`_ to 125 + find the description of all the available stressor-s. The netdev stressor 126 + starts specified number (N) of workers that exercise various netdevice 127 + ioctl commands across all the available network devices. 128 + 129 + paxtest kiddie workload 130 + ----------------------- 131 + 132 + paxtest is a program that tests buffer overflows in the kernel. It tests 133 + kernel enforcements over memory usage. Generally, execution in some memory 134 + segments makes buffer overflows possible. It runs a set of programs that 135 + attempt to subvert memory usage. It is used as a regression test suite for 136 + PaX, but might be useful to test other memory protection patches for the 137 + kernel. We used paxtest kiddie mode which looks for simple vulnerabilities. 138 + 139 + What is strace and how do we use it? 140 + ==================================== 141 + 142 + As mentioned earlier, strace which is a useful diagnostic, instructional, 143 + and debugging tool and can be used to discover the system resources in use 144 + by a workload. It can be used: 145 + 146 + * To see how a process interacts with the kernel. 147 + * To see why a process is failing or hanging. 148 + * For reverse engineering a process. 149 + * To find the files on which a program depends. 150 + * For analyzing the performance of an application. 151 + * For troubleshooting various problems related to the operating system. 152 + 153 + In addition, strace can generate run-time statistics on times, calls, and 154 + errors for each system call and report a summary when program exits, 155 + suppressing the regular output. This attempts to show system time (CPU time 156 + spent running in the kernel) independent of wall clock time. We plan to use 157 + these features to get information on workload system usage. 158 + 159 + strace command supports basic, verbose, and stats modes. strace command when 160 + run in verbose mode gives more detailed information about the system calls 161 + invoked by a process. 162 + 163 + Running strace -c generates a report of the percentage of time spent in each 164 + system call, the total time in seconds, the microseconds per call, the total 165 + number of calls, the count of each system call that has failed with an error 166 + and the type of system call made. 167 + 168 + * Usage: strace <command we want to trace> 169 + * Verbose mode usage: strace -v <command> 170 + * Gather statistics: strace -c <command> 171 + 172 + We used the “-c” option to gather fine-grained run-time statistics in use 173 + by three workloads we have chose for this analysis. 174 + 175 + * perf 176 + * stress-ng 177 + * paxtest 178 + 179 + What is cscope and how do we use it? 180 + ==================================== 181 + 182 + Now let’s look at `cscope <https://cscope.sourceforge.net/>`_, a command 183 + line tool for browsing C, C++ or Java code-bases. We can use it to find 184 + all the references to a symbol, global definitions, functions called by a 185 + function, functions calling a function, text strings, regular expression 186 + patterns, files including a file. 187 + 188 + We can use cscope to find which system call belongs to which subsystem. 189 + This way we can find the kernel subsystems used by a process when it is 190 + executed. 191 + 192 + Let’s checkout the latest Linux repository and build cscope database:: 193 + 194 + git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux 195 + cd linux 196 + cscope -R -p10 # builds cscope.out database before starting browse session 197 + cscope -d -p10 # starts browse session on cscope.out database 198 + 199 + Note: Run "cscope -R -p10" to build the database and c"scope -d -p10" to 200 + enter into the browsing session. cscope by default cscope.out database. 201 + To get out of this mode press ctrl+d. -p option is used to specify the 202 + number of file path components to display. -p10 is optimal for browsing 203 + kernel sources. 204 + 205 + What is perf and how do we use it? 206 + ================================== 207 + 208 + Perf is an analysis tool based on Linux 2.6+ systems, which abstracts the 209 + CPU hardware difference in performance measurement in Linux, and provides 210 + a simple command line interface. Perf is based on the perf_events interface 211 + exported by the kernel. It is very useful for profiling the system and 212 + finding performance bottlenecks in an application. 213 + 214 + If you haven't already checked out the Linux mainline repository, you can do 215 + so and then build kernel and perf tool:: 216 + 217 + git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux 218 + cd linux 219 + make -j3 all 220 + cd tools/perf 221 + make 222 + 223 + Note: The perf command can be built without building the kernel in the 224 + repository and can be run on older kernels. However matching the kernel 225 + and perf revisions gives more accurate information on the subsystem usage. 226 + 227 + We used "perf stat" and "perf bench" options. For a detailed information on 228 + the perf tool, run "perf -h". 229 + 230 + perf stat 231 + --------- 232 + The perf stat command generates a report of various hardware and software 233 + events. It does so with the help of hardware counter registers found in 234 + modern CPUs that keep the count of these activities. "perf stat cal" shows 235 + stats for cal command. 236 + 237 + Perf bench 238 + ---------- 239 + The perf bench command contains multiple multi-threaded microkernel 240 + benchmarks for executing different subsystems in the Linux kernel and 241 + system calls. This allows us to easily measure the impact of changes, 242 + which can help mitigate performance regressions. It also acts as a common 243 + benchmarking framework, enabling developers to easily create test cases, 244 + integrate transparently, and use performance-rich tooling. 245 + 246 + "perf bench all" command runs the following benchmarks: 247 + 248 + * sched/messaging 249 + * sched/pipe 250 + * syscall/basic 251 + * mem/memcpy 252 + * mem/memset 253 + 254 + What is stress-ng and how do we use it? 255 + ======================================= 256 + 257 + As mentioned earlier, stress-ng is used for performing stress testing on 258 + the kernel. It allows you to exercise various physical subsystems of the 259 + computer, as well as interfaces of the OS kernel, using stressor-s. They 260 + are available for CPU, CPU cache, devices, I/O, interrupts, file system, 261 + memory, network, operating system, pipelines, schedulers, and virtual 262 + machines. 263 + 264 + The netdev stressor starts N workers that exercise various netdevice ioctl 265 + commands across all the available network devices. The following ioctls are 266 + exercised: 267 + 268 + * SIOCGIFCONF, SIOCGIFINDEX, SIOCGIFNAME, SIOCGIFFLAGS 269 + * SIOCGIFADDR, SIOCGIFNETMASK, SIOCGIFMETRIC, SIOCGIFMTU 270 + * SIOCGIFHWADDR, SIOCGIFMAP, SIOCGIFTXQLEN 271 + 272 + The following command runs the stressor:: 273 + 274 + stress-ng --netdev 1 -t 60 --metrics command. 275 + 276 + We can use the perf record command to record the events and information 277 + associated with a process. This command records the profiling data in the 278 + perf.data file in the same directory. 279 + 280 + Using the following commands you can record the events associated with the 281 + netdev stressor, view the generated report perf.data and annotate the to 282 + view the statistics of each instruction of the program:: 283 + 284 + perf record stress-ng --netdev 1 -t 60 --metrics command. 285 + perf report 286 + perf annotate 287 + 288 + What is paxtest and how do we use it? 289 + ===================================== 290 + 291 + paxtest is a program that tests buffer overflows in the kernel. It tests 292 + kernel enforcements over memory usage. Generally, execution in some memory 293 + segments makes buffer overflows possible. It runs a set of programs that 294 + attempt to subvert memory usage. It is used as a regression test suite for 295 + PaX, and will be useful to test other memory protection patches for the 296 + kernel. 297 + 298 + paxtest provides kiddie and blackhat modes. The paxtest kiddie mode runs 299 + in normal mode, whereas the blackhat mode tries to get around the protection 300 + of the kernel testing for vulnerabilities. We focus on the kiddie mode here 301 + and combine "paxtest kiddie" run with "perf record" to collect CPU stack 302 + traces for the paxtest kiddie run to see which function is calling other 303 + functions in the performance profile. Then the "dwarf" (DWARF's Call Frame 304 + Information) mode can be used to unwind the stack. 305 + 306 + The following command can be used to view resulting report in call-graph 307 + format:: 308 + 309 + perf record --call-graph dwarf paxtest kiddie 310 + perf report --stdio 311 + 312 + Tracing workloads 313 + ================= 314 + 315 + Now that we understand the workloads, let's start tracing them. 316 + 317 + Tracing perf bench all workload 318 + ------------------------------- 319 + 320 + Run the following command to trace perf bench all workload:: 321 + 322 + strace -c perf bench all 323 + 324 + **System Calls made by the workload** 325 + 326 + The below table shows the system calls invoked by the workload, number of 327 + times each system call is invoked, and the corresponding Linux subsystem. 328 + 329 + +-------------------+-----------+-----------------+-------------------------+ 330 + | System Call | # calls | Linux Subsystem | System Call (API) | 331 + +===================+===========+=================+=========================+ 332 + | getppid | 10000001 | Process Mgmt | sys_getpid() | 333 + +-------------------+-----------+-----------------+-------------------------+ 334 + | clone | 1077 | Process Mgmt. | sys_clone() | 335 + +-------------------+-----------+-----------------+-------------------------+ 336 + | prctl | 23 | Process Mgmt. | sys_prctl() | 337 + +-------------------+-----------+-----------------+-------------------------+ 338 + | prlimit64 | 7 | Process Mgmt. | sys_prlimit64() | 339 + +-------------------+-----------+-----------------+-------------------------+ 340 + | getpid | 10 | Process Mgmt. | sys_getpid() | 341 + +-------------------+-----------+-----------------+-------------------------+ 342 + | uname | 3 | Process Mgmt. | sys_uname() | 343 + +-------------------+-----------+-----------------+-------------------------+ 344 + | sysinfo | 1 | Process Mgmt. | sys_sysinfo() | 345 + +-------------------+-----------+-----------------+-------------------------+ 346 + | getuid | 1 | Process Mgmt. | sys_getuid() | 347 + +-------------------+-----------+-----------------+-------------------------+ 348 + | getgid | 1 | Process Mgmt. | sys_getgid() | 349 + +-------------------+-----------+-----------------+-------------------------+ 350 + | geteuid | 1 | Process Mgmt. | sys_geteuid() | 351 + +-------------------+-----------+-----------------+-------------------------+ 352 + | getegid | 1 | Process Mgmt. | sys_getegid | 353 + +-------------------+-----------+-----------------+-------------------------+ 354 + | close | 49951 | Filesystem | sys_close() | 355 + +-------------------+-----------+-----------------+-------------------------+ 356 + | pipe | 604 | Filesystem | sys_pipe() | 357 + +-------------------+-----------+-----------------+-------------------------+ 358 + | openat | 48560 | Filesystem | sys_opennat() | 359 + +-------------------+-----------+-----------------+-------------------------+ 360 + | fstat | 8338 | Filesystem | sys_fstat() | 361 + +-------------------+-----------+-----------------+-------------------------+ 362 + | stat | 1573 | Filesystem | sys_stat() | 363 + +-------------------+-----------+-----------------+-------------------------+ 364 + | pread64 | 9646 | Filesystem | sys_pread64() | 365 + +-------------------+-----------+-----------------+-------------------------+ 366 + | getdents64 | 1873 | Filesystem | sys_getdents64() | 367 + +-------------------+-----------+-----------------+-------------------------+ 368 + | access | 3 | Filesystem | sys_access() | 369 + +-------------------+-----------+-----------------+-------------------------+ 370 + | lstat | 1880 | Filesystem | sys_lstat() | 371 + +-------------------+-----------+-----------------+-------------------------+ 372 + | lseek | 6 | Filesystem | sys_lseek() | 373 + +-------------------+-----------+-----------------+-------------------------+ 374 + | ioctl | 3 | Filesystem | sys_ioctl() | 375 + +-------------------+-----------+-----------------+-------------------------+ 376 + | dup2 | 1 | Filesystem | sys_dup2() | 377 + +-------------------+-----------+-----------------+-------------------------+ 378 + | execve | 2 | Filesystem | sys_execve() | 379 + +-------------------+-----------+-----------------+-------------------------+ 380 + | fcntl | 8779 | Filesystem | sys_fcntl() | 381 + +-------------------+-----------+-----------------+-------------------------+ 382 + | statfs | 1 | Filesystem | sys_statfs() | 383 + +-------------------+-----------+-----------------+-------------------------+ 384 + | epoll_create | 2 | Filesystem | sys_epoll_create() | 385 + +-------------------+-----------+-----------------+-------------------------+ 386 + | epoll_ctl | 64 | Filesystem | sys_epoll_ctl() | 387 + +-------------------+-----------+-----------------+-------------------------+ 388 + | newfstatat | 8318 | Filesystem | sys_newfstatat() | 389 + +-------------------+-----------+-----------------+-------------------------+ 390 + | eventfd2 | 192 | Filesystem | sys_eventfd2() | 391 + +-------------------+-----------+-----------------+-------------------------+ 392 + | mmap | 243 | Memory Mgmt. | sys_mmap() | 393 + +-------------------+-----------+-----------------+-------------------------+ 394 + | mprotect | 32 | Memory Mgmt. | sys_mprotect() | 395 + +-------------------+-----------+-----------------+-------------------------+ 396 + | brk | 21 | Memory Mgmt. | sys_brk() | 397 + +-------------------+-----------+-----------------+-------------------------+ 398 + | munmap | 128 | Memory Mgmt. | sys_munmap() | 399 + +-------------------+-----------+-----------------+-------------------------+ 400 + | set_mempolicy | 156 | Memory Mgmt. | sys_set_mempolicy() | 401 + +-------------------+-----------+-----------------+-------------------------+ 402 + | set_tid_address | 1 | Process Mgmt. | sys_set_tid_address() | 403 + +-------------------+-----------+-----------------+-------------------------+ 404 + | set_robust_list | 1 | Futex | sys_set_robust_list() | 405 + +-------------------+-----------+-----------------+-------------------------+ 406 + | futex | 341 | Futex | sys_futex() | 407 + +-------------------+-----------+-----------------+-------------------------+ 408 + | sched_getaffinity | 79 | Scheduler | sys_sched_getaffinity() | 409 + +-------------------+-----------+-----------------+-------------------------+ 410 + | sched_setaffinity | 223 | Scheduler | sys_sched_setaffinity() | 411 + +-------------------+-----------+-----------------+-------------------------+ 412 + | socketpair | 202 | Network | sys_socketpair() | 413 + +-------------------+-----------+-----------------+-------------------------+ 414 + | rt_sigprocmask | 21 | Signal | sys_rt_sigprocmask() | 415 + +-------------------+-----------+-----------------+-------------------------+ 416 + | rt_sigaction | 36 | Signal | sys_rt_sigaction() | 417 + +-------------------+-----------+-----------------+-------------------------+ 418 + | rt_sigreturn | 2 | Signal | sys_rt_sigreturn() | 419 + +-------------------+-----------+-----------------+-------------------------+ 420 + | wait4 | 889 | Time | sys_wait4() | 421 + +-------------------+-----------+-----------------+-------------------------+ 422 + | clock_nanosleep | 37 | Time | sys_clock_nanosleep() | 423 + +-------------------+-----------+-----------------+-------------------------+ 424 + | capget | 4 | Capability | sys_capget() | 425 + +-------------------+-----------+-----------------+-------------------------+ 426 + 427 + Tracing stress-ng netdev stressor workload 428 + ------------------------------------------ 429 + 430 + Run the following command to trace stress-ng netdev stressor workload:: 431 + 432 + strace -c stress-ng --netdev 1 -t 60 --metrics 433 + 434 + **System Calls made by the workload** 435 + 436 + The below table shows the system calls invoked by the workload, number of 437 + times each system call is invoked, and the corresponding Linux subsystem. 438 + 439 + +-------------------+-----------+-----------------+-------------------------+ 440 + | System Call | # calls | Linux Subsystem | System Call (API) | 441 + +===================+===========+=================+=========================+ 442 + | openat | 74 | Filesystem | sys_openat() | 443 + +-------------------+-----------+-----------------+-------------------------+ 444 + | close | 75 | Filesystem | sys_close() | 445 + +-------------------+-----------+-----------------+-------------------------+ 446 + | read | 58 | Filesystem | sys_read() | 447 + +-------------------+-----------+-----------------+-------------------------+ 448 + | fstat | 20 | Filesystem | sys_fstat() | 449 + +-------------------+-----------+-----------------+-------------------------+ 450 + | flock | 10 | Filesystem | sys_flock() | 451 + +-------------------+-----------+-----------------+-------------------------+ 452 + | write | 7 | Filesystem | sys_write() | 453 + +-------------------+-----------+-----------------+-------------------------+ 454 + | getdents64 | 8 | Filesystem | sys_getdents64() | 455 + +-------------------+-----------+-----------------+-------------------------+ 456 + | pread64 | 8 | Filesystem | sys_pread64() | 457 + +-------------------+-----------+-----------------+-------------------------+ 458 + | lseek | 1 | Filesystem | sys_lseek() | 459 + +-------------------+-----------+-----------------+-------------------------+ 460 + | access | 2 | Filesystem | sys_access() | 461 + +-------------------+-----------+-----------------+-------------------------+ 462 + | getcwd | 1 | Filesystem | sys_getcwd() | 463 + +-------------------+-----------+-----------------+-------------------------+ 464 + | execve | 1 | Filesystem | sys_execve() | 465 + +-------------------+-----------+-----------------+-------------------------+ 466 + | mmap | 61 | Memory Mgmt. | sys_mmap() | 467 + +-------------------+-----------+-----------------+-------------------------+ 468 + | munmap | 3 | Memory Mgmt. | sys_munmap() | 469 + +-------------------+-----------+-----------------+-------------------------+ 470 + | mprotect | 20 | Memory Mgmt. | sys_mprotect() | 471 + +-------------------+-----------+-----------------+-------------------------+ 472 + | mlock | 2 | Memory Mgmt. | sys_mlock() | 473 + +-------------------+-----------+-----------------+-------------------------+ 474 + | brk | 3 | Memory Mgmt. | sys_brk() | 475 + +-------------------+-----------+-----------------+-------------------------+ 476 + | rt_sigaction | 21 | Signal | sys_rt_sigaction() | 477 + +-------------------+-----------+-----------------+-------------------------+ 478 + | rt_sigprocmask | 1 | Signal | sys_rt_sigprocmask() | 479 + +-------------------+-----------+-----------------+-------------------------+ 480 + | sigaltstack | 1 | Signal | sys_sigaltstack() | 481 + +-------------------+-----------+-----------------+-------------------------+ 482 + | rt_sigreturn | 1 | Signal | sys_rt_sigreturn() | 483 + +-------------------+-----------+-----------------+-------------------------+ 484 + | getpid | 8 | Process Mgmt. | sys_getpid() | 485 + +-------------------+-----------+-----------------+-------------------------+ 486 + | prlimit64 | 5 | Process Mgmt. | sys_prlimit64() | 487 + +-------------------+-----------+-----------------+-------------------------+ 488 + | arch_prctl | 2 | Process Mgmt. | sys_arch_prctl() | 489 + +-------------------+-----------+-----------------+-------------------------+ 490 + | sysinfo | 2 | Process Mgmt. | sys_sysinfo() | 491 + +-------------------+-----------+-----------------+-------------------------+ 492 + | getuid | 2 | Process Mgmt. | sys_getuid() | 493 + +-------------------+-----------+-----------------+-------------------------+ 494 + | uname | 1 | Process Mgmt. | sys_uname() | 495 + +-------------------+-----------+-----------------+-------------------------+ 496 + | setpgid | 1 | Process Mgmt. | sys_setpgid() | 497 + +-------------------+-----------+-----------------+-------------------------+ 498 + | getrusage | 1 | Process Mgmt. | sys_getrusage() | 499 + +-------------------+-----------+-----------------+-------------------------+ 500 + | geteuid | 1 | Process Mgmt. | sys_geteuid() | 501 + +-------------------+-----------+-----------------+-------------------------+ 502 + | getppid | 1 | Process Mgmt. | sys_getppid() | 503 + +-------------------+-----------+-----------------+-------------------------+ 504 + | sendto | 3 | Network | sys_sendto() | 505 + +-------------------+-----------+-----------------+-------------------------+ 506 + | connect | 1 | Network | sys_connect() | 507 + +-------------------+-----------+-----------------+-------------------------+ 508 + | socket | 1 | Network | sys_socket() | 509 + +-------------------+-----------+-----------------+-------------------------+ 510 + | clone | 1 | Process Mgmt. | sys_clone() | 511 + +-------------------+-----------+-----------------+-------------------------+ 512 + | set_tid_address | 1 | Process Mgmt. | sys_set_tid_address() | 513 + +-------------------+-----------+-----------------+-------------------------+ 514 + | wait4 | 2 | Time | sys_wait4() | 515 + +-------------------+-----------+-----------------+-------------------------+ 516 + | alarm | 1 | Time | sys_alarm() | 517 + +-------------------+-----------+-----------------+-------------------------+ 518 + | set_robust_list | 1 | Futex | sys_set_robust_list() | 519 + +-------------------+-----------+-----------------+-------------------------+ 520 + 521 + Tracing paxtest kiddie workload 522 + ------------------------------- 523 + 524 + Run the following command to trace paxtest kiddie workload:: 525 + 526 + strace -c paxtest kiddie 527 + 528 + **System Calls made by the workload** 529 + 530 + The below table shows the system calls invoked by the workload, number of 531 + times each system call is invoked, and the corresponding Linux subsystem. 532 + 533 + +-------------------+-----------+-----------------+----------------------+ 534 + | System Call | # calls | Linux Subsystem | System Call (API) | 535 + +===================+===========+=================+======================+ 536 + | read | 3 | Filesystem | sys_read() | 537 + +-------------------+-----------+-----------------+----------------------+ 538 + | write | 11 | Filesystem | sys_write() | 539 + +-------------------+-----------+-----------------+----------------------+ 540 + | close | 41 | Filesystem | sys_close() | 541 + +-------------------+-----------+-----------------+----------------------+ 542 + | stat | 24 | Filesystem | sys_stat() | 543 + +-------------------+-----------+-----------------+----------------------+ 544 + | fstat | 2 | Filesystem | sys_fstat() | 545 + +-------------------+-----------+-----------------+----------------------+ 546 + | pread64 | 6 | Filesystem | sys_pread64() | 547 + +-------------------+-----------+-----------------+----------------------+ 548 + | access | 1 | Filesystem | sys_access() | 549 + +-------------------+-----------+-----------------+----------------------+ 550 + | pipe | 1 | Filesystem | sys_pipe() | 551 + +-------------------+-----------+-----------------+----------------------+ 552 + | dup2 | 24 | Filesystem | sys_dup2() | 553 + +-------------------+-----------+-----------------+----------------------+ 554 + | execve | 1 | Filesystem | sys_execve() | 555 + +-------------------+-----------+-----------------+----------------------+ 556 + | fcntl | 26 | Filesystem | sys_fcntl() | 557 + +-------------------+-----------+-----------------+----------------------+ 558 + | openat | 14 | Filesystem | sys_openat() | 559 + +-------------------+-----------+-----------------+----------------------+ 560 + | rt_sigaction | 7 | Signal | sys_rt_sigaction() | 561 + +-------------------+-----------+-----------------+----------------------+ 562 + | rt_sigreturn | 38 | Signal | sys_rt_sigreturn() | 563 + +-------------------+-----------+-----------------+----------------------+ 564 + | clone | 38 | Process Mgmt. | sys_clone() | 565 + +-------------------+-----------+-----------------+----------------------+ 566 + | wait4 | 44 | Time | sys_wait4() | 567 + +-------------------+-----------+-----------------+----------------------+ 568 + | mmap | 7 | Memory Mgmt. | sys_mmap() | 569 + +-------------------+-----------+-----------------+----------------------+ 570 + | mprotect | 3 | Memory Mgmt. | sys_mprotect() | 571 + +-------------------+-----------+-----------------+----------------------+ 572 + | munmap | 1 | Memory Mgmt. | sys_munmap() | 573 + +-------------------+-----------+-----------------+----------------------+ 574 + | brk | 3 | Memory Mgmt. | sys_brk() | 575 + +-------------------+-----------+-----------------+----------------------+ 576 + | getpid | 1 | Process Mgmt. | sys_getpid() | 577 + +-------------------+-----------+-----------------+----------------------+ 578 + | getuid | 1 | Process Mgmt. | sys_getuid() | 579 + +-------------------+-----------+-----------------+----------------------+ 580 + | getgid | 1 | Process Mgmt. | sys_getgid() | 581 + +-------------------+-----------+-----------------+----------------------+ 582 + | geteuid | 2 | Process Mgmt. | sys_geteuid() | 583 + +-------------------+-----------+-----------------+----------------------+ 584 + | getegid | 1 | Process Mgmt. | sys_getegid() | 585 + +-------------------+-----------+-----------------+----------------------+ 586 + | getppid | 1 | Process Mgmt. | sys_getppid() | 587 + +-------------------+-----------+-----------------+----------------------+ 588 + | arch_prctl | 2 | Process Mgmt. | sys_arch_prctl() | 589 + +-------------------+-----------+-----------------+----------------------+ 590 + 591 + Conclusion 592 + ========== 593 + 594 + This document is intended to be used as a guide on how to gather fine-grained 595 + information on the resources in use by workloads using strace. 596 + 597 + References 598 + ========== 599 + 600 + * `Discovery Linux Kernel Subsystems used by OpenAPS <https://elisa.tech/blog/2022/02/02/discovery-linux-kernel-subsystems-used-by-openaps>`_ 601 + * `ELISA-White-Papers-Discovering Linux kernel subsystems used by a workload <https://github.com/elisa-tech/ELISA-White-Papers/blob/master/Processes/Discovering_Linux_kernel_subsystems_used_by_a_workload.md>`_ 602 + * `strace <https://man7.org/linux/man-pages/man1/strace.1.html>`_ 603 + * `perf <https://man7.org/linux/man-pages/man1/perf.1.html>`_ 604 + * `paxtest README <https://github.com/opntr/paxtest-freebsd/blob/hardenedbsd/0.9.14-hbsd/README>`_ 605 + * `stress-ng <https://www.mankier.com/1/stress-ng>`_ 606 + * `Monitoring and managing system status and performance <https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/monitoring_and_managing_system_status_and_performance/index>`_
+3 -2
Documentation/conf.py
··· 156 156 math_renderer = 'mathjax' 157 157 158 158 # Add any paths that contain templates here, relative to this directory. 159 - templates_path = ['_templates'] 159 + templates_path = ['sphinx/templates'] 160 160 161 161 # The suffix(es) of source filenames. 162 162 # You can specify multiple suffix as a list of string: ··· 331 331 'description': get_cline_version(), 332 332 'page_width': '65em', 333 333 'sidebar_width': '15em', 334 + 'fixed_sidebar': 'true', 334 335 'font_size': 'inherit', 335 336 'font_family': 'serif', 336 337 } ··· 349 348 350 349 # Custom sidebar templates, maps document names to template names. 351 350 # Note that the RTD theme ignores this 352 - html_sidebars = { '**': ['searchbox.html', 'localtoc.html', 'sourcelink.html']} 351 + html_sidebars = { '**': ['searchbox.html', 'kernel-toc.html', 'sourcelink.html']} 353 352 354 353 # about.html is available for alabaster theme. Add it at the front. 355 354 if html_theme == 'alabaster':
+1 -1
Documentation/core-api/padata.rst
··· 42 42 Modifying cpumasks 43 43 ------------------ 44 44 45 - The CPUs used to run jobs can be changed in two ways, programatically with 45 + The CPUs used to run jobs can be changed in two ways, programmatically with 46 46 padata_set_cpumask() or via sysfs. The former is defined:: 47 47 48 48 int padata_set_cpumask(struct padata_instance *pinst, int cpumask_type,
+2 -2
Documentation/core-api/workqueue.rst
··· 370 370 371 371 The first one can be tracked using tracing: :: 372 372 373 - $ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event 374 - $ cat /sys/kernel/debug/tracing/trace_pipe > out.txt 373 + $ echo workqueue:workqueue_queue_work > /sys/kernel/tracing/set_event 374 + $ cat /sys/kernel/tracing/trace_pipe > out.txt 375 375 (wait a few secs) 376 376 ^C 377 377
+3 -3
Documentation/cpu-freq/index.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - ============================================================================== 4 - Linux CPUFreq - CPU frequency and voltage scaling code in the Linux(TM) kernel 5 - ============================================================================== 3 + ======================================================================== 4 + CPUFreq - CPU frequency and voltage scaling code in the Linux(TM) kernel 5 + ======================================================================== 6 6 7 7 Author: Dominik Brodowski <linux@brodo.de> 8 8
+3 -3
Documentation/crypto/index.rst
··· 1 - ======================= 2 - Linux Kernel Crypto API 3 - ======================= 1 + ========== 2 + Crypto API 3 + ========== 4 4 5 5 :Author: Stephan Mueller 6 6 :Author: Marek Vasut
+4 -4
Documentation/dev-tools/coccinelle.rst
··· 219 219 cat cocci.err 220 220 221 221 You can use SPFLAGS to add debugging flags; for instance you may want to 222 - add both --profile --show-trying to SPFLAGS when debugging. For example 222 + add both ``--profile --show-trying`` to SPFLAGS when debugging. For example 223 223 you may want to use:: 224 224 225 225 rm -f err.log ··· 248 248 249 249 - Your current user's home directory is processed first 250 250 - Your directory from which spatch is called is processed next 251 - - The directory provided with the --dir option is processed last, if used 251 + - The directory provided with the ``--dir`` option is processed last, if used 252 252 253 253 Since coccicheck runs through make, it naturally runs from the kernel 254 254 proper dir; as such the second rule above would be implied for picking up a ··· 265 265 fi 266 266 267 267 KBUILD_EXTMOD is set when an explicit target with M= is used. For both cases 268 - the spatch --dir argument is used, as such third rule applies when whether M= 269 - is used or not, and when M= is used the target directory can have its own 268 + the spatch ``--dir`` argument is used, as such third rule applies when whether 269 + M= is used or not, and when M= is used the target directory can have its own 270 270 .cocciconfig file. When M= is not passed as an argument to coccicheck the 271 271 target directory is the same as the directory from where spatch was called. 272 272
+4
Documentation/dev-tools/gdb-kernel-debugging.rst
··· 39 39 this mode. In this case, you should build the kernel with 40 40 CONFIG_RANDOMIZE_BASE disabled if the architecture supports KASLR. 41 41 42 + - Build the gdb scripts (required on kernels v5.1 and above):: 43 + 44 + make scripts_gdb 45 + 42 46 - Enable the gdb stub of QEMU/KVM, either 43 47 44 48 - at VM startup time by appending "-s" to the QEMU command line
+3 -3
Documentation/driver-api/dma-buf.rst
··· 1 - Buffer Sharing and Synchronization 2 - ================================== 1 + Buffer Sharing and Synchronization (dma-buf) 2 + ============================================ 3 3 4 4 The dma-buf subsystem provides the framework for sharing buffers for 5 5 hardware (DMA) access across multiple device drivers and subsystems, and ··· 264 264 randomly hangs workloads until the timeout kicks in. Workloads, which from 265 265 userspace's perspective, do not contain a deadlock. In such a mixed fencing 266 266 architecture there is no single entity with knowledge of all dependencies. 267 - Thefore preventing such deadlocks from within the kernel is not possible. 267 + Therefore preventing such deadlocks from within the kernel is not possible. 268 268 269 269 The only solution to avoid dependencies loops is by not allowing indefinite 270 270 fences in the kernel. This means:
+1 -1
Documentation/driver-api/dmaengine/client.rst
··· 175 175 driver can ask for the pointer, maximum size and the currently used size of 176 176 the metadata and can directly update or read it. 177 177 178 - Becasue the DMA driver manages the memory area containing the metadata, 178 + Because the DMA driver manages the memory area containing the metadata, 179 179 clients must make sure that they do not try to access or get the pointer 180 180 after their transfer completion callback has run for the descriptor. 181 181 If no completion callback has been defined for the transfer, then the
+1 -1
Documentation/driver-api/dmaengine/dmatest.rst
··· 89 89 90 90 % cat /sys/module/dmatest/parameters/run 91 91 92 - To wait for test completion userpace can poll 'run' until it is false, or use 92 + To wait for test completion userspace can poll 'run' until it is false, or use 93 93 the wait parameter. Specifying 'wait=1' when loading the module causes module 94 94 initialization to pause until a test run has completed, while reading 95 95 /sys/module/dmatest/parameters/wait waits for any running test to complete
+2 -2
Documentation/driver-api/hsi.rst
··· 4 4 Introduction 5 5 --------------- 6 6 7 - High Speed Syncronous Interface (HSI) is a fullduplex, low latency protocol, 7 + High Speed Synchronous Interface (HSI) is a full duplex, low latency protocol, 8 8 that is optimized for die-level interconnect between an Application Processor 9 9 and a Baseband chipset. It has been specified by the MIPI alliance in 2003 and 10 10 implemented by multiple vendors since then. ··· 52 52 ------------------ 53 53 54 54 Each port automatically registers a generic client driver called hsi_char, 55 - which provides a charecter device for userspace representing the HSI port. 55 + which provides a character device for userspace representing the HSI port. 56 56 It can be used to communicate via HSI from userspace. Userspace may 57 57 configure the hsi_char device using the following ioctl commands: 58 58
+5 -3
Documentation/driver-api/index.rst
··· 1 - ======================================== 2 - The Linux driver implementer's API guide 3 - ======================================== 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ============================== 4 + Driver implementer's API guide 5 + ============================== 4 6 5 7 The kernel offers a wide variety of interfaces to support the development 6 8 of device drivers. This document is an only somewhat organized collection
+2 -2
Documentation/driver-api/io-mapping.rst
··· 44 44 used with mappings created by io_mapping_create_wc() 45 45 46 46 Temporary mappings are only valid in the context of the caller. The mapping 47 - is not guaranteed to be globaly visible. 47 + is not guaranteed to be globally visible. 48 48 49 49 io_mapping_map_local_wc() has a side effect on X86 32bit as it disables 50 50 migration to make the mapping code work. No caller can rely on this side ··· 78 78 unsigned long offset) 79 79 80 80 This works like io_mapping_map_atomic/local_wc() except it has no side 81 - effects and the pointer is globaly visible. 81 + effects and the pointer is globally visible. 82 82 83 83 The mappings are released with:: 84 84
+1 -1
Documentation/driver-api/md/md-cluster.rst
··· 65 65 2.3 new-device management 66 66 ------------------------- 67 67 68 - A single lock: "no-new-dev" is used to co-ordinate the addition of 68 + A single lock: "no-new-dev" is used to coordinate the addition of 69 69 new devices - this must be synchronized across the array. 70 70 Normally all nodes hold a concurrent-read lock on this device. 71 71
+1 -1
Documentation/driver-api/md/raid5-cache.rst
··· 81 81 is organized as a simple write log. The log consists of 'meta data' and 'data' 82 82 pairs. The meta data describes the data. It also includes checksum and sequence 83 83 ID for recovery identification. Data can be IO data and parity data. Data is 84 - checksumed too. The checksum is stored in the meta data ahead of the data. The 84 + checksummed too. The checksum is stored in the meta data ahead of the data. The 85 85 checksum is an optimization because MD can write meta and data freely without 86 86 worry about the order. MD superblock has a field pointed to the valid meta data 87 87 of log head.
+1 -1
Documentation/driver-api/media/drivers/vidtv.rst
··· 28 28 takes parameters at initialization that will dictate how the simulation 29 29 behaves. 30 30 31 - - Code reponsible for encoding a valid MPEG Transport Stream, which is then 31 + - Code responsible for encoding a valid MPEG Transport Stream, which is then 32 32 passed to the bridge driver. This fake stream contains some hardcoded content. 33 33 For now, we have a single, audio-only channel containing a single MPEG 34 34 Elementary Stream, which in turn contains a SMPTE 302m encoded sine-wave.
+1 -1
Documentation/driver-api/media/dtv-demux.rst
··· 24 24 25 25 The demux kABI only controls front-ends regarding to their connections with 26 26 demuxes; the kABI used to set the other front-end parameters, such as 27 - tuning, are devined via the Digital TV Frontend kABI. 27 + tuning, are defined via the Digital TV Frontend kABI. 28 28 29 29 The functions that implement the abstract interface demux should be defined 30 30 static or module private and registered to the Demux core for external
+2 -2
Documentation/driver-api/media/v4l2-subdev.rst
··· 321 321 hardware from applications. For complex devices, finer-grained control of the 322 322 device than what the video nodes offer may be required. In those cases, bridge 323 323 drivers that implement :ref:`the media controller API <media_controller>` may 324 - opt for making the subdevice operations directly accessible from userpace. 324 + opt for making the subdevice operations directly accessible from userspace. 325 325 326 326 Device nodes named ``v4l-subdev``\ *X* can be created in ``/dev`` to access 327 327 sub-devices directly. If a sub-device supports direct userspace configuration ··· 574 574 as they expect to receive the appropriate state as a parameter. To help the 575 575 conversion of subdevice drivers to a managed active state without having to 576 576 convert all callers at the same time, an additional wrapper layer has been 577 - added to v4l2_subdev_call(), which handles the NULL case by geting and locking 577 + added to v4l2_subdev_call(), which handles the NULL case by getting and locking 578 578 the callee's active state with :c:func:`v4l2_subdev_lock_and_get_active_state()`, 579 579 and unlocking the state after the call. 580 580
+1 -1
Documentation/driver-api/mei/nfc.rst
··· 3 3 MEI NFC 4 4 ------- 5 5 6 - Some Intel 8 and 9 Serieses chipsets supports NFC devices connected behind 6 + Some Intel 8 and 9 Series chipsets support NFC devices connected behind 7 7 the Intel Management Engine controller. 8 8 MEI client bus exposes the NFC chips as NFC phy devices and enables 9 9 binding with Microread and NXP PN544 NFC device driver from the Linux NFC
+1 -1
Documentation/driver-api/nfc/nfc-hci.rst
··· 150 150 151 151 Communication between the CPU and the chip often requires some link layer 152 152 protocol. Those are isolated as modules managed by the HCI layer. There are 153 - currently two modules : nop (raw transfert) and shdlc. 153 + currently two modules : nop (raw transfer) and shdlc. 154 154 A new llc must implement the following functions:: 155 155 156 156 struct nfc_llc_ops {
+1 -1
Documentation/driver-api/nvdimm/nvdimm.rst
··· 82 82 Metadata stored on a DIMM device that partitions and identifies 83 83 (persistently names) capacity allocated to different PMEM namespaces. It 84 84 also indicates whether an address abstraction like a BTT is applied to 85 - the namepsace. Note that traditional partition tables, GPT/MBR, are 85 + the namespace. Note that traditional partition tables, GPT/MBR, are 86 86 layered on top of a PMEM namespace, or an address abstraction like BTT 87 87 if present, but partition support is deprecated going forward. 88 88
+1 -1
Documentation/driver-api/nvdimm/security.rst
··· 83 83 6. Freeze 84 84 --------- 85 85 The freeze operation does not require any keys. The security config can be 86 - frozen by a user with root privelege. 86 + frozen by a user with root privilege. 87 87 88 88 7. Disable 89 89 ----------
+1 -1
Documentation/driver-api/pin-control.rst
··· 836 836 837 837 Depending on the exact HW register design, some functions exposed by the 838 838 GPIO subsystem may call into the pinctrl subsystem in order to 839 - co-ordinate register settings across HW modules. In particular, this may 839 + coordinate register settings across HW modules. In particular, this may 840 840 be needed for HW with separate GPIO and pin controller HW modules, where 841 841 e.g. GPIO direction is determined by a register in the pin controller HW 842 842 module rather than the GPIO HW module.
+1 -1
Documentation/driver-api/pldmfw/index.rst
··· 20 20 21 21 The ``pldmfw`` library is intended to be used by device drivers for 22 22 implementing device flash update based on firmware files following the PLDM 23 - firwmare file format. 23 + firmware file format. 24 24 25 25 It is implemented using an ops table that allows device drivers to provide 26 26 the underlying device specific functionality.
+1 -1
Documentation/driver-api/serial/driver.rst
··· 24 24 Console Support 25 25 --------------- 26 26 27 - The serial core provides a few helper functions. This includes identifing 27 + The serial core provides a few helper functions. This includes identifying 28 28 the correct port structure (via uart_get_console()) and decoding command line 29 29 arguments (uart_parse_options()). 30 30
+1 -1
Documentation/driver-api/surface_aggregator/ssh.rst
··· 77 77 its own CRC (over all payload bytes). If the payload is not present (i.e. 78 78 the frame has ``LEN=0``), the CRC of the payload is still present and will 79 79 evaluate to ``0xffff``. The |LEN| field does not include any of the CRCs, it 80 - equals the number of bytes inbetween the CRC of the frame and the CRC of the 80 + equals the number of bytes between the CRC of the frame and the CRC of the 81 81 payload. 82 82 83 83 Additionally, the following fixed two-byte sequences are used:
+1 -1
Documentation/driver-api/usb/dwc3.rst
··· 18 18 4. Hub configuration 19 19 20 20 Linux currently supports several versions of this controller. In all 21 - likelyhood, the version in your SoC is already supported. At the time 21 + likelihood, the version in your SoC is already supported. At the time 22 22 of this writing, known tested versions range from 2.02a to 3.10a. As a 23 23 rule of thumb, anything above 2.02a should work reliably well. 24 24
+1 -1
Documentation/driver-api/usb/usb3-debug-port.rst
··· 48 48 "earlyprintk=xdbc" 49 49 50 50 If there are multiple xHCI controllers in your system, you can 51 - append a host contoller index to this kernel parameter. This 51 + append a host controller index to this kernel parameter. This 52 52 index starts from 0. 53 53 54 54 Current design doesn't support DbC runtime suspend/resume. As
+1
Documentation/filesystems/proc.rst
··· 1284 1284 rt_cache Routing cache 1285 1285 snmp SNMP data 1286 1286 sockstat Socket statistics 1287 + softnet_stat Per-CPU incoming packets queues statistics of online CPUs 1287 1288 tcp TCP sockets 1288 1289 udp UDP sockets 1289 1290 unix UNIX domain sockets
+3 -3
Documentation/gpu/index.rst
··· 1 - ================================== 2 - Linux GPU Driver Developer's Guide 3 - ================================== 1 + ============================ 2 + GPU Driver Developer's Guide 3 + ============================ 4 4 5 5 .. toctree:: 6 6
+2 -2
Documentation/hid/intel-ish-hid.rst
··· 344 344 345 345 To debug ISH, event tracing mechanism is used. To enable debug logs:: 346 346 347 - echo 1 > /sys/kernel/debug/tracing/events/intel_ish/enable 348 - cat /sys/kernel/debug/tracing/trace 347 + echo 1 > /sys/kernel/tracing/events/intel_ish/enable 348 + cat /sys/kernel/tracing/trace 349 349 350 350 3.8 ISH IIO sysfs Example on Lenovo thinkpad Yoga 260 351 351 -----------------------------------------------------
+3 -3
Documentation/hwmon/index.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - ========================= 4 - Linux Hardware Monitoring 5 - ========================= 3 + =================== 4 + Hardware Monitoring 5 + =================== 6 6 7 7 .. toctree:: 8 8 :maxdepth: 1
+3 -3
Documentation/input/index.rst
··· 1 - ============================= 2 - The Linux Input Documentation 3 - ============================= 1 + =================== 2 + Input Documentation 3 + =================== 4 4 5 5 Contents: 6 6
+1
Documentation/leds/index.rst
··· 26 26 leds-lp55xx 27 27 leds-mlxcpld 28 28 leds-sc27xx 29 + leds-qcom-lpg
-2
Documentation/mm/active_mm.rst
··· 1 - .. _active_mm: 2 - 3 1 ========= 4 2 Active MM 5 3 =========
-2
Documentation/mm/arch_pgtable_helpers.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - .. _arch_page_table_helpers: 4 - 5 3 =============================== 6 4 Architecture Page Table Helpers 7 5 ===============================
-2
Documentation/mm/balance.rst
··· 1 - .. _balance: 2 - 3 1 ================ 4 2 Memory Balancing 5 3 ================
-2
Documentation/mm/free_page_reporting.rst
··· 1 - .. _free_page_reporting: 2 - 3 1 ===================== 4 2 Free Page Reporting 5 3 =====================
-2
Documentation/mm/frontswap.rst
··· 1 - .. _frontswap: 2 - 3 1 ========= 4 2 Frontswap 5 3 =========
-2
Documentation/mm/highmem.rst
··· 1 - .. _highmem: 2 - 3 1 ==================== 4 2 High Memory Handling 5 3 ====================
+1 -3
Documentation/mm/hmm.rst
··· 1 - .. _hmm: 2 - 3 1 ===================================== 4 2 Heterogeneous Memory Management (HMM) 5 3 ===================================== ··· 302 304 be tied to a ``struct device``. 303 305 304 306 The overall migration steps are similar to migrating NUMA pages within system 305 - memory (see :ref:`Page migration <page_migration>`) but the steps are split 307 + memory (see Documentation/mm/page_migration.rst) but the steps are split 306 308 between device driver specific code and shared common code: 307 309 308 310 1. ``mmap_read_lock()``
+1 -3
Documentation/mm/hugetlbfs_reserv.rst
··· 1 - .. _hugetlbfs_reserve: 2 - 3 1 ===================== 4 2 Hugetlbfs Reservation 5 3 ===================== ··· 5 7 Overview 6 8 ======== 7 9 8 - Huge pages as described at :ref:`hugetlbpage` are typically 10 + Huge pages as described at Documentation/mm/hugetlbpage.rst are typically 9 11 preallocated for application use. These huge pages are instantiated in a 10 12 task's address space at page fault time if the VMA indicates huge pages are 11 13 to be used. If no huge page exists at page fault time, the task is sent
-2
Documentation/mm/hwpoison.rst
··· 1 - .. hwpoison: 2 - 3 1 ======== 4 2 hwpoison 5 3 ========
+3 -3
Documentation/mm/index.rst
··· 1 - ===================================== 2 - Linux Memory Management Documentation 3 - ===================================== 1 + =============================== 2 + Memory Management Documentation 3 + =============================== 4 4 5 5 Memory Management Guide 6 6 =======================
+1 -3
Documentation/mm/ksm.rst
··· 1 - .. _ksm: 2 - 3 1 ======================= 4 2 Kernel Samepage Merging 5 3 ======================= ··· 6 8 added to the Linux kernel in 2.6.32. See ``mm/ksm.c`` for its implementation, 7 9 and http://lwn.net/Articles/306704/ and https://lwn.net/Articles/330589/ 8 10 9 - The userspace interface of KSM is described in :ref:`Documentation/admin-guide/mm/ksm.rst <admin_guide_ksm>` 11 + The userspace interface of KSM is described in Documentation/admin-guide/mm/ksm.rst 10 12 11 13 Design 12 14 ======
-2
Documentation/mm/memory-model.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - .. _physical_memory_model: 4 - 5 3 ===================== 6 4 Physical Memory Model 7 5 =====================
-2
Documentation/mm/mmu_notifier.rst
··· 1 - .. _mmu_notifier: 2 - 3 1 When do you need to notify inside page table lock ? 4 2 =================================================== 5 3
+2 -4
Documentation/mm/numa.rst
··· 1 - .. _numa: 2 - 3 1 Started Nov 1999 by Kanoj Sarcar <kanoj@sgi.com> 4 2 5 3 ============= ··· 62 64 the emulation of additional nodes. For NUMA emulation, linux will carve up 63 65 the existing nodes--or the system memory for non-NUMA platforms--into multiple 64 66 nodes. Each emulated node will manage a fraction of the underlying cells' 65 - physical memory. NUMA emluation is useful for testing NUMA kernel and 67 + physical memory. NUMA emulation is useful for testing NUMA kernel and 66 68 application features on non-NUMA platforms, and as a sort of memory resource 67 69 management mechanism when used together with cpusets. 68 70 [see Documentation/admin-guide/cgroup-v1/cpusets.rst] ··· 108 110 such as taskset(1) and numactl(1), and program interfaces such as 109 111 sched_setaffinity(2). Further, one can modify the kernel's default local 110 112 allocation behavior using Linux NUMA memory policy. [see 111 - :ref:`Documentation/admin-guide/mm/numa_memory_policy.rst <numa_memory_policy>`]. 113 + Documentation/admin-guide/mm/numa_memory_policy.rst]. 112 114 113 115 System administrators can restrict the CPUs and nodes' memories that a non- 114 116 privileged user can specify in the scheduling or NUMA commands and functions
-2
Documentation/mm/page_frags.rst
··· 1 - .. _page_frags: 2 - 3 1 ============== 4 2 Page fragments 5 3 ==============
+2 -4
Documentation/mm/page_migration.rst
··· 1 - .. _page_migration: 2 - 3 1 ============== 4 2 Page migration 5 3 ============== ··· 7 9 virtual addresses that the process sees do not change. However, the 8 10 system rearranges the physical location of those pages. 9 11 10 - Also see :ref:`Heterogeneous Memory Management (HMM) <hmm>` 11 - for migrating pages to or from device private memory. 12 + Also see Documentation/mm/hmm.rst for migrating pages to or from device 13 + private memory. 12 14 13 15 The main intent of page migration is to reduce the latency of memory accesses 14 16 by moving pages near to the processor where the process accessing that memory
+2 -4
Documentation/mm/page_owner.rst
··· 1 - .. _page_owner: 2 - 3 1 ================================================== 4 2 page owner: Tracking about who allocated each page 5 3 ================================================== ··· 50 52 Although it doesn't mean that they have the right owner information, 51 53 at least, we can tell whether the page is allocated or not, 52 54 more accurately. On 2GB memory x86-64 VM box, 13343 early allocated pages 53 - are catched and marked, although they are mostly allocated from struct 55 + are caught and marked, although they are mostly allocated from struct 54 56 page extension feature. Anyway, after that, no page is left in 55 57 un-tracking state. 56 58 ··· 176 178 at alloc_ts timestamp of the page when it was allocated 177 179 ator allocator memory allocator for pages 178 180 179 - For --curl option: 181 + For --cull option: 180 182 181 183 KEY LONG DESCRIPTION 182 184 p pid process ID
-2
Documentation/mm/page_table_check.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - .. _page_table_check: 4 - 5 3 ================ 6 4 Page Table Check 7 5 ================
+347
Documentation/mm/physical_memory.rst
··· 3 3 =============== 4 4 Physical Memory 5 5 =============== 6 + 7 + Linux is available for a wide range of architectures so there is a need for an 8 + architecture-independent abstraction to represent the physical memory. This 9 + chapter describes the structures used to manage physical memory in a running 10 + system. 11 + 12 + The first principal concept prevalent in the memory management is 13 + `Non-Uniform Memory Access (NUMA) 14 + <https://en.wikipedia.org/wiki/Non-uniform_memory_access>`_. 15 + With multi-core and multi-socket machines, memory may be arranged into banks 16 + that incur a different cost to access depending on the “distance” from the 17 + processor. For example, there might be a bank of memory assigned to each CPU or 18 + a bank of memory very suitable for DMA near peripheral devices. 19 + 20 + Each bank is called a node and the concept is represented under Linux by a 21 + ``struct pglist_data`` even if the architecture is UMA. This structure is 22 + always referenced to by it's typedef ``pg_data_t``. ``A pg_data_t`` structure 23 + for a particular node can be referenced by ``NODE_DATA(nid)`` macro where 24 + ``nid`` is the ID of that node. 25 + 26 + For NUMA architectures, the node structures are allocated by the architecture 27 + specific code early during boot. Usually, these structures are allocated 28 + locally on the memory bank they represent. For UMA architectures, only one 29 + static ``pg_data_t`` structure called ``contig_page_data`` is used. Nodes will 30 + be discussed further in Section :ref:`Nodes <nodes>` 31 + 32 + The entire physical address space is partitioned into one or more blocks 33 + called zones which represent ranges within memory. These ranges are usually 34 + determined by architectural constraints for accessing the physical memory. 35 + The memory range within a node that corresponds to a particular zone is 36 + described by a ``struct zone``, typedeffed to ``zone_t``. Each zone has 37 + one of the types described below. 38 + 39 + * ``ZONE_DMA`` and ``ZONE_DMA32`` historically represented memory suitable for 40 + DMA by peripheral devices that cannot access all of the addressable 41 + memory. For many years there are better more and robust interfaces to get 42 + memory with DMA specific requirements (Documentation/core-api/dma-api.rst), 43 + but ``ZONE_DMA`` and ``ZONE_DMA32`` still represent memory ranges that have 44 + restrictions on how they can be accessed. 45 + Depending on the architecture, either of these zone types or even they both 46 + can be disabled at build time using ``CONFIG_ZONE_DMA`` and 47 + ``CONFIG_ZONE_DMA32`` configuration options. Some 64-bit platforms may need 48 + both zones as they support peripherals with different DMA addressing 49 + limitations. 50 + 51 + * ``ZONE_NORMAL`` is for normal memory that can be accessed by the kernel all 52 + the time. DMA operations can be performed on pages in this zone if the DMA 53 + devices support transfers to all addressable memory. ``ZONE_NORMAL`` is 54 + always enabled. 55 + 56 + * ``ZONE_HIGHMEM`` is the part of the physical memory that is not covered by a 57 + permanent mapping in the kernel page tables. The memory in this zone is only 58 + accessible to the kernel using temporary mappings. This zone is available 59 + only on some 32-bit architectures and is enabled with ``CONFIG_HIGHMEM``. 60 + 61 + * ``ZONE_MOVABLE`` is for normal accessible memory, just like ``ZONE_NORMAL``. 62 + The difference is that the contents of most pages in ``ZONE_MOVABLE`` is 63 + movable. That means that while virtual addresses of these pages do not 64 + change, their content may move between different physical pages. Often 65 + ``ZONE_MOVABLE`` is populated during memory hotplug, but it may be 66 + also populated on boot using one of ``kernelcore``, ``movablecore`` and 67 + ``movable_node`` kernel command line parameters. See 68 + Documentation/mm/page_migration.rst and 69 + Documentation/admin-guide/mm/memory_hotplug.rst for additional details. 70 + 71 + * ``ZONE_DEVICE`` represents memory residing on devices such as PMEM and GPU. 72 + It has different characteristics than RAM zone types and it exists to provide 73 + :ref:`struct page <Pages>` and memory map services for device driver 74 + identified physical address ranges. ``ZONE_DEVICE`` is enabled with 75 + configuration option ``CONFIG_ZONE_DEVICE``. 76 + 77 + It is important to note that many kernel operations can only take place using 78 + ``ZONE_NORMAL`` so it is the most performance critical zone. Zones are 79 + discussed further in Section :ref:`Zones <zones>`. 80 + 81 + The relation between node and zone extents is determined by the physical memory 82 + map reported by the firmware, architectural constraints for memory addressing 83 + and certain parameters in the kernel command line. 84 + 85 + For example, with 32-bit kernel on an x86 UMA machine with 2 Gbytes of RAM the 86 + entire memory will be on node 0 and there will be three zones: ``ZONE_DMA``, 87 + ``ZONE_NORMAL`` and ``ZONE_HIGHMEM``:: 88 + 89 + 0 2G 90 + +-------------------------------------------------------------+ 91 + | node 0 | 92 + +-------------------------------------------------------------+ 93 + 94 + 0 16M 896M 2G 95 + +----------+-----------------------+--------------------------+ 96 + | ZONE_DMA | ZONE_NORMAL | ZONE_HIGHMEM | 97 + +----------+-----------------------+--------------------------+ 98 + 99 + 100 + With a kernel built with ``ZONE_DMA`` disabled and ``ZONE_DMA32`` enabled and 101 + booted with ``movablecore=80%`` parameter on an arm64 machine with 16 Gbytes of 102 + RAM equally split between two nodes, there will be ``ZONE_DMA32``, 103 + ``ZONE_NORMAL`` and ``ZONE_MOVABLE`` on node 0, and ``ZONE_NORMAL`` and 104 + ``ZONE_MOVABLE`` on node 1:: 105 + 106 + 107 + 1G 9G 17G 108 + +--------------------------------+ +--------------------------+ 109 + | node 0 | | node 1 | 110 + +--------------------------------+ +--------------------------+ 111 + 112 + 1G 4G 4200M 9G 9320M 17G 113 + +---------+----------+-----------+ +------------+-------------+ 114 + | DMA32 | NORMAL | MOVABLE | | NORMAL | MOVABLE | 115 + +---------+----------+-----------+ +------------+-------------+ 116 + 117 + .. _nodes: 118 + 119 + Nodes 120 + ===== 121 + 122 + As we have mentioned, each node in memory is described by a ``pg_data_t`` which 123 + is a typedef for a ``struct pglist_data``. When allocating a page, by default 124 + Linux uses a node-local allocation policy to allocate memory from the node 125 + closest to the running CPU. As processes tend to run on the same CPU, it is 126 + likely the memory from the current node will be used. The allocation policy can 127 + be controlled by users as described in 128 + Documentation/admin-guide/mm/numa_memory_policy.rst. 129 + 130 + Most NUMA architectures maintain an array of pointers to the node 131 + structures. The actual structures are allocated early during boot when 132 + architecture specific code parses the physical memory map reported by the 133 + firmware. The bulk of the node initialization happens slightly later in the 134 + boot process by free_area_init() function, described later in Section 135 + :ref:`Initialization <initialization>`. 136 + 137 + 138 + Along with the node structures, kernel maintains an array of ``nodemask_t`` 139 + bitmasks called ``node_states``. Each bitmask in this array represents a set of 140 + nodes with particular properties as defined by ``enum node_states``: 141 + 142 + ``N_POSSIBLE`` 143 + The node could become online at some point. 144 + ``N_ONLINE`` 145 + The node is online. 146 + ``N_NORMAL_MEMORY`` 147 + The node has regular memory. 148 + ``N_HIGH_MEMORY`` 149 + The node has regular or high memory. When ``CONFIG_HIGHMEM`` is disabled 150 + aliased to ``N_NORMAL_MEMORY``. 151 + ``N_MEMORY`` 152 + The node has memory(regular, high, movable) 153 + ``N_CPU`` 154 + The node has one or more CPUs 155 + 156 + For each node that has a property described above, the bit corresponding to the 157 + node ID in the ``node_states[<property>]`` bitmask is set. 158 + 159 + For example, for node 2 with normal memory and CPUs, bit 2 will be set in :: 160 + 161 + node_states[N_POSSIBLE] 162 + node_states[N_ONLINE] 163 + node_states[N_NORMAL_MEMORY] 164 + node_states[N_HIGH_MEMORY] 165 + node_states[N_MEMORY] 166 + node_states[N_CPU] 167 + 168 + For various operations possible with nodemasks please refer to 169 + ``include/linux/nodemask.h``. 170 + 171 + Among other things, nodemasks are used to provide macros for node traversal, 172 + namely ``for_each_node()`` and ``for_each_online_node()``. 173 + 174 + For instance, to call a function foo() for each online node:: 175 + 176 + for_each_online_node(nid) { 177 + pg_data_t *pgdat = NODE_DATA(nid); 178 + 179 + foo(pgdat); 180 + } 181 + 182 + Node structure 183 + -------------- 184 + 185 + The nodes structure ``struct pglist_data`` is declared in 186 + ``include/linux/mmzone.h``. Here we briefly describe fields of this 187 + structure: 188 + 189 + General 190 + ~~~~~~~ 191 + 192 + ``node_zones`` 193 + The zones for this node. Not all of the zones may be populated, but it is 194 + the full list. It is referenced by this node's node_zonelists as well as 195 + other node's node_zonelists. 196 + 197 + ``node_zonelists`` 198 + The list of all zones in all nodes. This list defines the order of zones 199 + that allocations are preferred from. The ``node_zonelists`` is set up by 200 + ``build_zonelists()`` in ``mm/page_alloc.c`` during the initialization of 201 + core memory management structures. 202 + 203 + ``nr_zones`` 204 + Number of populated zones in this node. 205 + 206 + ``node_mem_map`` 207 + For UMA systems that use FLATMEM memory model the 0's node 208 + ``node_mem_map`` is array of struct pages representing each physical frame. 209 + 210 + ``node_page_ext`` 211 + For UMA systems that use FLATMEM memory model the 0's node 212 + ``node_page_ext`` is array of extensions of struct pages. Available only 213 + in the kernels built with ``CONFIG_PAGE_EXTENSION`` enabled. 214 + 215 + ``node_start_pfn`` 216 + The page frame number of the starting page frame in this node. 217 + 218 + ``node_present_pages`` 219 + Total number of physical pages present in this node. 220 + 221 + ``node_spanned_pages`` 222 + Total size of physical page range, including holes. 223 + 224 + ``node_size_lock`` 225 + A lock that protects the fields defining the node extents. Only defined when 226 + at least one of ``CONFIG_MEMORY_HOTPLUG`` or 227 + ``CONFIG_DEFERRED_STRUCT_PAGE_INIT`` configuration options are enabled. 228 + ``pgdat_resize_lock()`` and ``pgdat_resize_unlock()`` are provided to 229 + manipulate ``node_size_lock`` without checking for ``CONFIG_MEMORY_HOTPLUG`` 230 + or ``CONFIG_DEFERRED_STRUCT_PAGE_INIT``. 231 + 232 + ``node_id`` 233 + The Node ID (NID) of the node, starts at 0. 234 + 235 + ``totalreserve_pages`` 236 + This is a per-node reserve of pages that are not available to userspace 237 + allocations. 238 + 239 + ``first_deferred_pfn`` 240 + If memory initialization on large machines is deferred then this is the first 241 + PFN that needs to be initialized. Defined only when 242 + ``CONFIG_DEFERRED_STRUCT_PAGE_INIT`` is enabled 243 + 244 + ``deferred_split_queue`` 245 + Per-node queue of huge pages that their split was deferred. Defined only when ``CONFIG_TRANSPARENT_HUGEPAGE`` is enabled. 246 + 247 + ``__lruvec`` 248 + Per-node lruvec holding LRU lists and related parameters. Used only when 249 + memory cgroups are disabled. It should not be accessed directly, use 250 + ``mem_cgroup_lruvec()`` to look up lruvecs instead. 251 + 252 + Reclaim control 253 + ~~~~~~~~~~~~~~~ 254 + 255 + See also Documentation/mm/page_reclaim.rst. 256 + 257 + ``kswapd`` 258 + Per-node instance of kswapd kernel thread. 259 + 260 + ``kswapd_wait``, ``pfmemalloc_wait``, ``reclaim_wait`` 261 + Workqueues used to synchronize memory reclaim tasks 262 + 263 + ``nr_writeback_throttled`` 264 + Number of tasks that are throttled waiting on dirty pages to clean. 265 + 266 + ``nr_reclaim_start`` 267 + Number of pages written while reclaim is throttled waiting for writeback. 268 + 269 + ``kswapd_order`` 270 + Controls the order kswapd tries to reclaim 271 + 272 + ``kswapd_highest_zoneidx`` 273 + The highest zone index to be reclaimed by kswapd 274 + 275 + ``kswapd_failures`` 276 + Number of runs kswapd was unable to reclaim any pages 277 + 278 + ``min_unmapped_pages`` 279 + Minimal number of unmapped file backed pages that cannot be reclaimed. 280 + Determined by ``vm.min_unmapped_ratio`` sysctl. Only defined when 281 + ``CONFIG_NUMA`` is enabled. 282 + 283 + ``min_slab_pages`` 284 + Minimal number of SLAB pages that cannot be reclaimed. Determined by 285 + ``vm.min_slab_ratio sysctl``. Only defined when ``CONFIG_NUMA`` is enabled 286 + 287 + ``flags`` 288 + Flags controlling reclaim behavior. 289 + 290 + Compaction control 291 + ~~~~~~~~~~~~~~~~~~ 292 + 293 + ``kcompactd_max_order`` 294 + Page order that kcompactd should try to achieve. 295 + 296 + ``kcompactd_highest_zoneidx`` 297 + The highest zone index to be compacted by kcompactd. 298 + 299 + ``kcompactd_wait`` 300 + Workqueue used to synchronize memory compaction tasks. 301 + 302 + ``kcompactd`` 303 + Per-node instance of kcompactd kernel thread. 304 + 305 + ``proactive_compact_trigger`` 306 + Determines if proactive compaction is enabled. Controlled by 307 + ``vm.compaction_proactiveness`` sysctl. 308 + 309 + Statistics 310 + ~~~~~~~~~~ 311 + 312 + ``per_cpu_nodestats`` 313 + Per-CPU VM statistics for the node 314 + 315 + ``vm_stat`` 316 + VM statistics for the node. 317 + 318 + .. _zones: 319 + 320 + Zones 321 + ===== 322 + 323 + .. admonition:: Stub 324 + 325 + This section is incomplete. Please list and describe the appropriate fields. 326 + 327 + .. _pages: 328 + 329 + Pages 330 + ===== 331 + 332 + .. admonition:: Stub 333 + 334 + This section is incomplete. Please list and describe the appropriate fields. 335 + 336 + .. _folios: 337 + 338 + Folios 339 + ====== 340 + 341 + .. admonition:: Stub 342 + 343 + This section is incomplete. Please list and describe the appropriate fields. 344 + 345 + .. _initialization: 346 + 347 + Initialization 348 + ============== 349 + 350 + .. admonition:: Stub 351 + 352 + This section is incomplete. Please list and describe the appropriate fields.
-2
Documentation/mm/remap_file_pages.rst
··· 1 - .. _remap_file_pages: 2 - 3 1 ============================== 4 2 remap_file_pages() system call 5 3 ==============================
-2
Documentation/mm/slub.rst
··· 1 - .. _slub: 2 - 3 1 ========================== 4 2 Short users guide for SLUB 5 3 ==========================
-2
Documentation/mm/split_page_table_lock.rst
··· 1 - .. _split_page_table_lock: 2 - 3 1 ===================== 4 2 Split page table lock 5 3 =====================
-2
Documentation/mm/transhuge.rst
··· 1 - .. _transhuge: 2 - 3 1 ============================ 4 2 Transparent Hugepage Support 5 3 ============================
-2
Documentation/mm/unevictable-lru.rst
··· 1 - .. _unevictable_lru: 2 - 3 1 ============================== 4 2 Unevictable LRU Infrastructure 5 3 ==============================
-2
Documentation/mm/z3fold.rst
··· 1 - .. _z3fold: 2 - 3 1 ====== 4 2 z3fold 5 3 ======
-2
Documentation/mm/zsmalloc.rst
··· 1 - .. _zsmalloc: 2 - 3 1 ======== 4 2 zsmalloc 5 3 ========
+52 -52
Documentation/networking/device_drivers/ethernet/mellanox/mlx5/tracepoints.rst
··· 10 10 mlx5 driver provides internal tracepoints for tracking and debugging using 11 11 kernel tracepoints interfaces (refer to Documentation/trace/ftrace.rst). 12 12 13 - For the list of support mlx5 events, check `/sys/kernel/debug/tracing/events/mlx5/`. 13 + For the list of support mlx5 events, check /sys/kernel/tracing/events/mlx5/. 14 14 15 15 tc and eswitch offloads tracepoints: 16 16 17 17 - mlx5e_configure_flower: trace flower filter actions and cookies offloaded to mlx5:: 18 18 19 - $ echo mlx5:mlx5e_configure_flower >> /sys/kernel/debug/tracing/set_event 20 - $ cat /sys/kernel/debug/tracing/trace 19 + $ echo mlx5:mlx5e_configure_flower >> /sys/kernel/tracing/set_event 20 + $ cat /sys/kernel/tracing/trace 21 21 ... 22 22 tc-6535 [019] ...1 2672.404466: mlx5e_configure_flower: cookie=0000000067874a55 actions= REDIRECT 23 23 24 24 - mlx5e_delete_flower: trace flower filter actions and cookies deleted from mlx5:: 25 25 26 - $ echo mlx5:mlx5e_delete_flower >> /sys/kernel/debug/tracing/set_event 27 - $ cat /sys/kernel/debug/tracing/trace 26 + $ echo mlx5:mlx5e_delete_flower >> /sys/kernel/tracing/set_event 27 + $ cat /sys/kernel/tracing/trace 28 28 ... 29 29 tc-6569 [010] .N.1 2686.379075: mlx5e_delete_flower: cookie=0000000067874a55 actions= NULL 30 30 31 31 - mlx5e_stats_flower: trace flower stats request:: 32 32 33 - $ echo mlx5:mlx5e_stats_flower >> /sys/kernel/debug/tracing/set_event 34 - $ cat /sys/kernel/debug/tracing/trace 33 + $ echo mlx5:mlx5e_stats_flower >> /sys/kernel/tracing/set_event 34 + $ cat /sys/kernel/tracing/trace 35 35 ... 36 36 tc-6546 [010] ...1 2679.704889: mlx5e_stats_flower: cookie=0000000060eb3d6a bytes=0 packets=0 lastused=4295560217 37 37 38 38 - mlx5e_tc_update_neigh_used_value: trace tunnel rule neigh update value offloaded to mlx5:: 39 39 40 - $ echo mlx5:mlx5e_tc_update_neigh_used_value >> /sys/kernel/debug/tracing/set_event 41 - $ cat /sys/kernel/debug/tracing/trace 40 + $ echo mlx5:mlx5e_tc_update_neigh_used_value >> /sys/kernel/tracing/set_event 41 + $ cat /sys/kernel/tracing/trace 42 42 ... 43 43 kworker/u48:4-8806 [009] ...1 55117.882428: mlx5e_tc_update_neigh_used_value: netdev: ens1f0 IPv4: 1.1.1.10 IPv6: ::ffff:1.1.1.10 neigh_used=1 44 44 45 45 - mlx5e_rep_neigh_update: trace neigh update tasks scheduled due to neigh state change events:: 46 46 47 - $ echo mlx5:mlx5e_rep_neigh_update >> /sys/kernel/debug/tracing/set_event 48 - $ cat /sys/kernel/debug/tracing/trace 47 + $ echo mlx5:mlx5e_rep_neigh_update >> /sys/kernel/tracing/set_event 48 + $ cat /sys/kernel/tracing/trace 49 49 ... 50 50 kworker/u48:7-2221 [009] ...1 1475.387435: mlx5e_rep_neigh_update: netdev: ens1f0 MAC: 24:8a:07:9a:17:9a IPv4: 1.1.1.10 IPv6: ::ffff:1.1.1.10 neigh_connected=1 51 51 ··· 54 54 - mlx5_esw_bridge_fdb_entry_init: trace bridge FDB entry offloaded to mlx5:: 55 55 56 56 $ echo mlx5:mlx5_esw_bridge_fdb_entry_init >> set_event 57 - $ cat /sys/kernel/debug/tracing/trace 57 + $ cat /sys/kernel/tracing/trace 58 58 ... 59 59 kworker/u20:9-2217 [003] ...1 318.582243: mlx5_esw_bridge_fdb_entry_init: net_device=enp8s0f0_0 addr=e4:fd:05:08:00:02 vid=0 flags=0 used=0 60 60 61 61 - mlx5_esw_bridge_fdb_entry_cleanup: trace bridge FDB entry deleted from mlx5:: 62 62 63 63 $ echo mlx5:mlx5_esw_bridge_fdb_entry_cleanup >> set_event 64 - $ cat /sys/kernel/debug/tracing/trace 64 + $ cat /sys/kernel/tracing/trace 65 65 ... 66 66 ip-2581 [005] ...1 318.629871: mlx5_esw_bridge_fdb_entry_cleanup: net_device=enp8s0f0_1 addr=e4:fd:05:08:00:03 vid=0 flags=0 used=16 67 67 ··· 69 69 mlx5:: 70 70 71 71 $ echo mlx5:mlx5_esw_bridge_fdb_entry_refresh >> set_event 72 - $ cat /sys/kernel/debug/tracing/trace 72 + $ cat /sys/kernel/tracing/trace 73 73 ... 74 74 kworker/u20:8-3849 [003] ...1 466716: mlx5_esw_bridge_fdb_entry_refresh: net_device=enp8s0f0_0 addr=e4:fd:05:08:00:02 vid=3 flags=0 used=0 75 75 ··· 77 77 representor:: 78 78 79 79 $ echo mlx5:mlx5_esw_bridge_vlan_create >> set_event 80 - $ cat /sys/kernel/debug/tracing/trace 80 + $ cat /sys/kernel/tracing/trace 81 81 ... 82 82 ip-2560 [007] ...1 318.460258: mlx5_esw_bridge_vlan_create: vid=1 flags=6 83 83 ··· 85 85 representor:: 86 86 87 87 $ echo mlx5:mlx5_esw_bridge_vlan_cleanup >> set_event 88 - $ cat /sys/kernel/debug/tracing/trace 88 + $ cat /sys/kernel/tracing/trace 89 89 ... 90 90 bridge-2582 [007] ...1 318.653496: mlx5_esw_bridge_vlan_cleanup: vid=2 flags=8 91 91 ··· 93 93 device:: 94 94 95 95 $ echo mlx5:mlx5_esw_bridge_vport_init >> set_event 96 - $ cat /sys/kernel/debug/tracing/trace 96 + $ cat /sys/kernel/tracing/trace 97 97 ... 98 98 ip-2560 [007] ...1 318.458915: mlx5_esw_bridge_vport_init: vport_num=1 99 99 ··· 101 101 device:: 102 102 103 103 $ echo mlx5:mlx5_esw_bridge_vport_cleanup >> set_event 104 - $ cat /sys/kernel/debug/tracing/trace 104 + $ cat /sys/kernel/tracing/trace 105 105 ... 106 106 ip-5387 [000] ...1 573713: mlx5_esw_bridge_vport_cleanup: vport_num=1 107 107 ··· 109 109 110 110 - mlx5_esw_vport_qos_create: trace creation of transmit scheduler arbiter for vport:: 111 111 112 - $ echo mlx5:mlx5_esw_vport_qos_create >> /sys/kernel/debug/tracing/set_event 113 - $ cat /sys/kernel/debug/tracing/trace 112 + $ echo mlx5:mlx5_esw_vport_qos_create >> /sys/kernel/tracing/set_event 113 + $ cat /sys/kernel/tracing/trace 114 114 ... 115 115 <...>-23496 [018] .... 73136.838831: mlx5_esw_vport_qos_create: (0000:82:00.0) vport=2 tsar_ix=4 bw_share=0, max_rate=0 group=000000007b576bb3 116 116 117 117 - mlx5_esw_vport_qos_config: trace configuration of transmit scheduler arbiter for vport:: 118 118 119 - $ echo mlx5:mlx5_esw_vport_qos_config >> /sys/kernel/debug/tracing/set_event 120 - $ cat /sys/kernel/debug/tracing/trace 119 + $ echo mlx5:mlx5_esw_vport_qos_config >> /sys/kernel/tracing/set_event 120 + $ cat /sys/kernel/tracing/trace 121 121 ... 122 122 <...>-26548 [023] .... 75754.223823: mlx5_esw_vport_qos_config: (0000:82:00.0) vport=1 tsar_ix=3 bw_share=34, max_rate=10000 group=000000007b576bb3 123 123 124 124 - mlx5_esw_vport_qos_destroy: trace deletion of transmit scheduler arbiter for vport:: 125 125 126 - $ echo mlx5:mlx5_esw_vport_qos_destroy >> /sys/kernel/debug/tracing/set_event 127 - $ cat /sys/kernel/debug/tracing/trace 126 + $ echo mlx5:mlx5_esw_vport_qos_destroy >> /sys/kernel/tracing/set_event 127 + $ cat /sys/kernel/tracing/trace 128 128 ... 129 129 <...>-27418 [004] .... 76546.680901: mlx5_esw_vport_qos_destroy: (0000:82:00.0) vport=1 tsar_ix=3 130 130 131 131 - mlx5_esw_group_qos_create: trace creation of transmit scheduler arbiter for rate group:: 132 132 133 - $ echo mlx5:mlx5_esw_group_qos_create >> /sys/kernel/debug/tracing/set_event 134 - $ cat /sys/kernel/debug/tracing/trace 133 + $ echo mlx5:mlx5_esw_group_qos_create >> /sys/kernel/tracing/set_event 134 + $ cat /sys/kernel/tracing/trace 135 135 ... 136 136 <...>-26578 [008] .... 75776.022112: mlx5_esw_group_qos_create: (0000:82:00.0) group=000000008dac63ea tsar_ix=5 137 137 138 138 - mlx5_esw_group_qos_config: trace configuration of transmit scheduler arbiter for rate group:: 139 139 140 - $ echo mlx5:mlx5_esw_group_qos_config >> /sys/kernel/debug/tracing/set_event 141 - $ cat /sys/kernel/debug/tracing/trace 140 + $ echo mlx5:mlx5_esw_group_qos_config >> /sys/kernel/tracing/set_event 141 + $ cat /sys/kernel/tracing/trace 142 142 ... 143 143 <...>-27303 [020] .... 76461.455356: mlx5_esw_group_qos_config: (0000:82:00.0) group=000000008dac63ea tsar_ix=5 bw_share=100 max_rate=20000 144 144 145 145 - mlx5_esw_group_qos_destroy: trace deletion of transmit scheduler arbiter for group:: 146 146 147 - $ echo mlx5:mlx5_esw_group_qos_destroy >> /sys/kernel/debug/tracing/set_event 148 - $ cat /sys/kernel/debug/tracing/trace 147 + $ echo mlx5:mlx5_esw_group_qos_destroy >> /sys/kernel/tracing/set_event 148 + $ cat /sys/kernel/tracing/trace 149 149 ... 150 150 <...>-27418 [006] .... 76547.187258: mlx5_esw_group_qos_destroy: (0000:82:00.0) group=000000007b576bb3 tsar_ix=1 151 151 ··· 153 153 154 154 - mlx5_sf_add: trace addition of the SF port:: 155 155 156 - $ echo mlx5:mlx5_sf_add >> /sys/kernel/debug/tracing/set_event 157 - $ cat /sys/kernel/debug/tracing/trace 156 + $ echo mlx5:mlx5_sf_add >> /sys/kernel/tracing/set_event 157 + $ cat /sys/kernel/tracing/trace 158 158 ... 159 159 devlink-9363 [031] ..... 24610.188722: mlx5_sf_add: (0000:06:00.0) port_index=32768 controller=0 hw_id=0x8000 sfnum=88 160 160 161 161 - mlx5_sf_free: trace freeing of the SF port:: 162 162 163 - $ echo mlx5:mlx5_sf_free >> /sys/kernel/debug/tracing/set_event 164 - $ cat /sys/kernel/debug/tracing/trace 163 + $ echo mlx5:mlx5_sf_free >> /sys/kernel/tracing/set_event 164 + $ cat /sys/kernel/tracing/trace 165 165 ... 166 166 devlink-9830 [038] ..... 26300.404749: mlx5_sf_free: (0000:06:00.0) port_index=32768 controller=0 hw_id=0x8000 167 167 168 168 - mlx5_sf_activate: trace activation of the SF port:: 169 169 170 - $ echo mlx5:mlx5_sf_activate >> /sys/kernel/debug/tracing/set_event 171 - $ cat /sys/kernel/debug/tracing/trace 170 + $ echo mlx5:mlx5_sf_activate >> /sys/kernel/tracing/set_event 171 + $ cat /sys/kernel/tracing/trace 172 172 ... 173 173 devlink-29841 [008] ..... 3669.635095: mlx5_sf_activate: (0000:08:00.0) port_index=32768 controller=0 hw_id=0x8000 174 174 175 175 - mlx5_sf_deactivate: trace deactivation of the SF port:: 176 176 177 - $ echo mlx5:mlx5_sf_deactivate >> /sys/kernel/debug/tracing/set_event 178 - $ cat /sys/kernel/debug/tracing/trace 177 + $ echo mlx5:mlx5_sf_deactivate >> /sys/kernel/tracing/set_event 178 + $ cat /sys/kernel/tracing/trace 179 179 ... 180 180 devlink-29994 [008] ..... 4015.969467: mlx5_sf_deactivate: (0000:08:00.0) port_index=32768 controller=0 hw_id=0x8000 181 181 182 182 - mlx5_sf_hwc_alloc: trace allocating of the hardware SF context:: 183 183 184 - $ echo mlx5:mlx5_sf_hwc_alloc >> /sys/kernel/debug/tracing/set_event 185 - $ cat /sys/kernel/debug/tracing/trace 184 + $ echo mlx5:mlx5_sf_hwc_alloc >> /sys/kernel/tracing/set_event 185 + $ cat /sys/kernel/tracing/trace 186 186 ... 187 187 devlink-9775 [031] ..... 26296.385259: mlx5_sf_hwc_alloc: (0000:06:00.0) controller=0 hw_id=0x8000 sfnum=88 188 188 189 189 - mlx5_sf_hwc_free: trace freeing of the hardware SF context:: 190 190 191 - $ echo mlx5:mlx5_sf_hwc_free >> /sys/kernel/debug/tracing/set_event 192 - $ cat /sys/kernel/debug/tracing/trace 191 + $ echo mlx5:mlx5_sf_hwc_free >> /sys/kernel/tracing/set_event 192 + $ cat /sys/kernel/tracing/trace 193 193 ... 194 194 kworker/u128:3-9093 [046] ..... 24625.365771: mlx5_sf_hwc_free: (0000:06:00.0) hw_id=0x8000 195 195 196 196 - mlx5_sf_hwc_deferred_free: trace deferred freeing of the hardware SF context:: 197 197 198 - $ echo mlx5:mlx5_sf_hwc_deferred_free >> /sys/kernel/debug/tracing/set_event 199 - $ cat /sys/kernel/debug/tracing/trace 198 + $ echo mlx5:mlx5_sf_hwc_deferred_free >> /sys/kernel/tracing/set_event 199 + $ cat /sys/kernel/tracing/trace 200 200 ... 201 201 devlink-9519 [046] ..... 24624.400271: mlx5_sf_hwc_deferred_free: (0000:06:00.0) hw_id=0x8000 202 202 203 203 - mlx5_sf_update_state: trace state updates for SF contexts:: 204 204 205 - $ echo mlx5:mlx5_sf_update_state >> /sys/kernel/debug/tracing/set_event 206 - $ cat /sys/kernel/debug/tracing/trace 205 + $ echo mlx5:mlx5_sf_update_state >> /sys/kernel/tracing/set_event 206 + $ cat /sys/kernel/tracing/trace 207 207 ... 208 208 kworker/u20:3-29490 [009] ..... 4141.453530: mlx5_sf_update_state: (0000:08:00.0) port_index=32768 controller=0 hw_id=0x8000 state=2 209 209 210 210 - mlx5_sf_vhca_event: trace SF vhca event and state:: 211 211 212 - $ echo mlx5:mlx5_sf_vhca_event >> /sys/kernel/debug/tracing/set_event 213 - $ cat /sys/kernel/debug/tracing/trace 212 + $ echo mlx5:mlx5_sf_vhca_event >> /sys/kernel/tracing/set_event 213 + $ cat /sys/kernel/tracing/trace 214 214 ... 215 215 kworker/u128:3-9093 [046] ..... 24625.365525: mlx5_sf_vhca_event: (0000:06:00.0) hw_id=0x8000 sfnum=88 vhca_state=1 216 216 217 217 - mlx5_sf_dev_add: trace SF device add event:: 218 218 219 - $ echo mlx5:mlx5_sf_dev_add>> /sys/kernel/debug/tracing/set_event 220 - $ cat /sys/kernel/debug/tracing/trace 219 + $ echo mlx5:mlx5_sf_dev_add>> /sys/kernel/tracing/set_event 220 + $ cat /sys/kernel/tracing/trace 221 221 ... 222 222 kworker/u128:3-9093 [000] ..... 24616.524495: mlx5_sf_dev_add: (0000:06:00.0) sfdev=00000000fc5d96fd aux_id=4 hw_id=0x8000 sfnum=88 223 223 224 224 - mlx5_sf_dev_del: trace SF device delete event:: 225 225 226 - $ echo mlx5:mlx5_sf_dev_del >> /sys/kernel/debug/tracing/set_event 227 - $ cat /sys/kernel/debug/tracing/trace 226 + $ echo mlx5:mlx5_sf_dev_del >> /sys/kernel/tracing/set_event 227 + $ cat /sys/kernel/tracing/trace 228 228 ... 229 229 kworker/u128:3-9093 [044] ..... 24624.400749: mlx5_sf_dev_del: (0000:06:00.0) sfdev=00000000fc5d96fd aux_id=4 hw_id=0x8000 sfnum=88
+3 -3
Documentation/peci/index.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0-only 2 2 3 - ==================== 4 - Linux PECI Subsystem 5 - ==================== 3 + ============== 4 + PECI Subsystem 5 + ============== 6 6 7 7 .. toctree:: 8 8
+1 -1
Documentation/process/botching-up-ioctls.rst
··· 41 41 structures to the kernel, or if the kernel checks the structure size, which 42 42 e.g. the drm core does. 43 43 44 - * Pointers are __u64, cast from/to a uintprt_t on the userspace side and 44 + * Pointers are __u64, cast from/to a uintptr_t on the userspace side and 45 45 from/to a void __user * in the kernel. Try really hard not to delay this 46 46 conversion or worse, fiddle the raw __u64 through your code since that 47 47 diminishes the checking tools like sparse can provide. The macro
+26
Documentation/process/deprecated.rst
··· 346 346 instance->count = count; 347 347 348 348 memcpy(instance->items, source, flex_array_size(instance, items, instance->count)); 349 + 350 + There are two special cases of replacement where the DECLARE_FLEX_ARRAY() 351 + helper needs to be used. (Note that it is named __DECLARE_FLEX_ARRAY() for 352 + use in UAPI headers.) Those cases are when the flexible array is either 353 + alone in a struct or is part of a union. These are disallowed by the C99 354 + specification, but for no technical reason (as can be seen by both the 355 + existing use of such arrays in those places and the work-around that 356 + DECLARE_FLEX_ARRAY() uses). For example, to convert this:: 357 + 358 + struct something { 359 + ... 360 + union { 361 + struct type1 one[0]; 362 + struct type2 two[0]; 363 + }; 364 + }; 365 + 366 + The helper must be used:: 367 + 368 + struct something { 369 + ... 370 + union { 371 + DECLARE_FLEX_ARRAY(struct type1, one); 372 + DECLARE_FLEX_ARRAY(struct type2, two); 373 + }; 374 + };
+20
Documentation/process/email-clients.rst
··· 350 350 351 351 Another problem is that Gmail will base64-encode any message that has a 352 352 non-ASCII character. That includes things like European names. 353 + 354 + Proton Mail 355 + *********** 356 + 357 + Proton Mail has a "feature" where it looks up keys using Web Key Directory 358 + (WKD) and encrypts mail to any recipients for which it finds a key. 359 + Kernel.org publishes the WKD for all developers who have kernel.org accounts. 360 + As a result, emails sent using Proton Mail to kernel.org addresses will be 361 + encrypted. 362 + Unfortunately, Proton Mail does not provide a mechanism to disable the 363 + automatic encryption, viewing it as a privacy feature. 364 + The automatic encryption feature is also enabled for mail sent via the Proton 365 + Mail Bridge, so this affects all outgoing messages, including patches sent with 366 + ``git send-email``. 367 + Encrypted mail adds unnecessary friction, as other developers may not have mail 368 + clients, or tooling, configured for use with encrypted mail and some mail 369 + clients may encrypt responses to encrypted mail for all recipients, including 370 + the mailing lists. 371 + Unless a way to disable this "feature" is introduced, Proton Mail is unsuited 372 + to kernel development.
+30 -72
Documentation/process/maintainer-pgp-guide.rst
··· 60 60 PGP tools 61 61 ========= 62 62 63 - Use GnuPG v2 64 - ------------ 63 + Use GnuPG 2.2 or later 64 + ---------------------- 65 65 66 66 Your distro should already have GnuPG installed by default, you just 67 - need to verify that you are using version 2.x and not the legacy 1.4 68 - release -- many distributions still package both, with the default 69 - ``gpg`` command invoking GnuPG v.1. To check, run:: 67 + need to verify that you are using a reasonably recent version of it. 68 + To check, run:: 70 69 71 70 $ gpg --version | head -n1 72 71 73 - If you see ``gpg (GnuPG) 1.4.x``, then you are using GnuPG v.1. Try the 74 - ``gpg2`` command (if you don't have it, you may need to install the 75 - gnupg2 package):: 76 - 77 - $ gpg2 --version | head -n1 78 - 79 - If you see ``gpg (GnuPG) 2.x.x``, then you are good to go. This guide 80 - will assume you have the version 2.2 of GnuPG (or later). If you are 81 - using version 2.0 of GnuPG, then some of the commands in this guide will 82 - not work, and you should consider installing the latest 2.2 version of 83 - GnuPG. Versions of gnupg-2.1.11 and later should be compatible for the 84 - purposes of this guide as well. 85 - 86 - If you have both ``gpg`` and ``gpg2`` commands, you should make sure you 87 - are always using GnuPG v2, not the legacy version. You can enforce this 88 - by setting the appropriate alias:: 89 - 90 - $ alias gpg=gpg2 91 - 92 - You can put that in your ``.bashrc`` to make sure it's always the case. 72 + If you have version 2.2 or above, then you are good to go. If you have a 73 + version that is prior than 2.2, then some commands from this guide may 74 + not work. 93 75 94 76 Configure gpg-agent options 95 77 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ··· 132 150 The key with the **[C]** capability is often called the "master" key, 133 151 but this terminology is misleading because it implies that the Certify 134 152 key can be used in place of any of other subkey on the same chain (like 135 - a physical "master key" can be used to open the locks made for other 136 - keys). Since this is not the case, this guide will refer to it as "the 137 - Certify key" to avoid any ambiguity. 153 + a physical "master key" can be used to open locks made for other keys). 154 + Since this is not the case, this guide will refer to it as "the Certify 155 + key" to avoid any ambiguity. 138 156 139 157 It is critical to fully understand the following: 140 158 ··· 168 186 is what you will have. You can verify by running ``gpg --list-secret-keys``, 169 187 for example:: 170 188 171 - sec rsa2048 2018-01-23 [SC] [expires: 2020-01-23] 189 + sec ed25519 2022-12-20 [SC] [expires: 2024-12-19] 172 190 000000000000000000000000AAAABBBBCCCCDDDD 173 191 uid [ultimate] Alice Dev <adev@kernel.org> 174 - ssb rsa2048 2018-01-23 [E] [expires: 2020-01-23] 192 + ssb cv25519 2022-12-20 [E] [expires: 2024-12-19] 175 193 176 194 The long line under the ``sec`` entry is your key fingerprint -- 177 195 whenever you see ``[fpr]`` in the examples below, that 40-character ··· 201 219 202 220 .. note:: ECC support in GnuPG 203 221 204 - GnuPG 2.1 and later has full support for Elliptic Curve 205 - Cryptography, with ability to combine ECC subkeys with traditional 206 - RSA keys. The main upside of ECC cryptography is that it is much 207 - faster computationally and creates much smaller signatures when 208 - compared byte for byte with 2048+ bit RSA keys. Unless you plan on 209 - using a smartcard device that does not support ECC operations, we 210 - recommend that you create an ECC signing subkey for your kernel 211 - work. 212 - 213 - Note, that if you plan to use a hardware device that does not 222 + Note, that if you intend to use a hardware token that does not 214 223 support ED25519 ECC keys, you should choose "nistp256" instead or 215 - "ed25519." 224 + "ed25519." See the section below on recommended hardware devices. 216 225 217 226 218 227 Back up your Certify key for disaster recovery ··· 309 336 310 337 The output will be something like this:: 311 338 312 - pub rsa2048 2018-01-24 [SC] [expires: 2020-01-24] 339 + pub ed25519 2022-12-20 [SC] [expires: 2022-12-19] 313 340 000000000000000000000000AAAABBBBCCCCDDDD 314 341 Keygrip = 1111000000000000000000000000000000000000 315 342 uid [ultimate] Alice Dev <adev@kernel.org> 316 - sub rsa2048 2018-01-24 [E] [expires: 2020-01-24] 343 + sub cv25519 2022-12-20 [E] [expires: 2022-12-19] 317 344 Keygrip = 2222000000000000000000000000000000000000 318 - sub ed25519 2018-01-24 [S] 345 + sub ed25519 2022-12-20 [S] 319 346 Keygrip = 3333000000000000000000000000000000000000 320 347 321 348 Find the keygrip entry that is beneath the ``pub`` line (right under the ··· 338 365 the Certify key is missing (the ``#`` indicates it is not available):: 339 366 340 367 $ gpg --list-secret-keys 341 - sec# rsa2048 2018-01-24 [SC] [expires: 2020-01-24] 368 + sec# ed25519 2022-12-20 [SC] [expires: 2024-12-19] 342 369 000000000000000000000000AAAABBBBCCCCDDDD 343 370 uid [ultimate] Alice Dev <adev@kernel.org> 344 - ssb rsa2048 2018-01-24 [E] [expires: 2020-01-24] 345 - ssb ed25519 2018-01-24 [S] 371 + ssb cv25519 2022-12-20 [E] [expires: 2024-12-19] 372 + ssb ed25519 2022-12-20 [S] 346 373 347 374 You should also remove any ``secring.gpg`` files in the ``~/.gnupg`` 348 - directory, which are left over from earlier versions of GnuPG. 375 + directory, which may be left over from previous versions of GnuPG. 349 376 350 377 If you don't have the "private-keys-v1.d" directory 351 378 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ··· 410 437 U2F, among others, and now finally supports NISTP and ED25519 ECC 411 438 keys. 412 439 413 - `LWN has a good review`_ of some of the above models, as well as several 414 - others. Your choice will depend on cost, shipping availability in your 440 + Your choice will depend on cost, shipping availability in your 415 441 geographical region, and open/proprietary hardware considerations. 416 442 417 443 .. note:: ··· 423 451 .. _`Nitrokey Pro 2`: https://shop.nitrokey.com/shop/product/nkpr2-nitrokey-pro-2-3 424 452 .. _`Yubikey 5`: https://www.yubico.com/products/yubikey-5-overview/ 425 453 .. _Gnuk: https://www.fsij.org/doc-gnuk/ 426 - .. _`LWN has a good review`: https://lwn.net/Articles/736231/ 427 454 .. _`qualify for a free Nitrokey Start`: https://www.kernel.org/nitrokey-digital-tokens-for-kernel-developers.html 428 455 429 456 Configure your smartcard device ··· 480 509 481 510 Secret subkeys are available. 482 511 483 - pub rsa2048/AAAABBBBCCCCDDDD 484 - created: 2018-01-23 expires: 2020-01-23 usage: SC 512 + pub ed25519/AAAABBBBCCCCDDDD 513 + created: 2022-12-20 expires: 2024-12-19 usage: SC 485 514 trust: ultimate validity: ultimate 486 - ssb rsa2048/1111222233334444 487 - created: 2018-01-23 expires: never usage: E 515 + ssb cv25519/1111222233334444 516 + created: 2022-12-20 expires: never usage: E 488 517 ssb ed25519/5555666677778888 489 518 created: 2017-12-07 expires: never usage: S 490 519 [ultimate] (1). Alice Dev <adev@kernel.org> ··· 548 577 difference in the output:: 549 578 550 579 $ gpg --list-secret-keys 551 - sec# rsa2048 2018-01-24 [SC] [expires: 2020-01-24] 580 + sec# ed25519 2022-12-20 [SC] [expires: 2024-12-19] 552 581 000000000000000000000000AAAABBBBCCCCDDDD 553 582 uid [ultimate] Alice Dev <adev@kernel.org> 554 - ssb> rsa2048 2018-01-24 [E] [expires: 2020-01-24] 555 - ssb> ed25519 2018-01-24 [S] 583 + ssb> cv25519 2022-12-20 [E] [expires: 2024-12-19] 584 + ssb> ed25519 2022-12-20 [S] 556 585 557 586 The ``>`` in the ``ssb>`` output indicates that the subkey is only 558 587 available on the smartcard. If you go back into your secret keys ··· 615 644 You can also use a specific date if that is easier to remember (e.g. 616 645 your birthday, January 1st, or Canada Day):: 617 646 618 - $ gpg --quick-set-expire [fpr] 2020-07-01 647 + $ gpg --quick-set-expire [fpr] 2025-07-01 619 648 620 649 Remember to send the updated key back to keyservers:: 621 650 ··· 678 707 679 708 $ git config --global user.signingKey [fpr] 680 709 681 - **IMPORTANT**: If you have a distinct ``gpg2`` command, then you should 682 - tell git to always use it instead of the legacy ``gpg`` from version 1:: 683 - 684 - $ git config --global gpg.program gpg2 685 - $ git config --global gpgv.program gpgv2 686 - 687 710 How to work with signed tags 688 711 ---------------------------- 689 712 ··· 715 750 If you are verifying someone else's git tag, then you will need to 716 751 import their PGP key. Please refer to the 717 752 ":ref:`verify_identities`" section below. 718 - 719 - .. note:: 720 - 721 - If you get "``gpg: Can't check signature: unknown pubkey 722 - algorithm``" error, you need to tell git to use gpgv2 for 723 - verification, so it properly processes signatures made by ECC keys. 724 - See instructions at the start of this section. 725 753 726 754 Configure git to always sign annotated tags 727 755 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+3 -3
Documentation/scheduler/index.rst
··· 1 - =============== 2 - Linux Scheduler 3 - =============== 1 + ========= 2 + Scheduler 3 + ========= 4 4 5 5 .. toctree:: 6 6 :maxdepth: 1
+3 -3
Documentation/scsi/index.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - ==================== 4 - Linux SCSI Subsystem 5 - ==================== 3 + ============== 4 + SCSI Subsystem 5 + ============== 6 6 7 7 .. toctree:: 8 8 :maxdepth: 1
+3 -3
Documentation/sound/hd-audio/notes.rst
··· 651 651 Enabling all tracepoints can be done like 652 652 :: 653 653 654 - # echo 1 > /sys/kernel/debug/tracing/events/hda/enable 654 + # echo 1 > /sys/kernel/tracing/events/hda/enable 655 655 656 656 then after some commands, you can traces from 657 - /sys/kernel/debug/tracing/trace file. For example, when you want to 657 + /sys/kernel/tracing/trace file. For example, when you want to 658 658 trace what codec command is sent, enable the tracepoint like: 659 659 :: 660 660 661 - # cat /sys/kernel/debug/tracing/trace 661 + # cat /sys/kernel/tracing/trace 662 662 # tracer: nop 663 663 # 664 664 # TASK-PID CPU# TIMESTAMP FUNCTION
+5 -3
Documentation/sound/index.rst
··· 1 - =================================== 2 - Linux Sound Subsystem Documentation 3 - =================================== 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + ============================= 4 + Sound Subsystem Documentation 5 + ============================= 4 6 5 7 .. toctree:: 6 8 :maxdepth: 2
+2 -2
Documentation/sparc/adi.rst
··· 38 38 39 39 ADI is enabled on a set of pages using mprotect() with PROT_ADI flag. 40 40 When ADI is enabled on a set of pages by a task for the first time, 41 - kernel sets the PSTATE.mcde bit fot the task. Version tags for memory 41 + kernel sets the PSTATE.mcde bit for the task. Version tags for memory 42 42 addresses are set with an stxa instruction on the addresses using 43 43 ASI_MCD_PRIMARY or ASI_MCD_ST_BLKINIT_PRIMARY. ADI block size is 44 44 provided by the hypervisor to the kernel. Kernel returns the value of ··· 97 97 Disrupting memory corruption 98 98 ---------------------------- 99 99 100 - When a store accesses a memory localtion that has TTE.mcd=1, 100 + When a store accesses a memory location that has TTE.mcd=1, 101 101 the task is running with ADI enabled (PSTATE.mcde=1), and the ADI 102 102 tag in the address used (bits 63:60) does not match the tag set on 103 103 the corresponding cacheline, a memory corruption trap occurs. By
+22 -22
Documentation/sparc/oradax/dax-hv-api.txt
··· 22 22 functionality offered may vary by virtual machine implementation. 23 23 24 24 The DAX is a virtual device to sun4v guests, with supported data operations indicated by the virtual device 25 - compatibilty property. Functionality is accessed through the submission of Command Control Blocks 25 + compatibility property. Functionality is accessed through the submission of Command Control Blocks 26 26 (CCBs) via the ccb_submit API function. The operations are processed asynchronously, with the status 27 27 of the submitted operations reported through a Completion Area linked to each CCB. Each CCB has a 28 28 separate Completion Area and, unless execution order is specifically restricted through the use of serial- ··· 313 313 314 314 Secondary Input Description 315 315 Format Code 316 - 0 Element is stored as value minus 1 (0 evalutes to 1, 1 evalutes 316 + 0 Element is stored as value minus 1 (0 evaluates to 1, 1 evaluates 317 317 to 2, etc) 318 318 1 Element is stored as value 319 319 ··· 659 659 “Secondary Input Element Size” 660 660 [13:10] Output Format (see Section 36.2.1.1.6, “Output Format”) 661 661 [9:5] Operand size for first scan criteria value. In a scan value 662 - operation, this is one of two potential extact match values. 662 + operation, this is one of two potential exact match values. 663 663 In a scan range operation, this is the size of the upper range 664 664 665 665 ··· 673 673 operand, minus 1. Values 0xF-0x1E are reserved. A value of 674 674 0x1F indicates this operand is not in use for this scan operation. 675 675 [4:0] Operand size for second scan criteria value. In a scan value 676 - operation, this is one of two potential extact match values. 676 + operation, this is one of two potential exact match values. 677 677 In a scan range operation, this is the size of the lower range 678 678 boundary. The value of this field is the number of bytes in the 679 679 operand, minus 1. Values 0xF-0x1E are reserved. A value of ··· 690 690 48 8 Output (same fields as Primary Input) 691 691 56 8 Symbol Table (if used by Primary Input). Same fields as Section 36.2.1.2, 692 692 “Extract command” 693 - 64 4 Next 4 most significant bytes of first scan criteria operand occuring after the 693 + 64 4 Next 4 most significant bytes of first scan criteria operand occurring after the 694 694 bytes specified at offset 40, if needed by the operand size. If first operand 695 695 is less than 8 bytes, the valid bytes are left-aligned to the lowest address. 696 - 68 4 Next 4 most significant bytes of second scan criteria operand occuring after 696 + 68 4 Next 4 most significant bytes of second scan criteria operand occurring after 697 697 the bytes specified at offset 44, if needed by the operand size. If second 698 698 operand is less than 8 bytes, the valid bytes are left-aligned to the lowest 699 699 address. 700 - 72 4 Next 4 most significant bytes of first scan criteria operand occuring after the 700 + 72 4 Next 4 most significant bytes of first scan criteria operand occurring after the 701 701 bytes specified at offset 64, if needed by the operand size. If first operand 702 702 is less than 12 bytes, the valid bytes are left-aligned to the lowest address. 703 - 76 4 Next 4 most significant bytes of second scan criteria operand occuring after 703 + 76 4 Next 4 most significant bytes of second scan criteria operand occurring after 704 704 the bytes specified at offset 68, if needed by the operand size. If second 705 705 operand is less than 12 bytes, the valid bytes are left-aligned to the lowest 706 706 address. 707 - 80 4 Next 4 most significant bytes of first scan criteria operand occuring after the 707 + 80 4 Next 4 most significant bytes of first scan criteria operand occurring after the 708 708 bytes specified at offset 72, if needed by the operand size. If first operand 709 709 is less than 16 bytes, the valid bytes are left-aligned to the lowest address. 710 - 84 4 Next 4 most significant bytes of second scan criteria operand occuring after 710 + 84 4 Next 4 most significant bytes of second scan criteria operand occurring after 711 711 the bytes specified at offset 76, if needed by the operand size. If second 712 712 operand is less than 16 bytes, the valid bytes are left-aligned to the lowest 713 713 address. ··· 721 721 722 722 36.2.1.4. Translate commands 723 723 724 - The translate commands takes an input array of indicies, and a table of single bit values indexed by those 725 - indicies, and outputs a bit vector or index array created by reading the tables bit value at each index in 724 + The translate commands takes an input array of indices, and a table of single bit values indexed by those 725 + indices, and outputs a bit vector or index array created by reading the tables bit value at each index in 726 726 the input array. The output should therefore contain exactly one bit per index in the input data stream, 727 - when outputing as a bit vector. When outputing as an index array, the number of elements depends on the 727 + when outputting as a bit vector. When outputting as an index array, the number of elements depends on the 728 728 values read in the bit table, but will always be less than, or equal to, the number of input elements. Only 729 729 a restricted subset of the possible input format types are supported. No variable width or Huffman/OZIP 730 730 encoded input streams are allowed. The primary input data element size must be 3 bytes or less. ··· 742 742 code in the CCB header. 743 743 744 744 There are two supported formats for the output stream: the bit vector and index array formats (codes 0x8, 745 - 0xD, and 0xE). The index array format is an array of indicies of bits which would have been set if the 745 + 0xD, and 0xE). The index array format is an array of indices of bits which would have been set if the 746 746 output format was a bit array. 747 747 748 748 The return value of the CCB completion area contains the number of bits set in the output bit vector, ··· 1254 1254 submitted CCB, or may apply to a larger scope. The status should not be 1255 1255 interpreted as permanent, and the guest should attempt to submit CCBs in 1256 1256 the future which had previously been unable to be performed. The status 1257 - data provides additional information about scope of the retricted availability 1257 + data provides additional information about scope of the restricted availability 1258 1258 as follows: 1259 1259 Value Description 1260 1260 0 Processing for the exact CCB instance submitted was unavailable, ··· 1330 1330 of other CCBs ahead of the requested CCB, to provide a relative estimate of when the CCB may execute. 1331 1331 1332 1332 The dax return value is only valid when the state is ENQUEUED. The value returned is the DAX unit 1333 - instance indentifier for the DAX unit processing the queue where the requested CCB is located. The value 1333 + instance identifier for the DAX unit processing the queue where the requested CCB is located. The value 1334 1334 matches the value that would have been, or was, returned by ccb_submit using the queue info flag. 1335 1335 1336 1336 The queue return value is only valid when the state is ENQUEUED. The value returned is the DAX 1337 - queue instance indentifier for the DAX unit processing the queue where the requested CCB is located. The 1337 + queue instance identifier for the DAX unit processing the queue where the requested CCB is located. The 1338 1338 value matches the value that would have been, or was, returned by ccb_submit using the queue info flag. 1339 1339 1340 1340 36.3.2.1. Errors 1341 1341 1342 - EOK The request was proccessed and the CCB state is valid. 1342 + EOK The request was processed and the CCB state is valid. 1343 1343 EBADALIGN address is not on a 64-byte aligned. 1344 1344 ENORADDR The real address provided for address is not valid. 1345 1345 EINVAL The CCB completion area contents are not valid. 1346 - EWOULDBLOCK Internal resource contraints prevented the CCB state from being queried at this 1346 + EWOULDBLOCK Internal resource constraints prevented the CCB state from being queried at this 1347 1347 time. The guest should retry the request. 1348 1348 ENOACCESS The guest does not have permission to access the coprocessor virtual device 1349 1349 functionality. ··· 1401 1401 1402 1402 36.3.3.2. Errors 1403 1403 1404 - EOK The request was proccessed and the result is valid. 1404 + EOK The request was processed and the result is valid. 1405 1405 EBADALIGN address is not on a 64-byte aligned. 1406 1406 ENORADDR The real address provided for address is not valid. 1407 1407 EINVAL The CCB completion area contents are not valid. 1408 - EWOULDBLOCK Internal resource contraints prevented the CCB from being killed at this time. 1408 + EWOULDBLOCK Internal resource constraints prevented the CCB from being killed at this time. 1409 1409 The guest should retry the request. 1410 1410 ENOACCESS The guest does not have permission to access the coprocessor virtual device 1411 1411 functionality. ··· 1423 1423 1424 1424 36.3.4.1. Errors 1425 1425 1426 - EOK The request was proccessed and the number of enabled/disabled DAX units 1426 + EOK The request was processed and the number of enabled/disabled DAX units 1427 1427 are valid. 1428 1428 1429 1429
+47 -1
Documentation/sphinx-static/custom.css
··· 11 11 /* Tighten up the layout slightly */ 12 12 div.body { padding: 0 15px 0 10px; } 13 13 div.sphinxsidebarwrapper { padding: 1em 0.4em; } 14 - div.sphinxsidebar { font-size: inherit; } 14 + div.sphinxsidebar { font-size: inherit; 15 + max-height: 100%; 16 + overflow-y: auto; } 15 17 /* Tweak document margins and don't force width */ 16 18 div.document { 17 19 margin: 20px 10px 0 10px; ··· 29 27 dl.function dt { margin-left: 10em; text-indent: -10em; } 30 28 dt.sig-object { font-size: larger; } 31 29 div.kernelindent { margin-left: 2em; margin-right: 4em; } 30 + 31 + /* 32 + * Tweaks for our local TOC 33 + */ 34 + div.kerneltoc li.toctree-l1 { font-size: smaller; 35 + text-indent: -1em; 36 + margin-left: 1em; } 37 + div.kerneltoc li.current > a {font-weight: bold; } 38 + div.kerneltoc li.toctree-l2,li.toctree-l3 { font-size: small; 39 + text-indent: -1em; 40 + margin-left: 1em; 41 + list-style-type: none; 42 + } 43 + div.kerneltoc li.current ul { margin-left: 0; } 44 + div.kerneltoc { background-color: #eeeeee; } 45 + div.kerneltoc li.current ul { background-color: white; } 46 + 47 + /* 48 + * The CSS magic to toggle the contents on small screens. 49 + */ 50 + label.kernel-toc-title { display: none; } 51 + label.kernel-toc-title:after { 52 + content: "[Hide]"; 53 + } 54 + input[type=checkbox]:checked ~ label.kernel-toc-title:after { 55 + content: "[Show]"; 56 + } 57 + /* Hide the toggle on large screens */ 58 + input.kernel-toc-toggle { display: none; } 59 + 60 + /* 61 + * Show and implement the toggle on small screens. 62 + * The 875px width seems to be wired into alabaster. 63 + */ 64 + @media screen and (max-width: 875px) { 65 + label.kernel-toc-title { display: inline; 66 + font-weight: bold; 67 + font-size: larger; } 68 + input[type=checkbox]:checked ~ div.kerneltoc { 69 + display: none; 70 + } 71 + h3.kernel-toc-contents { display: inline; } 72 + div.kerneltoc a { color: black; } 73 + }
+16
Documentation/sphinx/templates/kernel-toc.html
··· 1 + <!-- SPDX-License-Identifier: GPL-2.0 --> 2 + {# Create a local TOC the kernel way #} 3 + <p> 4 + <h3 class="kernel-toc-contents">Contents</h3> 5 + <input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked> 6 + <label class="kernel-toc-title" for="kernel-toc-toggle"></label> 7 + 8 + <div class="kerneltoc" id="kerneltoc"> 9 + {{ toctree(maxdepth=3) }} 10 + </div> 11 + {# hacky script to try to position the left column #} 12 + <script type="text/javascript"> <!-- 13 + var sbar = document.getElementsByClassName("sphinxsidebar")[0]; 14 + let currents = document.getElementsByClassName("current") 15 + sbar.scrollTop = currents[currents.length - 1].offsetTop; 16 + --> </script>
+2 -2
Documentation/trace/events-msr.rst
··· 8 8 9 9 Available trace points: 10 10 11 - /sys/kernel/debug/tracing/events/msr/ 11 + /sys/kernel/tracing/events/msr/ 12 12 13 13 Trace MSR reads: 14 14 ··· 34 34 35 35 The trace data can be post processed with the postprocess/decode_msr.py script:: 36 36 37 - cat /sys/kernel/debug/tracing/trace | decode_msr.py /usr/src/linux/include/asm/msr-index.h 37 + cat /sys/kernel/tracing/trace | decode_msr.py /usr/src/linux/include/asm/msr-index.h 38 38 39 39 to add symbolic MSR names. 40 40
+3 -3
Documentation/trace/events-nmi.rst
··· 4 4 5 5 These events normally show up here: 6 6 7 - /sys/kernel/debug/tracing/events/nmi 7 + /sys/kernel/tracing/events/nmi 8 8 9 9 10 10 nmi_handler ··· 31 31 Note that the kernel's output is in milliseconds, but the input 32 32 to the filter is in nanoseconds! You can filter on 'delta_ns':: 33 33 34 - cd /sys/kernel/debug/tracing/events/nmi/nmi_handler 34 + cd /sys/kernel/tracing/events/nmi/nmi_handler 35 35 echo 'handler==0xffffffff81625600 && delta_ns>1000000' > filter 36 36 echo 1 > enable 37 37 38 38 Your output would then look like:: 39 39 40 - $ cat /sys/kernel/debug/tracing/trace_pipe 40 + $ cat /sys/kernel/tracing/trace_pipe 41 41 <idle>-0 [000] d.h3 505.397558: nmi_handler: perf_event_nmi_handler() delta_ns: 3236765 handled: 1 42 42 <idle>-0 [000] d.h3 505.805893: nmi_handler: perf_event_nmi_handler() delta_ns: 3174234 handled: 1 43 43 <idle>-0 [000] d.h3 506.158206: nmi_handler: perf_event_nmi_handler() delta_ns: 3084642 handled: 1
+39 -39
Documentation/trace/events.rst
··· 24 24 --------------------------------- 25 25 26 26 The events which are available for tracing can be found in the file 27 - /sys/kernel/debug/tracing/available_events. 27 + /sys/kernel/tracing/available_events. 28 28 29 29 To enable a particular event, such as 'sched_wakeup', simply echo it 30 - to /sys/kernel/debug/tracing/set_event. For example:: 30 + to /sys/kernel/tracing/set_event. For example:: 31 31 32 - # echo sched_wakeup >> /sys/kernel/debug/tracing/set_event 32 + # echo sched_wakeup >> /sys/kernel/tracing/set_event 33 33 34 34 .. Note:: '>>' is necessary, otherwise it will firstly disable all the events. 35 35 36 36 To disable an event, echo the event name to the set_event file prefixed 37 37 with an exclamation point:: 38 38 39 - # echo '!sched_wakeup' >> /sys/kernel/debug/tracing/set_event 39 + # echo '!sched_wakeup' >> /sys/kernel/tracing/set_event 40 40 41 41 To disable all events, echo an empty line to the set_event file:: 42 42 43 - # echo > /sys/kernel/debug/tracing/set_event 43 + # echo > /sys/kernel/tracing/set_event 44 44 45 45 To enable all events, echo ``*:*`` or ``*:`` to the set_event file:: 46 46 47 - # echo *:* > /sys/kernel/debug/tracing/set_event 47 + # echo *:* > /sys/kernel/tracing/set_event 48 48 49 49 The events are organized into subsystems, such as ext4, irq, sched, 50 50 etc., and a full event name looks like this: <subsystem>:<event>. The ··· 53 53 ``<subsystem>:*``; for example, to enable all irq events, you can use the 54 54 command:: 55 55 56 - # echo 'irq:*' > /sys/kernel/debug/tracing/set_event 56 + # echo 'irq:*' > /sys/kernel/tracing/set_event 57 57 58 58 2.2 Via the 'enable' toggle 59 59 --------------------------- 60 60 61 - The events available are also listed in /sys/kernel/debug/tracing/events/ hierarchy 61 + The events available are also listed in /sys/kernel/tracing/events/ hierarchy 62 62 of directories. 63 63 64 64 To enable event 'sched_wakeup':: 65 65 66 - # echo 1 > /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable 66 + # echo 1 > /sys/kernel/tracing/events/sched/sched_wakeup/enable 67 67 68 68 To disable it:: 69 69 70 - # echo 0 > /sys/kernel/debug/tracing/events/sched/sched_wakeup/enable 70 + # echo 0 > /sys/kernel/tracing/events/sched/sched_wakeup/enable 71 71 72 72 To enable all events in sched subsystem:: 73 73 74 - # echo 1 > /sys/kernel/debug/tracing/events/sched/enable 74 + # echo 1 > /sys/kernel/tracing/events/sched/enable 75 75 76 76 To enable all events:: 77 77 78 - # echo 1 > /sys/kernel/debug/tracing/events/enable 78 + # echo 1 > /sys/kernel/tracing/events/enable 79 79 80 80 When reading one of these enable files, there are four results: 81 81 ··· 126 126 For example, here's the information displayed for the 'sched_wakeup' 127 127 event:: 128 128 129 - # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/format 129 + # cat /sys/kernel/tracing/events/sched/sched_wakeup/format 130 130 131 131 name: sched_wakeup 132 132 ID: 60 ··· 215 215 216 216 For example:: 217 217 218 - # cd /sys/kernel/debug/tracing/events/sched/sched_wakeup 218 + # cd /sys/kernel/tracing/events/sched/sched_wakeup 219 219 # echo "common_preempt_count > 4" > filter 220 220 221 221 A slightly more involved example:: 222 222 223 - # cd /sys/kernel/debug/tracing/events/signal/signal_generate 223 + # cd /sys/kernel/tracing/events/signal/signal_generate 224 224 # echo "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > filter 225 225 226 226 If there is an error in the expression, you'll get an 'Invalid 227 227 argument' error when setting it, and the erroneous string along with 228 228 an error message can be seen by looking at the filter e.g.:: 229 229 230 - # cd /sys/kernel/debug/tracing/events/signal/signal_generate 230 + # cd /sys/kernel/tracing/events/signal/signal_generate 231 231 # echo "((sig >= 10 && sig < 15) || dsig == 17) && comm != bash" > filter 232 232 -bash: echo: write error: Invalid argument 233 233 # cat filter ··· 258 258 To clear the filters for all events in a subsystem, write a '0' to the 259 259 subsystem's filter file. 260 260 261 - 5.3 Subsystem filters 261 + 5.4 Subsystem filters 262 262 --------------------- 263 263 264 264 For convenience, filters for every event in a subsystem can be set or ··· 277 277 278 278 Clear the filters on all events in the sched subsystem:: 279 279 280 - # cd /sys/kernel/debug/tracing/events/sched 280 + # cd /sys/kernel/tracing/events/sched 281 281 # echo 0 > filter 282 282 # cat sched_switch/filter 283 283 none ··· 287 287 Set a filter using only common fields for all events in the sched 288 288 subsystem (all events end up with the same filter):: 289 289 290 - # cd /sys/kernel/debug/tracing/events/sched 290 + # cd /sys/kernel/tracing/events/sched 291 291 # echo common_pid == 0 > filter 292 292 # cat sched_switch/filter 293 293 common_pid == 0 ··· 298 298 sched subsystem (all events but those that have a prev_pid field retain 299 299 their old filters):: 300 300 301 - # cd /sys/kernel/debug/tracing/events/sched 301 + # cd /sys/kernel/tracing/events/sched 302 302 # echo prev_pid == 0 > filter 303 303 # cat sched_switch/filter 304 304 prev_pid == 0 305 305 # cat sched_wakeup/filter 306 306 common_pid == 0 307 307 308 - 5.4 PID filtering 308 + 5.5 PID filtering 309 309 ----------------- 310 310 311 311 The set_event_pid file in the same directory as the top events directory ··· 313 313 PID listed in the set_event_pid file. 314 314 :: 315 315 316 - # cd /sys/kernel/debug/tracing 316 + # cd /sys/kernel/tracing 317 317 # echo $$ > set_event_pid 318 318 # echo 1 > events/enable 319 319 ··· 409 409 specifies that this enablement happens only once:: 410 410 411 411 # echo 'enable_event:kmem:kmalloc:1' > \ 412 - /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger 412 + /sys/kernel/tracing/events/syscalls/sys_enter_read/trigger 413 413 414 414 The following trigger causes kmalloc events to stop being traced 415 415 when a read system call exits. This disablement happens on every 416 416 read system call exit:: 417 417 418 418 # echo 'disable_event:kmem:kmalloc' > \ 419 - /sys/kernel/debug/tracing/events/syscalls/sys_exit_read/trigger 419 + /sys/kernel/tracing/events/syscalls/sys_exit_read/trigger 420 420 421 421 The format is:: 422 422 ··· 426 426 To remove the above commands:: 427 427 428 428 # echo '!enable_event:kmem:kmalloc:1' > \ 429 - /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger 429 + /sys/kernel/tracing/events/syscalls/sys_enter_read/trigger 430 430 431 431 # echo '!disable_event:kmem:kmalloc' > \ 432 - /sys/kernel/debug/tracing/events/syscalls/sys_exit_read/trigger 432 + /sys/kernel/tracing/events/syscalls/sys_exit_read/trigger 433 433 434 434 Note that there can be any number of enable/disable_event triggers 435 435 per triggering event, but there can only be one trigger per ··· 448 448 kmalloc tracepoint is hit:: 449 449 450 450 # echo 'stacktrace' > \ 451 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 451 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 452 452 453 453 The following trigger dumps a stacktrace the first 5 times a kmalloc 454 454 request happens with a size >= 64K:: 455 455 456 456 # echo 'stacktrace:5 if bytes_req >= 65536' > \ 457 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 457 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 458 458 459 459 The format is:: 460 460 ··· 463 463 To remove the above commands:: 464 464 465 465 # echo '!stacktrace' > \ 466 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 466 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 467 467 468 468 # echo '!stacktrace:5 if bytes_req >= 65536' > \ 469 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 469 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 470 470 471 471 The latter can also be removed more simply by the following (without 472 472 the filter):: 473 473 474 474 # echo '!stacktrace:5' > \ 475 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 475 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 476 476 477 477 Note that there can be only one stacktrace trigger per triggering 478 478 event. ··· 488 488 capture those events when the trigger event occurred:: 489 489 490 490 # echo 'snapshot if nr_rq > 1' > \ 491 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 491 + /sys/kernel/tracing/events/block/block_unplug/trigger 492 492 493 493 To only snapshot once:: 494 494 495 495 # echo 'snapshot:1 if nr_rq > 1' > \ 496 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 496 + /sys/kernel/tracing/events/block/block_unplug/trigger 497 497 498 498 To remove the above commands:: 499 499 500 500 # echo '!snapshot if nr_rq > 1' > \ 501 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 501 + /sys/kernel/tracing/events/block/block_unplug/trigger 502 502 503 503 # echo '!snapshot:1 if nr_rq > 1' > \ 504 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 504 + /sys/kernel/tracing/events/block/block_unplug/trigger 505 505 506 506 Note that there can be only one snapshot trigger per triggering 507 507 event. ··· 519 519 trigger event:: 520 520 521 521 # echo 'traceoff:1 if nr_rq > 1' > \ 522 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 522 + /sys/kernel/tracing/events/block/block_unplug/trigger 523 523 524 524 To always disable tracing when nr_rq > 1:: 525 525 526 526 # echo 'traceoff if nr_rq > 1' > \ 527 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 527 + /sys/kernel/tracing/events/block/block_unplug/trigger 528 528 529 529 To remove the above commands:: 530 530 531 531 # echo '!traceoff:1 if nr_rq > 1' > \ 532 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 532 + /sys/kernel/tracing/events/block/block_unplug/trigger 533 533 534 534 # echo '!traceoff if nr_rq > 1' > \ 535 - /sys/kernel/debug/tracing/events/block/block_unplug/trigger 535 + /sys/kernel/tracing/events/block/block_unplug/trigger 536 536 537 537 Note that there can be only one traceon or traceoff trigger per 538 538 triggering event.
+3 -3
Documentation/trace/ftrace.rst
··· 830 830 The extended error information and usage takes the form shown in 831 831 this example:: 832 832 833 - # echo xxx > /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger 833 + # echo xxx > /sys/kernel/tracing/events/sched/sched_wakeup/trigger 834 834 echo: write error: Invalid argument 835 835 836 - # cat /sys/kernel/debug/tracing/error_log 836 + # cat /sys/kernel/tracing/error_log 837 837 [ 5348.887237] location: error: Couldn't yyy: zzz 838 838 Command: xxx 839 839 ^ ··· 843 843 844 844 To clear the error log, echo the empty string into it:: 845 845 846 - # echo > /sys/kernel/debug/tracing/error_log 846 + # echo > /sys/kernel/tracing/error_log 847 847 848 848 Examples of using the tracer 849 849 ----------------------------
+6 -6
Documentation/trace/histogram-design.rst
··· 14 14 Note: All the ftrace histogram command examples assume the working 15 15 directory is the ftrace /tracing directory. For example:: 16 16 17 - # cd /sys/kernel/debug/tracing 17 + # cd /sys/kernel/tracing 18 18 19 19 Also, the histogram output displayed for those commands will be 20 20 generally be truncated - only enough to make the point is displayed. ··· 905 905 906 906 # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: \ 907 907 onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid)' >> 908 - /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 908 + /sys/kernel/tracing/events/sched/sched_switch/trigger 909 909 910 910 The diagram for the sched_switch event is similar to previous examples 911 911 but shows the additional field_vars[] array for hist_data and shows ··· 1112 1112 wakeup_latency trace event. The next_pid and next_comm event fields 1113 1113 are automatically converted into field variables for this purpose:: 1114 1114 1115 - # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid,next_comm)' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 1115 + # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid,next_comm)' >> /sys/kernel/tracing/events/sched/sched_switch/trigger 1116 1116 1117 1117 The sched_waking hist_debug output shows the same data as in the 1118 1118 previous test example:: ··· 1305 1305 1306 1306 The commands below can be used to clean things up for the next test:: 1307 1307 1308 - # echo '!hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid,next_comm)' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 1308 + # echo '!hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,next_pid,next_comm)' >> /sys/kernel/tracing/events/sched/sched_switch/trigger 1309 1309 1310 1310 # echo '!hist:keys=pid:ts0=common_timestamp.usecs' >> events/sched/sched_waking/trigger 1311 1311 ··· 1363 1363 1364 1364 # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: \ 1365 1365 onmax($wakeup_lat).save(next_comm,prev_pid,prev_prio,prev_comm)' >> 1366 - /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 1366 + /sys/kernel/tracing/events/sched/sched_switch/trigger 1367 1367 1368 1368 or:: 1369 1369 1370 1370 # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: \ 1371 1371 onmax($wakeup_lat).snapshot()' >> 1372 - /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 1372 + /sys/kernel/tracing/events/sched/sched_switch/trigger 1373 1373 1374 1374 save() action field variable test 1375 1375 ---------------------------------
+95 -95
Documentation/trace/histogram.rst
··· 102 102 trigger, read its current contents, and then turn it off:: 103 103 104 104 # echo 'hist:keys=skbaddr.hex:vals=len' > \ 105 - /sys/kernel/debug/tracing/events/net/netif_rx/trigger 105 + /sys/kernel/tracing/events/net/netif_rx/trigger 106 106 107 - # cat /sys/kernel/debug/tracing/events/net/netif_rx/hist 107 + # cat /sys/kernel/tracing/events/net/netif_rx/hist 108 108 109 109 # echo '!hist:keys=skbaddr.hex:vals=len' > \ 110 - /sys/kernel/debug/tracing/events/net/netif_rx/trigger 110 + /sys/kernel/tracing/events/net/netif_rx/trigger 111 111 112 112 The trigger file itself can be read to show the details of the 113 113 currently attached hist trigger. This information is also displayed ··· 169 169 aggregation on and off when conditions of interest are hit:: 170 170 171 171 # echo 'hist:keys=skbaddr.hex:vals=len:pause' > \ 172 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 172 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 173 173 174 174 # echo 'enable_hist:net:netif_receive_skb if filename==/usr/bin/wget' > \ 175 - /sys/kernel/debug/tracing/events/sched/sched_process_exec/trigger 175 + /sys/kernel/tracing/events/sched/sched_process_exec/trigger 176 176 177 177 # echo 'disable_hist:net:netif_receive_skb if comm==wget' > \ 178 - /sys/kernel/debug/tracing/events/sched/sched_process_exit/trigger 178 + /sys/kernel/tracing/events/sched/sched_process_exit/trigger 179 179 180 180 The above sets up an initially paused hist trigger which is unpaused 181 181 and starts aggregating events when a given program is executed, and ··· 218 218 event. The fields that can be used for the hist trigger are listed 219 219 in the kmalloc event's format file:: 220 220 221 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/format 221 + # cat /sys/kernel/tracing/events/kmem/kmalloc/format 222 222 name: kmalloc 223 223 ID: 374 224 224 format: ··· 238 238 the kernel that made one or more calls to kmalloc:: 239 239 240 240 # echo 'hist:key=call_site:val=bytes_req.buckets=32' > \ 241 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 241 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 242 242 243 243 This tells the tracing system to create a 'hist' trigger using the 244 244 call_site field of the kmalloc event as the key for the table, which ··· 252 252 file in the kmalloc event's subdirectory (for readability, a number 253 253 of entries have been omitted):: 254 254 255 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/hist 255 + # cat /sys/kernel/tracing/events/kmem/kmalloc/hist 256 256 # trigger info: hist:keys=call_site:vals=bytes_req:sort=hitcount:size=2048 [active] 257 257 258 258 { call_site: 18446744072106379007 } hitcount: 1 bytes_req: 176 ··· 292 292 the trigger info, which can also be displayed by reading the 293 293 'trigger' file:: 294 294 295 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 295 + # cat /sys/kernel/tracing/events/kmem/kmalloc/trigger 296 296 hist:keys=call_site:vals=bytes_req:sort=hitcount:size=2048 [active] 297 297 298 298 At the end of the output are a few lines that display the overall ··· 323 323 command history and re-execute it with a '!' prepended:: 324 324 325 325 # echo '!hist:key=call_site:val=bytes_req' > \ 326 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 326 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 327 327 328 328 Finally, notice that the call_site as displayed in the output above 329 329 isn't really very useful. It's an address, but normally addresses ··· 331 331 value, simply append '.hex' to the field name in the trigger:: 332 332 333 333 # echo 'hist:key=call_site.hex:val=bytes_req' > \ 334 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 334 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 335 335 336 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/hist 336 + # cat /sys/kernel/tracing/events/kmem/kmalloc/hist 337 337 # trigger info: hist:keys=call_site.hex:vals=bytes_req:sort=hitcount:size=2048 [active] 338 338 339 339 { call_site: ffffffffa026b291 } hitcount: 1 bytes_req: 433 ··· 376 376 trigger:: 377 377 378 378 # echo 'hist:key=call_site.sym:val=bytes_req' > \ 379 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 379 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 380 380 381 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/hist 381 + # cat /sys/kernel/tracing/events/kmem/kmalloc/hist 382 382 # trigger info: hist:keys=call_site.sym:vals=bytes_req:sort=hitcount:size=2048 [active] 383 383 384 384 { call_site: [ffffffff810adcb9] syslog_print_all } hitcount: 1 bytes_req: 1024 ··· 426 426 the 'sort' parameter, along with the 'descending' modifier:: 427 427 428 428 # echo 'hist:key=call_site.sym:val=bytes_req:sort=bytes_req.descending' > \ 429 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 429 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 430 430 431 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/hist 431 + # cat /sys/kernel/tracing/events/kmem/kmalloc/hist 432 432 # trigger info: hist:keys=call_site.sym:vals=bytes_req:sort=bytes_req.descending:size=2048 [active] 433 433 434 434 { call_site: [ffffffffa046041c] i915_gem_execbuffer2 [i915] } hitcount: 2186 bytes_req: 3397464 ··· 467 467 name, just use 'sym-offset' instead:: 468 468 469 469 # echo 'hist:key=call_site.sym-offset:val=bytes_req:sort=bytes_req.descending' > \ 470 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 470 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 471 471 472 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/hist 472 + # cat /sys/kernel/tracing/events/kmem/kmalloc/hist 473 473 # trigger info: hist:keys=call_site.sym-offset:vals=bytes_req:sort=bytes_req.descending:size=2048 [active] 474 474 475 475 { call_site: [ffffffffa046041c] i915_gem_execbuffer2+0x6c/0x2c0 [i915] } hitcount: 4569 bytes_req: 3163720 ··· 506 506 allocated in a descending order:: 507 507 508 508 # echo 'hist:keys=call_site.sym:values=bytes_req,bytes_alloc:sort=bytes_alloc.descending' > \ 509 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 509 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 510 510 511 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/hist 511 + # cat /sys/kernel/tracing/events/kmem/kmalloc/hist 512 512 # trigger info: hist:keys=call_site.sym:vals=bytes_req,bytes_alloc:sort=bytes_alloc.descending:size=2048 [active] 513 513 514 514 { call_site: [ffffffffa046041c] i915_gem_execbuffer2 [i915] } hitcount: 7403 bytes_req: 4084360 bytes_alloc: 5958016 ··· 549 549 value 'stacktrace' for the key parameter:: 550 550 551 551 # echo 'hist:keys=stacktrace:values=bytes_req,bytes_alloc:sort=bytes_alloc' > \ 552 - /sys/kernel/debug/tracing/events/kmem/kmalloc/trigger 552 + /sys/kernel/tracing/events/kmem/kmalloc/trigger 553 553 554 554 The above trigger will use the kernel stack trace in effect when an 555 555 event is triggered as the key for the hash table. This allows the ··· 559 559 every callpath in the system that led up to a kmalloc (in this case 560 560 every callpath to a kmalloc for a kernel compile):: 561 561 562 - # cat /sys/kernel/debug/tracing/events/kmem/kmalloc/hist 562 + # cat /sys/kernel/tracing/events/kmem/kmalloc/hist 563 563 # trigger info: hist:keys=stacktrace:vals=bytes_req,bytes_alloc:sort=bytes_alloc:size=2048 [active] 564 564 565 565 { stacktrace: ··· 658 658 keeps a per-process sum of total bytes read:: 659 659 660 660 # echo 'hist:key=common_pid.execname:val=count:sort=count.descending' > \ 661 - /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger 661 + /sys/kernel/tracing/events/syscalls/sys_enter_read/trigger 662 662 663 - # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/hist 663 + # cat /sys/kernel/tracing/events/syscalls/sys_enter_read/hist 664 664 # trigger info: hist:keys=common_pid.execname:vals=count:sort=count.descending:size=2048 [active] 665 665 666 666 { common_pid: gnome-terminal [ 3196] } hitcount: 280 count: 1093512 ··· 699 699 counts for the system during the run:: 700 700 701 701 # echo 'hist:key=id.syscall:val=hitcount' > \ 702 - /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger 702 + /sys/kernel/tracing/events/raw_syscalls/sys_enter/trigger 703 703 704 - # cat /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/hist 704 + # cat /sys/kernel/tracing/events/raw_syscalls/sys_enter/hist 705 705 # trigger info: hist:keys=id.syscall:vals=hitcount:sort=hitcount:size=2048 [active] 706 706 707 707 { id: sys_fsync [ 74] } hitcount: 1 ··· 753 753 hitcount sum as the secondary key:: 754 754 755 755 # echo 'hist:key=id.syscall,common_pid.execname:val=hitcount:sort=id,hitcount' > \ 756 - /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger 756 + /sys/kernel/tracing/events/raw_syscalls/sys_enter/trigger 757 757 758 - # cat /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/hist 758 + # cat /sys/kernel/tracing/events/raw_syscalls/sys_enter/hist 759 759 # trigger info: hist:keys=id.syscall,common_pid.execname:vals=hitcount:sort=id.syscall,hitcount:size=2048 [active] 760 760 761 761 { id: sys_read [ 0], common_pid: rtkit-daemon [ 1877] } hitcount: 1 ··· 803 803 can use that to filter out all the other syscalls:: 804 804 805 805 # echo 'hist:key=id.syscall,common_pid.execname:val=hitcount:sort=id,hitcount if id == 16' > \ 806 - /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger 806 + /sys/kernel/tracing/events/raw_syscalls/sys_enter/trigger 807 807 808 - # cat /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/hist 808 + # cat /sys/kernel/tracing/events/raw_syscalls/sys_enter/hist 809 809 # trigger info: hist:keys=id.syscall,common_pid.execname:vals=hitcount:sort=id.syscall,hitcount:size=2048 if id == 16 [active] 810 810 811 811 { id: sys_ioctl [ 16], common_pid: gmain [ 2769] } hitcount: 1 ··· 846 846 each process:: 847 847 848 848 # echo 'hist:key=common_pid.execname,size:val=hitcount:sort=common_pid,size' > \ 849 - /sys/kernel/debug/tracing/events/syscalls/sys_enter_recvfrom/trigger 849 + /sys/kernel/tracing/events/syscalls/sys_enter_recvfrom/trigger 850 850 851 - # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_recvfrom/hist 851 + # cat /sys/kernel/tracing/events/syscalls/sys_enter_recvfrom/hist 852 852 # trigger info: hist:keys=common_pid.execname,size:vals=hitcount:sort=common_pid.execname,size:size=2048 [active] 853 853 854 854 { common_pid: smbd [ 784], size: 4 } hitcount: 1 ··· 899 899 much smaller number, say 256:: 900 900 901 901 # echo 'hist:key=child_comm:val=hitcount:size=256' > \ 902 - /sys/kernel/debug/tracing/events/sched/sched_process_fork/trigger 902 + /sys/kernel/tracing/events/sched/sched_process_fork/trigger 903 903 904 - # cat /sys/kernel/debug/tracing/events/sched/sched_process_fork/hist 904 + # cat /sys/kernel/tracing/events/sched/sched_process_fork/hist 905 905 # trigger info: hist:keys=child_comm:vals=hitcount:sort=hitcount:size=256 [active] 906 906 907 907 { child_comm: dconf worker } hitcount: 1 ··· 935 935 displays as [paused]:: 936 936 937 937 # echo 'hist:key=child_comm:val=hitcount:size=256:pause' >> \ 938 - /sys/kernel/debug/tracing/events/sched/sched_process_fork/trigger 938 + /sys/kernel/tracing/events/sched/sched_process_fork/trigger 939 939 940 - # cat /sys/kernel/debug/tracing/events/sched/sched_process_fork/hist 940 + # cat /sys/kernel/tracing/events/sched/sched_process_fork/hist 941 941 # trigger info: hist:keys=child_comm:vals=hitcount:sort=hitcount:size=256 [paused] 942 942 943 943 { child_comm: dconf worker } hitcount: 1 ··· 972 972 again, and the data has changed:: 973 973 974 974 # echo 'hist:key=child_comm:val=hitcount:size=256:cont' >> \ 975 - /sys/kernel/debug/tracing/events/sched/sched_process_fork/trigger 975 + /sys/kernel/tracing/events/sched/sched_process_fork/trigger 976 976 977 - # cat /sys/kernel/debug/tracing/events/sched/sched_process_fork/hist 977 + # cat /sys/kernel/tracing/events/sched/sched_process_fork/hist 978 978 # trigger info: hist:keys=child_comm:vals=hitcount:sort=hitcount:size=256 [active] 979 979 980 980 { child_comm: dconf worker } hitcount: 1 ··· 1026 1026 netif_receive_skb event:: 1027 1027 1028 1028 # echo 'hist:key=stacktrace:vals=len:pause' > \ 1029 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1029 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1030 1030 1031 1031 Next, we set up an 'enable_hist' trigger on the sched_process_exec 1032 1032 event, with an 'if filename==/usr/bin/wget' filter. The effect of ··· 1037 1037 hash table keyed on stacktrace:: 1038 1038 1039 1039 # echo 'enable_hist:net:netif_receive_skb if filename==/usr/bin/wget' > \ 1040 - /sys/kernel/debug/tracing/events/sched/sched_process_exec/trigger 1040 + /sys/kernel/tracing/events/sched/sched_process_exec/trigger 1041 1041 1042 1042 The aggregation continues until the netif_receive_skb is paused 1043 1043 again, which is what the following disable_hist event does by ··· 1045 1045 filter 'comm==wget':: 1046 1046 1047 1047 # echo 'disable_hist:net:netif_receive_skb if comm==wget' > \ 1048 - /sys/kernel/debug/tracing/events/sched/sched_process_exit/trigger 1048 + /sys/kernel/tracing/events/sched/sched_process_exit/trigger 1049 1049 1050 1050 Whenever a process exits and the comm field of the disable_hist 1051 1051 trigger filter matches 'comm==wget', the netif_receive_skb hist ··· 1058 1058 1059 1059 $ wget https://www.kernel.org/pub/linux/kernel/v3.x/patch-3.19.xz 1060 1060 1061 - # cat /sys/kernel/debug/tracing/events/net/netif_receive_skb/hist 1061 + # cat /sys/kernel/tracing/events/net/netif_receive_skb/hist 1062 1062 # trigger info: hist:keys=stacktrace:vals=len:sort=hitcount:size=2048 [paused] 1063 1063 1064 1064 { stacktrace: ··· 1142 1142 again, we can just clear the histogram first:: 1143 1143 1144 1144 # echo 'hist:key=stacktrace:vals=len:clear' >> \ 1145 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1145 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1146 1146 1147 1147 Just to verify that it is in fact cleared, here's what we now see in 1148 1148 the hist file:: 1149 1149 1150 - # cat /sys/kernel/debug/tracing/events/net/netif_receive_skb/hist 1150 + # cat /sys/kernel/tracing/events/net/netif_receive_skb/hist 1151 1151 # trigger info: hist:keys=stacktrace:vals=len:sort=hitcount:size=2048 [paused] 1152 1152 1153 1153 Totals: ··· 1162 1162 sched_process_exit events as such:: 1163 1163 1164 1164 # echo 'enable_event:net:netif_receive_skb if filename==/usr/bin/wget' > \ 1165 - /sys/kernel/debug/tracing/events/sched/sched_process_exec/trigger 1165 + /sys/kernel/tracing/events/sched/sched_process_exec/trigger 1166 1166 1167 1167 # echo 'disable_event:net:netif_receive_skb if comm==wget' > \ 1168 - /sys/kernel/debug/tracing/events/sched/sched_process_exit/trigger 1168 + /sys/kernel/tracing/events/sched/sched_process_exit/trigger 1169 1169 1170 1170 If you read the trigger files for the sched_process_exec and 1171 1171 sched_process_exit triggers, you should see two triggers for each: 1172 1172 one enabling/disabling the hist aggregation and the other 1173 1173 enabling/disabling the logging of events:: 1174 1174 1175 - # cat /sys/kernel/debug/tracing/events/sched/sched_process_exec/trigger 1175 + # cat /sys/kernel/tracing/events/sched/sched_process_exec/trigger 1176 1176 enable_event:net:netif_receive_skb:unlimited if filename==/usr/bin/wget 1177 1177 enable_hist:net:netif_receive_skb:unlimited if filename==/usr/bin/wget 1178 1178 1179 - # cat /sys/kernel/debug/tracing/events/sched/sched_process_exit/trigger 1179 + # cat /sys/kernel/tracing/events/sched/sched_process_exit/trigger 1180 1180 enable_event:net:netif_receive_skb:unlimited if comm==wget 1181 1181 disable_hist:net:netif_receive_skb:unlimited if comm==wget 1182 1182 ··· 1192 1192 saw in the last run, but this time you should also see the 1193 1193 individual events in the trace file:: 1194 1194 1195 - # cat /sys/kernel/debug/tracing/trace 1195 + # cat /sys/kernel/tracing/trace 1196 1196 1197 1197 # tracer: nop 1198 1198 # ··· 1226 1226 other things:: 1227 1227 1228 1228 # echo 'hist:keys=skbaddr.hex:vals=len if len < 0' >> \ 1229 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1229 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1230 1230 # echo 'hist:keys=skbaddr.hex:vals=len if len > 4096' >> \ 1231 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1231 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1232 1232 # echo 'hist:keys=skbaddr.hex:vals=len if len == 256' >> \ 1233 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1233 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1234 1234 # echo 'hist:keys=skbaddr.hex:vals=len' >> \ 1235 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1235 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1236 1236 # echo 'hist:keys=len:vals=common_preempt_count' >> \ 1237 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1237 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1238 1238 1239 1239 The above set of commands create four triggers differing only in 1240 1240 their filters, along with a completely different though fairly ··· 1246 1246 Displaying the contents of the 'hist' file for the event shows the 1247 1247 contents of all five histograms:: 1248 1248 1249 - # cat /sys/kernel/debug/tracing/events/net/netif_receive_skb/hist 1249 + # cat /sys/kernel/tracing/events/net/netif_receive_skb/hist 1250 1250 1251 1251 # event histogram 1252 1252 # ··· 1367 1367 field in the shared 'foo' histogram data:: 1368 1368 1369 1369 # echo 'hist:name=foo:keys=skbaddr.hex:vals=len' > \ 1370 - /sys/kernel/debug/tracing/events/net/netif_receive_skb/trigger 1370 + /sys/kernel/tracing/events/net/netif_receive_skb/trigger 1371 1371 # echo 'hist:name=foo:keys=skbaddr.hex:vals=len' > \ 1372 - /sys/kernel/debug/tracing/events/net/netif_rx/trigger 1372 + /sys/kernel/tracing/events/net/netif_rx/trigger 1373 1373 1374 1374 You can see that they're updating common histogram data by reading 1375 1375 each event's hist files at the same time:: 1376 1376 1377 - # cat /sys/kernel/debug/tracing/events/net/netif_receive_skb/hist; 1378 - cat /sys/kernel/debug/tracing/events/net/netif_rx/hist 1377 + # cat /sys/kernel/tracing/events/net/netif_receive_skb/hist; 1378 + cat /sys/kernel/tracing/events/net/netif_rx/hist 1379 1379 1380 1380 # event histogram 1381 1381 # ··· 1488 1488 couple of triggers named 'bar' using those fields:: 1489 1489 1490 1490 # echo 'hist:name=bar:key=stacktrace:val=hitcount' > \ 1491 - /sys/kernel/debug/tracing/events/sched/sched_process_fork/trigger 1491 + /sys/kernel/tracing/events/sched/sched_process_fork/trigger 1492 1492 # echo 'hist:name=bar:key=stacktrace:val=hitcount' > \ 1493 - /sys/kernel/debug/tracing/events/net/netif_rx/trigger 1493 + /sys/kernel/tracing/events/net/netif_rx/trigger 1494 1494 1495 1495 And displaying the output of either shows some interesting if 1496 1496 somewhat confusing output:: 1497 1497 1498 - # cat /sys/kernel/debug/tracing/events/sched/sched_process_fork/hist 1499 - # cat /sys/kernel/debug/tracing/events/net/netif_rx/hist 1498 + # cat /sys/kernel/tracing/events/sched/sched_process_fork/hist 1499 + # cat /sys/kernel/tracing/events/net/netif_rx/hist 1500 1500 1501 1501 # event histogram 1502 1502 # ··· 1826 1826 u64 lat; \ 1827 1827 pid_t pid; \ 1828 1828 int prio' >> \ 1829 - /sys/kernel/debug/tracing/synthetic_events 1829 + /sys/kernel/tracing/synthetic_events 1830 1830 1831 1831 Reading the tracing/synthetic_events file lists all the currently 1832 1832 defined synthetic events, in this case the event defined above:: 1833 1833 1834 - # cat /sys/kernel/debug/tracing/synthetic_events 1834 + # cat /sys/kernel/tracing/synthetic_events 1835 1835 wakeup_latency u64 lat; pid_t pid; int prio 1836 1836 1837 1837 An existing synthetic event definition can be removed by prepending 1838 1838 the command that defined it with a '!':: 1839 1839 1840 1840 # echo '!wakeup_latency u64 lat pid_t pid int prio' >> \ 1841 - /sys/kernel/debug/tracing/synthetic_events 1841 + /sys/kernel/tracing/synthetic_events 1842 1842 1843 1843 At this point, there isn't yet an actual 'wakeup_latency' event 1844 1844 instantiated in the event subsystem - for this to happen, a 'hist ··· 1850 1850 The new event is created under the tracing/events/synthetic/ directory 1851 1851 and looks and behaves just like any other event:: 1852 1852 1853 - # ls /sys/kernel/debug/tracing/events/synthetic/wakeup_latency 1853 + # ls /sys/kernel/tracing/events/synthetic/wakeup_latency 1854 1854 enable filter format hist id trigger 1855 1855 1856 1856 A histogram can now be defined for the new synthetic event:: 1857 1857 1858 1858 # echo 'hist:keys=pid,prio,lat.log2:sort=lat' >> \ 1859 - /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger 1859 + /sys/kernel/tracing/events/synthetic/wakeup_latency/trigger 1860 1860 1861 1861 The above shows the latency "lat" in a power of 2 grouping. 1862 1862 1863 1863 Like any other event, once a histogram is enabled for the event, the 1864 1864 output can be displayed by reading the event's 'hist' file. 1865 1865 1866 - # cat /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/hist 1866 + # cat /sys/kernel/tracing/events/synthetic/wakeup_latency/hist 1867 1867 1868 1868 # event histogram 1869 1869 # ··· 1911 1911 the ".buckets" modifier and specify a size (in this case groups of 10). 1912 1912 1913 1913 # echo 'hist:keys=pid,prio,lat.buckets=10:sort=lat' >> \ 1914 - /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger 1914 + /sys/kernel/tracing/events/synthetic/wakeup_latency/trigger 1915 1915 1916 1916 # event histogram 1917 1917 # ··· 2039 2039 event:: 2040 2040 2041 2041 # echo 'wakeup_new_test pid_t pid' >> \ 2042 - /sys/kernel/debug/tracing/synthetic_events 2042 + /sys/kernel/tracing/synthetic_events 2043 2043 2044 - # cat /sys/kernel/debug/tracing/synthetic_events 2044 + # cat /sys/kernel/tracing/synthetic_events 2045 2045 wakeup_new_test pid_t pid 2046 2046 2047 2047 The following hist trigger both defines the missing testpid ··· 2052 2052 2053 2053 # echo 'hist:keys=$testpid:testpid=pid:onmatch(sched.sched_wakeup_new).\ 2054 2054 wakeup_new_test($testpid) if comm=="cyclictest"' >> \ 2055 - /sys/kernel/debug/tracing/events/sched/sched_wakeup_new/trigger 2055 + /sys/kernel/tracing/events/sched/sched_wakeup_new/trigger 2056 2056 2057 2057 Or, equivalently, using the 'trace' keyword syntax: 2058 2058 2059 2059 # echo 'hist:keys=$testpid:testpid=pid:onmatch(sched.sched_wakeup_new).\ 2060 2060 trace(wakeup_new_test,$testpid) if comm=="cyclictest"' >> \ 2061 - /sys/kernel/debug/tracing/events/sched/sched_wakeup_new/trigger 2061 + /sys/kernel/tracing/events/sched/sched_wakeup_new/trigger 2062 2062 2063 2063 Creating and displaying a histogram based on those events is now 2064 2064 just a matter of using the fields and new synthetic event in the 2065 2065 tracing/events/synthetic directory, as usual:: 2066 2066 2067 2067 # echo 'hist:keys=pid:sort=pid' >> \ 2068 - /sys/kernel/debug/tracing/events/synthetic/wakeup_new_test/trigger 2068 + /sys/kernel/tracing/events/synthetic/wakeup_new_test/trigger 2069 2069 2070 2070 Running 'cyclictest' should cause wakeup_new events to generate 2071 2071 wakeup_new_test synthetic events which should result in histogram 2072 2072 output in the wakeup_new_test event's hist file:: 2073 2073 2074 - # cat /sys/kernel/debug/tracing/events/synthetic/wakeup_new_test/hist 2074 + # cat /sys/kernel/tracing/events/synthetic/wakeup_new_test/hist 2075 2075 2076 2076 A more typical usage would be to use two events to calculate a 2077 2077 latency. The following example uses a set of hist triggers to ··· 2080 2080 First, we define a 'wakeup_latency' synthetic event:: 2081 2081 2082 2082 # echo 'wakeup_latency u64 lat; pid_t pid; int prio' >> \ 2083 - /sys/kernel/debug/tracing/synthetic_events 2083 + /sys/kernel/tracing/synthetic_events 2084 2084 2085 2085 Next, we specify that whenever we see a sched_waking event for a 2086 2086 cyclictest thread, save the timestamp in a 'ts0' variable:: 2087 2087 2088 2088 # echo 'hist:keys=$saved_pid:saved_pid=pid:ts0=common_timestamp.usecs \ 2089 2089 if comm=="cyclictest"' >> \ 2090 - /sys/kernel/debug/tracing/events/sched/sched_waking/trigger 2090 + /sys/kernel/tracing/events/sched/sched_waking/trigger 2091 2091 2092 2092 Then, when the corresponding thread is actually scheduled onto the 2093 2093 CPU by a sched_switch event (saved_pid matches next_pid), calculate ··· 2097 2097 # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0:\ 2098 2098 onmatch(sched.sched_waking).wakeup_latency($wakeup_lat,\ 2099 2099 $saved_pid,next_prio) if next_comm=="cyclictest"' >> \ 2100 - /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 2100 + /sys/kernel/tracing/events/sched/sched_switch/trigger 2101 2101 2102 2102 We also need to create a histogram on the wakeup_latency synthetic 2103 2103 event in order to aggregate the generated synthetic event data:: 2104 2104 2105 2105 # echo 'hist:keys=pid,prio,lat:sort=pid,lat' >> \ 2106 - /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/trigger 2106 + /sys/kernel/tracing/events/synthetic/wakeup_latency/trigger 2107 2107 2108 2108 Finally, once we've run cyclictest to actually generate some 2109 2109 events, we can see the output by looking at the wakeup_latency 2110 2110 synthetic event's hist file:: 2111 2111 2112 - # cat /sys/kernel/debug/tracing/events/synthetic/wakeup_latency/hist 2112 + # cat /sys/kernel/tracing/events/synthetic/wakeup_latency/hist 2113 2113 2114 2114 - onmax(var).save(field,.. .) 2115 2115 ··· 2135 2135 2136 2136 # echo 'hist:keys=pid:ts0=common_timestamp.usecs \ 2137 2137 if comm=="cyclictest"' >> \ 2138 - /sys/kernel/debug/tracing/events/sched/sched_waking/trigger 2138 + /sys/kernel/tracing/events/sched/sched_waking/trigger 2139 2139 2140 2140 # echo 'hist:keys=next_pid:\ 2141 2141 wakeup_lat=common_timestamp.usecs-$ts0:\ 2142 2142 onmax($wakeup_lat).save(next_comm,prev_pid,prev_prio,prev_comm) \ 2143 2143 if next_comm=="cyclictest"' >> \ 2144 - /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 2144 + /sys/kernel/tracing/events/sched/sched_switch/trigger 2145 2145 2146 2146 When the histogram is displayed, the max value and the saved 2147 2147 values corresponding to the max are displayed following the rest 2148 2148 of the fields:: 2149 2149 2150 - # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist 2150 + # cat /sys/kernel/tracing/events/sched/sched_switch/hist 2151 2151 { next_pid: 2255 } hitcount: 239 2152 2152 common_timestamp-ts0: 0 2153 2153 max: 27 ··· 2193 2193 the scheduler events are also enabled, which are the events that 2194 2194 will show up in the snapshot when it is taken at some point: 2195 2195 2196 - # echo 1 > /sys/kernel/debug/tracing/events/sched/enable 2196 + # echo 1 > /sys/kernel/tracing/events/sched/enable 2197 2197 2198 2198 # echo 'hist:keys=pid:ts0=common_timestamp.usecs \ 2199 2199 if comm=="cyclictest"' >> \ 2200 - /sys/kernel/debug/tracing/events/sched/sched_waking/trigger 2200 + /sys/kernel/tracing/events/sched/sched_waking/trigger 2201 2201 2202 2202 # echo 'hist:keys=next_pid:wakeup_lat=common_timestamp.usecs-$ts0: \ 2203 2203 onmax($wakeup_lat).save(next_prio,next_comm,prev_pid,prev_prio, \ 2204 2204 prev_comm):onmax($wakeup_lat).snapshot() \ 2205 2205 if next_comm=="cyclictest"' >> \ 2206 - /sys/kernel/debug/tracing/events/sched/sched_switch/trigger 2206 + /sys/kernel/tracing/events/sched/sched_switch/trigger 2207 2207 2208 2208 When the histogram is displayed, for each bucket the max value 2209 2209 and the saved values corresponding to the max are displayed ··· 2212 2212 If a snapshot was taken, there is also a message indicating that, 2213 2213 along with the value and event that triggered the global maximum: 2214 2214 2215 - # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist 2215 + # cat /sys/kernel/tracing/events/sched/sched_switch/hist 2216 2216 { next_pid: 2101 } hitcount: 200 2217 2217 max: 52 next_prio: 120 next_comm: cyclictest \ 2218 2218 prev_pid: 0 prev_prio: 120 prev_comm: swapper/6 ··· 2247 2247 sched_switch events, which should match the time displayed in the 2248 2248 global maximum):: 2249 2249 2250 - # cat /sys/kernel/debug/tracing/snapshot 2250 + # cat /sys/kernel/tracing/snapshot 2251 2251 2252 2252 <...>-2103 [005] d..3 309.873125: sched_switch: prev_comm=cyclictest prev_pid=2103 prev_prio=19 prev_state=D ==> next_comm=swapper/5 next_pid=0 next_prio=120 2253 2253 <idle>-0 [005] d.h3 309.873611: sched_waking: comm=cyclictest pid=2102 prio=19 target_cpu=005 ··· 2312 2312 enabled, which are the events that will show up in the snapshot 2313 2313 when it is taken at some point: 2314 2314 2315 - # echo 1 > /sys/kernel/debug/tracing/events/sched/enable 2316 - # echo 1 > /sys/kernel/debug/tracing/events/tcp/enable 2315 + # echo 1 > /sys/kernel/tracing/events/sched/enable 2316 + # echo 1 > /sys/kernel/tracing/events/tcp/enable 2317 2317 2318 2318 # echo 'hist:keys=dport:cwnd=snd_cwnd: \ 2319 2319 onchange($cwnd).save(snd_wnd,srtt,rcv_wnd): \ 2320 2320 onchange($cwnd).snapshot()' >> \ 2321 - /sys/kernel/debug/tracing/events/tcp/tcp_probe/trigger 2321 + /sys/kernel/tracing/events/tcp/tcp_probe/trigger 2322 2322 2323 2323 When the histogram is displayed, for each bucket the tracked value 2324 2324 and the saved values corresponding to that value are displayed ··· 2327 2327 If a snapshot was taken, there is also a message indicating that, 2328 2328 along with the value and event that triggered the snapshot:: 2329 2329 2330 - # cat /sys/kernel/debug/tracing/events/tcp/tcp_probe/hist 2330 + # cat /sys/kernel/tracing/events/tcp/tcp_probe/hist 2331 2331 2332 2332 { dport: 1521 } hitcount: 8 2333 2333 changed: 10 snd_wnd: 35456 srtt: 154262 rcv_wnd: 42112 ··· 2361 2361 And finally, looking at the snapshot data should show at or near 2362 2362 the end the event that triggered the snapshot:: 2363 2363 2364 - # cat /sys/kernel/debug/tracing/snapshot 2364 + # cat /sys/kernel/tracing/snapshot 2365 2365 2366 2366 gnome-shell-1261 [006] dN.3 49.823113: sched_stat_runtime: comm=gnome-shell pid=1261 runtime=49347 [ns] vruntime=1835730389 [ns] 2367 2367 kworker/u16:4-773 [003] d..3 49.823114: sched_switch: prev_comm=kworker/u16:4 prev_pid=773 prev_prio=120 prev_state=R+ ==> next_comm=kworker/3:2 next_pid=135 next_prio=120
+26 -23
Documentation/trace/kprobetrace.rst
··· 6 6 7 7 Overview 8 8 -------- 9 - These events are similar to tracepoint based events. Instead of Tracepoint, 9 + These events are similar to tracepoint-based events. Instead of tracepoints, 10 10 this is based on kprobes (kprobe and kretprobe). So it can probe wherever 11 11 kprobes can probe (this means, all functions except those with 12 12 __kprobes/nokprobe_inline annotation and those marked NOKPROBE_SYMBOL). 13 - Unlike the Tracepoint based event, this can be added and removed 13 + Unlike the tracepoint-based event, this can be added and removed 14 14 dynamically, on the fly. 15 15 16 16 To enable this feature, build your kernel with CONFIG_KPROBE_EVENTS=y. 17 17 18 - Similar to the events tracer, this doesn't need to be activated via 18 + Similar to the event tracer, this doesn't need to be activated via 19 19 current_tracer. Instead of that, add probe points via 20 - /sys/kernel/debug/tracing/kprobe_events, and enable it via 21 - /sys/kernel/debug/tracing/events/kprobes/<EVENT>/enable. 20 + /sys/kernel/tracing/kprobe_events, and enable it via 21 + /sys/kernel/tracing/events/kprobes/<EVENT>/enable. 22 22 23 - You can also use /sys/kernel/debug/tracing/dynamic_events instead of 23 + You can also use /sys/kernel/tracing/dynamic_events instead of 24 24 kprobe_events. That interface will provide unified access to other 25 25 dynamic events too. 26 26 ··· 68 68 69 69 Types 70 70 ----- 71 - Several types are supported for fetch-args. Kprobe tracer will access memory 71 + Several types are supported for fetchargs. Kprobe tracer will access memory 72 72 by given type. Prefix 's' and 'u' means those types are signed and unsigned 73 73 respectively. 'x' prefix implies it is unsigned. Traced arguments are shown 74 74 in decimal ('s' and 'u') or hexadecimal ('x'). Without type casting, 'x32' 75 75 or 'x64' is used depends on the architecture (e.g. x86-32 uses x32, and 76 76 x86-64 uses x64). 77 + 77 78 These value types can be an array. To record array data, you can add '[N]' 78 79 (where N is a fixed number, less than 64) to the base type. 79 - E.g. 'x16[4]' means an array of x16 (2bytes hex) with 4 elements. 80 + E.g. 'x16[4]' means an array of x16 (2-byte hex) with 4 elements. 80 81 Note that the array can be applied to memory type fetchargs, you can not 81 82 apply it to registers/stack-entries etc. (for example, '$stack1:x8[8]' is 82 83 wrong, but '+8($stack):x8[8]' is OK.) 84 + 83 85 String type is a special type, which fetches a "null-terminated" string from 84 86 kernel space. This means it will fail and store NULL if the string container 85 87 has been paged out. "ustring" type is an alternative of string for user-space. 86 - See :ref:`user_mem_access` for more info.. 88 + See :ref:`user_mem_access` for more info. 89 + 87 90 The string array type is a bit different from other types. For other base 88 91 types, <base-type>[1] is equal to <base-type> (e.g. +0(%di):x32[1] is same 89 92 as +0(%di):x32.) But string[1] is not equal to string. The string type itself ··· 123 120 124 121 Note that kprobe-event provides the user-memory access syntax but it doesn't 125 122 use it transparently. This means if you use normal dereference or string type 126 - for user memory, it might fail, and may always fail on some archs. The user 127 - has to carefully check if the target data is in kernel or user space. 123 + for user memory, it might fail, and may always fail on some architectures. The 124 + user has to carefully check if the target data is in kernel or user space. 128 125 129 126 Per-Probe Event Filtering 130 127 ------------------------- ··· 153 150 Event Profiling 154 151 --------------- 155 152 You can check the total number of probe hits and probe miss-hits via 156 - /sys/kernel/debug/tracing/kprobe_profile. 153 + /sys/kernel/tracing/kprobe_profile. 157 154 The first column is event name, the second is the number of probe hits, 158 155 the third is the number of probe miss-hits. 159 156 ··· 163 160 "kprobe_event=" parameter. The parameter accepts a semicolon-delimited 164 161 kprobe events, which format is similar to the kprobe_events. 165 162 The difference is that the probe definition parameters are comma-delimited 166 - instead of space. For example, adding myprobe event on do_sys_open like below 163 + instead of space. For example, adding myprobe event on do_sys_open like below:: 167 164 168 165 p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack) 169 166 170 - should be below for kernel boot parameter (just replace spaces with comma) 167 + should be below for kernel boot parameter (just replace spaces with comma):: 171 168 172 169 p:myprobe,do_sys_open,dfd=%ax,filename=%dx,flags=%cx,mode=+4($stack) 173 170 ··· 177 174 To add a probe as a new event, write a new definition to kprobe_events 178 175 as below:: 179 176 180 - echo 'p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)' > /sys/kernel/debug/tracing/kprobe_events 177 + echo 'p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)' > /sys/kernel/tracing/kprobe_events 181 178 182 179 This sets a kprobe on the top of do_sys_open() function with recording 183 180 1st to 4th arguments as "myprobe" event. Note, which register/stack entry is ··· 187 184 As this example shows, users can choose more familiar names for each arguments. 188 185 :: 189 186 190 - echo 'r:myretprobe do_sys_open $retval' >> /sys/kernel/debug/tracing/kprobe_events 187 + echo 'r:myretprobe do_sys_open $retval' >> /sys/kernel/tracing/kprobe_events 191 188 192 189 This sets a kretprobe on the return point of do_sys_open() function with 193 190 recording return value as "myretprobe" event. 194 191 You can see the format of these events via 195 - /sys/kernel/debug/tracing/events/kprobes/<EVENT>/format. 192 + /sys/kernel/tracing/events/kprobes/<EVENT>/format. 196 193 :: 197 194 198 - cat /sys/kernel/debug/tracing/events/kprobes/myprobe/format 195 + cat /sys/kernel/tracing/events/kprobes/myprobe/format 199 196 name: myprobe 200 197 ID: 780 201 198 format: ··· 218 215 You can see that the event has 4 arguments as in the expressions you specified. 219 216 :: 220 217 221 - echo > /sys/kernel/debug/tracing/kprobe_events 218 + echo > /sys/kernel/tracing/kprobe_events 222 219 223 220 This clears all probe points. 224 221 ··· 233 230 events, you need to enable it. 234 231 :: 235 232 236 - echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable 237 - echo 1 > /sys/kernel/debug/tracing/events/kprobes/myretprobe/enable 233 + echo 1 > /sys/kernel/tracing/events/kprobes/myprobe/enable 234 + echo 1 > /sys/kernel/tracing/events/kprobes/myretprobe/enable 238 235 239 236 Use the following command to start tracing in an interval. 240 237 :: ··· 243 240 Open something... 244 241 # echo 0 > tracing_on 245 242 246 - And you can see the traced information via /sys/kernel/debug/tracing/trace. 243 + And you can see the traced information via /sys/kernel/tracing/trace. 247 244 :: 248 245 249 - cat /sys/kernel/debug/tracing/trace 246 + cat /sys/kernel/tracing/trace 250 247 # tracer: nop 251 248 # 252 249 # TASK-PID CPU# TIMESTAMP FUNCTION
+10 -10
Documentation/trace/mmiotrace.rst
··· 36 36 :: 37 37 38 38 $ mount -t debugfs debugfs /sys/kernel/debug 39 - $ echo mmiotrace > /sys/kernel/debug/tracing/current_tracer 40 - $ cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt & 39 + $ echo mmiotrace > /sys/kernel/tracing/current_tracer 40 + $ cat /sys/kernel/tracing/trace_pipe > mydump.txt & 41 41 Start X or whatever. 42 - $ echo "X is up" > /sys/kernel/debug/tracing/trace_marker 43 - $ echo nop > /sys/kernel/debug/tracing/current_tracer 42 + $ echo "X is up" > /sys/kernel/tracing/trace_marker 43 + $ echo nop > /sys/kernel/tracing/current_tracer 44 44 Check for lost events. 45 45 46 46 ··· 56 56 57 57 Activate mmiotrace (requires root privileges):: 58 58 59 - $ echo mmiotrace > /sys/kernel/debug/tracing/current_tracer 59 + $ echo mmiotrace > /sys/kernel/tracing/current_tracer 60 60 61 61 Start storing the trace:: 62 62 63 - $ cat /sys/kernel/debug/tracing/trace_pipe > mydump.txt & 63 + $ cat /sys/kernel/tracing/trace_pipe > mydump.txt & 64 64 65 65 The 'cat' process should stay running (sleeping) in the background. 66 66 ··· 68 68 accesses to areas that are ioremapped while mmiotrace is active. 69 69 70 70 During tracing you can place comments (markers) into the trace by 71 - $ echo "X is up" > /sys/kernel/debug/tracing/trace_marker 71 + $ echo "X is up" > /sys/kernel/tracing/trace_marker 72 72 This makes it easier to see which part of the (huge) trace corresponds to 73 73 which action. It is recommended to place descriptive markers about what you 74 74 do. 75 75 76 76 Shut down mmiotrace (requires root privileges):: 77 77 78 - $ echo nop > /sys/kernel/debug/tracing/current_tracer 78 + $ echo nop > /sys/kernel/tracing/current_tracer 79 79 80 80 The 'cat' process exits. If it does not, kill it by issuing 'fg' command and 81 81 pressing ctrl+c. ··· 93 93 try again. Buffers are enlarged by first seeing how large the current buffers 94 94 are:: 95 95 96 - $ cat /sys/kernel/debug/tracing/buffer_size_kb 96 + $ cat /sys/kernel/tracing/buffer_size_kb 97 97 98 98 gives you a number. Approximately double this number and write it back, for 99 99 instance:: 100 100 101 - $ echo 128000 > /sys/kernel/debug/tracing/buffer_size_kb 101 + $ echo 128000 > /sys/kernel/tracing/buffer_size_kb 102 102 103 103 Then start again from the top. 104 104
+2 -2
Documentation/trace/postprocess/trace-pagealloc-postprocess.pl
··· 4 4 # to extract some high-level information on what is going on. The accuracy of the parser 5 5 # may vary considerably 6 6 # 7 - # Example usage: trace-pagealloc-postprocess.pl < /sys/kernel/debug/tracing/trace_pipe 7 + # Example usage: trace-pagealloc-postprocess.pl < /sys/kernel/tracing/trace_pipe 8 8 # other options 9 9 # --prepend-parent Report on the parent proc and PID 10 10 # --read-procstat If the trace lacks process info, get it from /proc ··· 94 94 my $regex; 95 95 96 96 # Read the event format or use the default 97 - if (!open (FORMAT, "/sys/kernel/debug/tracing/events/$event/format")) { 97 + if (!open (FORMAT, "/sys/kernel/tracing/events/$event/format")) { 98 98 $regex = $default; 99 99 } else { 100 100 my $line;
+2 -2
Documentation/trace/postprocess/trace-vmscan-postprocess.pl
··· 3 3 # page reclaim. It makes an attempt to extract some high-level information on 4 4 # what is going on. The accuracy of the parser may vary 5 5 # 6 - # Example usage: trace-vmscan-postprocess.pl < /sys/kernel/debug/tracing/trace_pipe 6 + # Example usage: trace-vmscan-postprocess.pl < /sys/kernel/tracing/trace_pipe 7 7 # other options 8 8 # --read-procstat If the trace lacks process info, get it from /proc 9 9 # --ignore-pid Aggregate processes of the same name together ··· 140 140 my $regex; 141 141 142 142 # Read the event format or use the default 143 - if (!open (FORMAT, "/sys/kernel/debug/tracing/events/$event/format")) { 143 + if (!open (FORMAT, "/sys/kernel/tracing/events/$event/format")) { 144 144 print("WARNING: Event $event format string not found\n"); 145 145 return $default; 146 146 } else {
+4 -4
Documentation/trace/tracepoint-analysis.rst
··· 26 26 2.1 Standard Utilities 27 27 ---------------------- 28 28 29 - All possible events are visible from /sys/kernel/debug/tracing/events. Simply 29 + All possible events are visible from /sys/kernel/tracing/events. Simply 30 30 calling:: 31 31 32 - $ find /sys/kernel/debug/tracing/events -type d 32 + $ find /sys/kernel/tracing/events -type d 33 33 34 34 will give a fair indication of the number of events available. 35 35 ··· 59 59 can be enabled system-wide. A short example of enabling all events related 60 60 to page allocation would look something like:: 61 61 62 - $ for i in `find /sys/kernel/debug/tracing/events -name "enable" | grep mm_`; do echo 1 > $i; done 62 + $ for i in `find /sys/kernel/tracing/events -name "enable" | grep mm_`; do echo 1 > $i; done 63 63 64 64 3.2 System-Wide Event Enabling with SystemTap 65 65 --------------------------------------------- ··· 189 189 ============================================ 190 190 191 191 When events are enabled the events that are triggering can be read from 192 - /sys/kernel/debug/tracing/trace_pipe in human-readable format although binary 192 + /sys/kernel/tracing/trace_pipe in human-readable format although binary 193 193 options exist as well. By post-processing the output, further information can 194 194 be gathered on-line as appropriate. Examples of post-processing might include 195 195
+11 -11
Documentation/trace/uprobetracer.rst
··· 12 12 13 13 Similar to the kprobe-event tracer, this doesn't need to be activated via 14 14 current_tracer. Instead of that, add probe points via 15 - /sys/kernel/debug/tracing/uprobe_events, and enable it via 16 - /sys/kernel/debug/tracing/events/uprobes/<EVENT>/enable. 15 + /sys/kernel/tracing/uprobe_events, and enable it via 16 + /sys/kernel/tracing/events/uprobes/<EVENT>/enable. 17 17 18 18 However unlike kprobe-event tracer, the uprobe event interface expects the 19 19 user to calculate the offset of the probepoint in the object. 20 20 21 - You can also use /sys/kernel/debug/tracing/dynamic_events instead of 21 + You can also use /sys/kernel/tracing/dynamic_events instead of 22 22 uprobe_events. That interface will provide unified access to other 23 23 dynamic events too. 24 24 ··· 79 79 Event Profiling 80 80 --------------- 81 81 You can check the total number of probe hits per event via 82 - /sys/kernel/debug/tracing/uprobe_profile. The first column is the filename, 82 + /sys/kernel/tracing/uprobe_profile. The first column is the filename, 83 83 the second is the event name, the third is the number of probe hits. 84 84 85 85 Usage examples ··· 87 87 * Add a probe as a new uprobe event, write a new definition to uprobe_events 88 88 as below (sets a uprobe at an offset of 0x4245c0 in the executable /bin/bash):: 89 89 90 - echo 'p /bin/bash:0x4245c0' > /sys/kernel/debug/tracing/uprobe_events 90 + echo 'p /bin/bash:0x4245c0' > /sys/kernel/tracing/uprobe_events 91 91 92 92 * Add a probe as a new uretprobe event:: 93 93 94 - echo 'r /bin/bash:0x4245c0' > /sys/kernel/debug/tracing/uprobe_events 94 + echo 'r /bin/bash:0x4245c0' > /sys/kernel/tracing/uprobe_events 95 95 96 96 * Unset registered event:: 97 97 98 - echo '-:p_bash_0x4245c0' >> /sys/kernel/debug/tracing/uprobe_events 98 + echo '-:p_bash_0x4245c0' >> /sys/kernel/tracing/uprobe_events 99 99 100 100 * Print out the events that are registered:: 101 101 102 - cat /sys/kernel/debug/tracing/uprobe_events 102 + cat /sys/kernel/tracing/uprobe_events 103 103 104 104 * Clear all events:: 105 105 106 - echo > /sys/kernel/debug/tracing/uprobe_events 106 + echo > /sys/kernel/tracing/uprobe_events 107 107 108 108 Following example shows how to dump the instruction pointer and %ax register 109 109 at the probed text address. Probe zfree function in /bin/zsh:: 110 110 111 - # cd /sys/kernel/debug/tracing/ 111 + # cd /sys/kernel/tracing/ 112 112 # cat /proc/`pgrep zsh`/maps | grep /bin/zsh | grep r-xp 113 113 00400000-0048a000 r-xp 00000000 08:03 130904 /bin/zsh 114 114 # objdump -T /bin/zsh | grep -w zfree ··· 168 168 169 169 # echo 0 > events/uprobes/enable 170 170 171 - And you can see the traced information via /sys/kernel/debug/tracing/trace. 171 + And you can see the traced information via /sys/kernel/tracing/trace. 172 172 :: 173 173 174 174 # cat trace
+9 -9
Documentation/trace/user_events.rst
··· 11 11 To enable this feature, build your kernel with CONFIG_USER_EVENTS=y. 12 12 13 13 Programs can view status of the events via 14 - /sys/kernel/debug/tracing/user_events_status and can both register and write 15 - data out via /sys/kernel/debug/tracing/user_events_data. 14 + /sys/kernel/tracing/user_events_status and can both register and write 15 + data out via /sys/kernel/tracing/user_events_data. 16 16 17 - Programs can also use /sys/kernel/debug/tracing/dynamic_events to register and 17 + Programs can also use /sys/kernel/tracing/dynamic_events to register and 18 18 delete user based events via the u: prefix. The format of the command to 19 19 dynamic_events is the same as the ioctl with the u: prefix applied. 20 20 ··· 22 22 tools that can read trace_events (such as ftrace and perf). The registration 23 23 process gives back two ints to the program for each event. The first int is 24 24 the status bit. This describes which bit in little-endian format in the 25 - /sys/kernel/debug/tracing/user_events_status file represents this event. The 25 + /sys/kernel/tracing/user_events_status file represents this event. The 26 26 second int is the write index which describes the data when a write() or 27 - writev() is called on the /sys/kernel/debug/tracing/user_events_data file. 27 + writev() is called on the /sys/kernel/tracing/user_events_data file. 28 28 29 29 The structures referenced in this document are contained within the 30 30 /include/uapi/linux/user_events.h file in the source tree. ··· 35 35 Registering 36 36 ----------- 37 37 Registering within a user process is done via ioctl() out to the 38 - /sys/kernel/debug/tracing/user_events_data file. The command to issue is 38 + /sys/kernel/tracing/user_events_data file. The command to issue is 39 39 DIAG_IOCSREG. 40 40 41 41 This command takes a packed struct user_reg as an argument:: ··· 54 54 55 55 User based events show up under tracefs like any other event under the 56 56 subsystem named "user_events". This means tools that wish to attach to the 57 - events need to use /sys/kernel/debug/tracing/events/user_events/[name]/enable 57 + events need to use /sys/kernel/tracing/events/user_events/[name]/enable 58 58 or perf record -e user_events:[name] when attaching/recording. 59 59 60 60 **NOTE:** *The write_index returned is only valid for the FD that was used* ··· 96 96 Deleting 97 97 ----------- 98 98 Deleting an event from within a user process is done via ioctl() out to the 99 - /sys/kernel/debug/tracing/user_events_data file. The command to issue is 99 + /sys/kernel/tracing/user_events_data file. The command to issue is 100 100 DIAG_IOCSDEL. 101 101 102 102 This command only requires a single string specifying the event to delete by ··· 110 110 in realtime. This allows user programs to only incur the cost of the write() or 111 111 writev() calls when something is actively attached to the event. 112 112 113 - User programs call mmap() on /sys/kernel/debug/tracing/user_events_status to 113 + User programs call mmap() on /sys/kernel/tracing/user_events_status to 114 114 check the status for each event that is registered. The bit to check in the 115 115 file is given back after the register ioctl() via user_reg.status_bit. The bit 116 116 is always in little-endian format. Programs can check if the bit is set either
+1 -1
Documentation/translations/it_IT/admin-guide/README.rst
··· 4 4 5 5 .. _it_readme: 6 6 7 - Rilascio del kernel Linux 5.x <http://kernel.org/> 7 + Rilascio del kernel Linux 6.x <http://kernel.org/> 8 8 =================================================== 9 9 10 10 .. warning::
+2
Documentation/translations/it_IT/doc-guide/kernel-doc.rst
··· 3 3 .. note:: Per leggere la documentazione originale in inglese: 4 4 :ref:`Documentation/doc-guide/index.rst <doc_guide>` 5 5 6 + .. title:: Commenti in kernel-doc 7 + 6 8 .. _it_kernel_doc: 7 9 8 10 =================================
+13 -1
Documentation/translations/it_IT/doc-guide/sphinx.rst
··· 151 151 dev'essere installato. Se disponibile, il tema *Read the Docs* per Sphinx 152 152 verrà utilizzato per ottenere una documentazione HTML più gradevole. 153 153 Per la documentazione in formato PDF, invece, avrete bisogno di ``XeLaTeX` 154 - e di ``convert(1)`` disponibile in ImageMagick (https://www.imagemagick.org). 154 + e di ``convert(1)`` disponibile in ImageMagick 155 + (https://www.imagemagick.org). \ [#ink]_ 155 156 Tipicamente, tutti questi pacchetti sono disponibili e pacchettizzati nelle 156 157 distribuzioni Linux. 157 158 ··· 163 162 Potete anche personalizzare l'ouptut html passando un livello aggiuntivo 164 163 DOCS_CSS usando la rispettiva variabile d'ambiente ``DOCS_CSS``. 165 164 165 + La variable make ``SPHINXDIRS`` è utile quando si vuole generare solo una parte 166 + della documentazione. Per esempio, si possono generare solo di documenti in 167 + ``Documentation/doc-guide`` eseguendo ``make SPHINXDIRS=doc-guide htmldocs``. La 168 + sezione dedicata alla documentazione di ``make help`` vi mostrerà quali sotto 169 + cartelle potete specificare. 170 + 166 171 Potete eliminare la documentazione generata tramite il comando 167 172 ``make cleandocs``. 173 + 174 + .. [#ink] Avere installato anche ``inkscape(1)`` dal progetto Inkscape () 175 + potrebbe aumentare la qualità delle immagini che verranno integrate 176 + nel documento PDF, specialmente per quando si usando rilasci del 177 + kernel uguali o superiori a 5.18 168 178 169 179 Scrivere la documentazione 170 180 ==========================
+51 -56
Documentation/translations/it_IT/index.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 1 3 .. _it_linux_doc: 2 4 3 5 =================== ··· 69 67 se vuoi aiutare, iscriviti alla lista di discussione linux-doc presso 70 68 vger.kernel.org. 71 69 72 - Documentazione sulla licenza dei sorgenti 73 - ----------------------------------------- 70 + Lavorare con la comunità di sviluppo 71 + ------------------------------------ 74 72 75 - I seguenti documenti descrivono la licenza usata nei sorgenti del kernel Linux 76 - (GPLv2), come licenziare i singoli file; inoltre troverete i riferimenti al 77 - testo integrale della licenza. 73 + Le guide fondamentali per l'interazione con la comunità di sviluppo del kernel e 74 + su come vedere il proprio lavoro integrato. 78 75 79 - * :ref:`it_kernel_licensing` 76 + .. toctree:: 77 + :maxdepth: 1 78 + 79 + process/development-process 80 + process/submitting-patches 81 + Code of conduct <process/code-of-conduct> 82 + All development-process docs <process/index> 83 + 84 + 85 + Manuali sull'API interna 86 + ------------------------ 87 + 88 + Di seguito una serie di manuali per gli sviluppatori che hanno bisogno di 89 + interfacciarsi con il resto del kernel. 90 + 91 + .. toctree:: 92 + :maxdepth: 1 93 + 94 + core-api/index 95 + 96 + Strumenti e processi per lo sviluppo 97 + ------------------------------------ 98 + 99 + Di seguito una serie di manuali contenenti informazioni utili a tutti gli 100 + sviluppatori del kernel. 101 + 102 + .. toctree:: 103 + :maxdepth: 1 104 + 105 + process/license-rules 106 + doc-guide/index 107 + kernel-hacking/index 80 108 81 109 Documentazione per gli utenti 82 110 ----------------------------- 83 111 84 - I seguenti manuali sono scritti per gli *utenti* del kernel - ovvero, 85 - coloro che cercano di farlo funzionare in modo ottimale su un dato sistema 112 + Di seguito una serie di manuali per gli *utenti* del kernel - ovvero coloro che 113 + stanno cercando di farlo funzionare al meglio per un dato sistema, ma anche 114 + coloro che stanno sviluppando applicazioni che sfruttano l'API verso lo 115 + spazio-utente. 86 116 87 - .. warning:: 117 + Consultate anche `Linux man pages <https://www.kernel.org/doc/man-pages/>`_, che 118 + vengono mantenuti separatamente dalla documentazione del kernel Linux 88 119 89 - TODO ancora da tradurre 90 - 91 - Documentazione per gli sviluppatori di applicazioni 92 - --------------------------------------------------- 93 - 94 - Il manuale delle API verso lo spazio utente è una collezione di documenti 95 - che descrivono le interfacce del kernel viste dagli sviluppatori 96 - di applicazioni. 97 - 98 - .. warning:: 99 - 100 - TODO ancora da tradurre 101 - 102 - 103 - Introduzione allo sviluppo del kernel 104 - ------------------------------------- 105 - 106 - Questi manuali contengono informazioni su come contribuire allo sviluppo 107 - del kernel. 108 - Attorno al kernel Linux gira una comunità molto grande con migliaia di 109 - sviluppatori che contribuiscono ogni anno. Come in ogni grande comunità, 110 - sapere come le cose vengono fatte renderà il processo di integrazione delle 111 - vostre modifiche molto più semplice 112 - 113 - .. toctree:: 114 - :maxdepth: 2 115 - 116 - process/index 117 - doc-guide/index 118 - kernel-hacking/index 119 - 120 - Documentazione della API del kernel 120 + Documentazione relativa ai firmware 121 121 ----------------------------------- 122 + Di seguito informazioni sulle aspettative del kernel circa i firmware. 122 123 123 - Questi manuali forniscono dettagli su come funzionano i sottosistemi del 124 - kernel dal punto di vista degli sviluppatori del kernel. Molte delle 125 - informazioni contenute in questi manuali sono prese direttamente dai 126 - file sorgenti, informazioni aggiuntive vengono aggiunte solo se necessarie 127 - (o almeno ci proviamo — probabilmente *non* tutto quello che è davvero 128 - necessario). 129 - 130 - .. toctree:: 131 - :maxdepth: 2 132 - 133 - core-api/index 134 124 135 125 Documentazione specifica per architettura 136 126 ----------------------------------------- 137 127 138 - Questi manuali forniscono dettagli di programmazione per le diverse 139 - implementazioni d'architettura. 140 128 141 - .. warning:: 129 + Documentazione varia 130 + -------------------- 142 131 143 - TODO ancora da tradurre 132 + Ci sono documenti che sono difficili da inserire nell'attuale organizzazione 133 + della documentazione; altri hanno bisogno di essere migliorati e/o convertiti 134 + nel formato *ReStructured Text*; altri sono semplicamente troppo vecchi.
+1 -1
Documentation/translations/it_IT/kernel-hacking/hacking.rst
··· 137 137 .. warning:: 138 138 139 139 State attenti che questa macro ritornerà un falso positivo 140 - se :ref:`botton half lock <it_local_bh_disable>` è bloccato. 140 + se :ref:`bottom half lock <it_local_bh_disable>` è bloccato. 141 141 142 142 Alcune regole basilari 143 143 ======================
+4 -11
Documentation/translations/it_IT/process/2.Process.rst
··· 136 136 La 5.2.21 fu l'aggiornamento finale per la versione 5.2. 137 137 138 138 Alcuni kernel sono destinati ad essere kernel a "lungo termine"; questi 139 - riceveranno assistenza per un lungo periodo di tempo. Al momento in cui 140 - scriviamo, i manutentori dei kernel stabili a lungo termine sono: 139 + riceveranno assistenza per un lungo periodo di tempo. Consultate il seguente 140 + collegamento per avere la lista delle versioni attualmente supportate e i 141 + relativi manutentori: 141 142 142 - ====== ================================ ========================================== 143 - 3.16 Ben Hutchings (kernel stabile molto più a lungo termine) 144 - 4.4 Greg Kroah-Hartman e Sasha Levin (kernel stabile molto più a lungo termine) 145 - 4.9 Greg Kroah-Hartman e Sasha Levin 146 - 4.14 Greg Kroah-Hartman e Sasha Levin 147 - 4.19 Greg Kroah-Hartman e Sasha Levin 148 - 5.4i Greg Kroah-Hartman e Sasha Levin 149 - ====== ================================ ========================================== 150 - 143 + https://www.kernel.org/category/releases.html 151 144 152 145 Questa selezione di kernel di lungo periodo sono puramente dovuti ai loro 153 146 manutentori, alla loro necessità e al tempo per tenere aggiornate proprio
+4 -4
Documentation/translations/it_IT/process/7.AdvancedTopics.rst
··· 35 35 desiderassero diventare agili con git troveranno più informazioni ai 36 36 seguenti indirizzi: 37 37 38 - http://git-scm.com/ 38 + https://git-scm.com/ 39 39 40 - http://www.kernel.org/pub/software/scm/git/docs/user-manual.html 40 + https://www.kernel.org/pub/software/scm/git/docs/user-manual.html 41 41 42 42 e su varie guide che potrete trovare su internet. 43 43 ··· 63 63 svilupparsi piattaforme che offrono spazi pubblici, e gratuiti (Github, 64 64 per esempio). Gli sviluppatori permanenti possono ottenere un account 65 65 su kernel.org, ma non è proprio facile da ottenere; per maggiori informazioni 66 - consultate la pagina web http://kernel.org/faq/. 66 + consultate la pagina web https://kernel.org/faq/. 67 67 68 68 In git è normale avere a che fare con tanti rami. Ogni linea di sviluppo 69 69 può essere separata in "rami per argomenti" e gestiti indipendentemente. ··· 137 137 facendo, e ho bisogno di fidarmi *senza* dover passare tutte 138 138 le modifiche manualmente una per una. 139 139 140 - (http://lwn.net/Articles/224135/). 140 + (https://lwn.net/Articles/224135/). 141 141 142 142 Per evitare queste situazioni, assicuratevi che tutte le patch in un ramo 143 143 siano strettamente correlate al tema delle modifiche; un ramo "driver fixes"
+249
Documentation/translations/it_IT/process/botching-up-ioctls.rst
··· 1 + .. include:: ../disclaimer-ita.rst 2 + 3 + :Original: Documentation/process/botching-up-ioctls.rst 4 + 5 + ========================================== 6 + (Come evitare di) Raffazzonare delle ioctl 7 + ========================================== 8 + 9 + Preso da: https://blog.ffwll.ch/2013/11/botching-up-ioctls.html 10 + 11 + Scritto da : Daniel Vetter, Copyright © 2013 Intel Corporation 12 + 13 + Una cosa che gli sviluppatori del sottosistema grafico del kernel Linux hanno 14 + imparato negli ultimi anni è l'inutilità di cercare di creare un'interfaccia 15 + unificata per gestire la memoria e le unità esecutive di diverse GPU. Dunque, 16 + oggigiorno ogni driver ha il suo insieme di ioctl per allocare memoria ed 17 + inviare dei programmi alla GPU. Il che è va bene dato che non c'è più un insano 18 + sistema che finge di essere generico, ma al suo posto ci sono interfacce 19 + dedicate. Ma al tempo stesso è più facile incasinare le cose. 20 + 21 + Per evitare di ripetere gli stessi errori ho preso nota delle lezioni imparate 22 + mentre raffazzonavo il driver drm/i915. La maggior parte di queste lezioni si 23 + focalizzano sui tecnicismi e non sulla visione d'insieme, come le discussioni 24 + riguardo al modo migliore per implementare una ioctl per inviare compiti alla 25 + GPU. Probabilmente, ogni sviluppatore di driver per GPU dovrebbe imparare queste 26 + lezioni in autonomia. 27 + 28 + 29 + Prerequisiti 30 + ------------ 31 + 32 + Prima i prerequisiti. Seguite i seguenti suggerimenti se non volete fallire in 33 + partenza e ritrovarvi ad aggiungere un livello di compatibilità a 32-bit. 34 + 35 + * Usate solamente interi a lunghezza fissa. Per evitare i conflitti coi tipi 36 + definiti nello spazio utente, il kernel definisce alcuni tipi speciali, come: 37 + ``__u32``, ``__s64``. Usateli. 38 + 39 + * Allineate tutto alla lunghezza naturale delle piattaforma in uso e riempite 40 + esplicitamente i vuoti. Non necessariamente le piattaforme a 32-bit allineano 41 + i valori a 64-bit rispettandone l'allineamento, ma le piattaforme a 64-bit lo 42 + fanno. Dunque, per farlo correttamente in entrambe i casi dobbiamo sempre 43 + riempire i vuoti. 44 + 45 + * Se una struttura dati contiene valori a 64-bit, allora fate si che la sua 46 + dimensione sia allineata a 64-bit, altrimenti la sua dimensione varierà su 47 + sistemi a 32-bit e 64-bit. Avere una dimensione differente causa problemi 48 + quando si passano vettori di strutture dati al kernel, o quando il kernel 49 + effettua verifiche sulla dimensione (per esempio il sistema drm lo fa). 50 + 51 + * I puntatori sono di tipo ``__u64``, con un *cast* da/a ``uintptr_t`` da lato 52 + spazio utente e da/a ``void __user *`` nello spazio kernel. Sforzatevi il più 53 + possibile per non ritardare la conversione, o peggio maneggiare ``__u64`` nel 54 + vostro codice perché questo riduce le verifiche che strumenti come sparse 55 + possono effettuare. La macro u64_to_user_ptr() può essere usata nel kernel 56 + per evitare avvisi riguardo interi e puntatori di dimensioni differenti. 57 + 58 + 59 + Le Basi 60 + ------- 61 + 62 + Con la gioia d'aver evitato un livello di compatibilità, possiamo ora dare uno 63 + sguardo alle basi. Trascurare questi punti renderà difficile la gestione della 64 + compatibilità all'indietro ed in avanti. E dato che sbagliare al primo colpo è 65 + garantito, dovrete rivisitare il codice o estenderlo per ogni interfaccia. 66 + 67 + * Abbiate un modo chiaro per capire dallo spazio utente se una nuova ioctl, o 68 + l'estensione di una esistente, sia supportata dal kernel in esecuzione. Se non 69 + potete fidarvi del fatto che un vecchio kernel possa rifiutare correttamente 70 + un nuovo *flag*, modalità, o ioctl, (probabilmente perché avevate raffazzonato 71 + qualcosa nel passato) allora dovrete implementare nel driver un meccanismo per 72 + notificare quali funzionalità sono supportate, o in alternativa un numero di 73 + versione. 74 + 75 + * Abbiate un piano per estendere le ioctl con nuovi *flag* o campi alla fine di 76 + una struttura dati. Il sistema drm verifica la dimensione di ogni ioctl in 77 + arrivo, ed estende con zeri ogni incongruenza fra kernel e spazio utente. 78 + Questo aiuta, ma non è una soluzione completa dato che uno spazio utente nuovo 79 + su un kernel vecchio non noterebbe che i campi nuovi alla fine della struttura 80 + vengono ignorati. Dunque, anche questo avrà bisogno di essere notificato dal 81 + driver allo spazio utente. 82 + 83 + * Verificate tutti i campi e *flag* inutilizzati ed i riempimenti siano a 0, 84 + altrimenti rifiutare la ioctl. Se non lo fate il vostro bel piano per 85 + estendere le ioctl andrà a rotoli dato che qualcuno userà delle ioctl con 86 + strutture dati con valori casuali dallo stack nei campi inutilizzati. Il che 87 + si traduce nell'avere questi campi nell'ABI, e la cui unica utilità sarà 88 + quella di contenere spazzatura. Per questo dovrete esplicitamente riempire i 89 + vuoti di tutte le vostre strutture dati, anche se non le userete in un 90 + vettore. Il riempimento fatto dal compilatore potrebbe contenere valori 91 + casuali. 92 + 93 + * Abbiate un semplice codice di test per ognuno dei casi sopracitati. 94 + 95 + 96 + Divertirsi coi percorsi d'errore 97 + -------------------------------- 98 + 99 + Oggigiorno non ci sono più scuse rimaste per permettere ai driver drm di essere 100 + sfruttati per diventare root. Questo significa che dobbiamo avere una completa 101 + validazione degli input e gestire in modo robusto i percorsi - tanto le GPU 102 + moriranno comunque nel più strano dei casi particolari: 103 + 104 + * Le ioctl devono verificare l'overflow dei vettori. Inoltre, per i valori 105 + interi si devono verificare *overflow*, *underflow*, e *clamping*. Il 106 + classico esempio è l'inserimento direttamente nell'hardware di valori di 107 + posizionamento di un'immagine *sprite* quando l'hardware supporta giusto 12 108 + bit, o qualcosa del genere. Tutto funzionerà finché qualche strano *display 109 + server* non decide di preoccuparsi lui stesso del *clamping* e il cursore 110 + farà il giro dello schermo. 111 + 112 + * Avere un test semplice per ogni possibile fallimento della vostra ioctl. 113 + Verificate che il codice di errore rispetti le aspettative. Ed infine, 114 + assicuratevi che verifichiate un solo percorso sbagliato per ogni sotto-test 115 + inviando comunque dati corretti. Senza questo, verifiche precedenti 116 + potrebbero rigettare la ioctl troppo presto, impedendo l'esecuzione del 117 + codice che si voleva effettivamente verificare, rischiando quindi di 118 + mascherare bachi e regressioni. 119 + 120 + * Fate si che tutte le vostre ioctl siano rieseguibili. Prima di tutto X adora 121 + i segnali; secondo questo vi permetterà di verificare il 90% dei percorsi 122 + d'errore interrompendo i vostri test con dei segnali. Grazie all'amore di X 123 + per i segnali, otterrete gratuitamente un eccellente copertura di base per 124 + tutti i vostri percorsi d'errore. Inoltre, siate consistenti sul modo di 125 + gestire la riesecuzione delle ioctl - per esempio, drm ha una piccola 126 + funzione di supporto `drmIoctl` nella sua librerie in spazio utente. Il 127 + driver i915 l'abbozza con l'ioctl `set_tiling`, ed ora siamo inchiodati per 128 + sempre con una semantica arcana sia nel kernel che nello spazio utente. 129 + 130 + 131 + * Se non potete rendere un pezzo di codice rieseguibile, almeno rendete 132 + possibile la sua interruzione. Le GPU moriranno e i vostri utenti non vi 133 + apprezzeranno affatto se tenete in ostaggio il loro scatolotto (mediante un 134 + processo X insopprimibile). Se anche recuperare lo stato è troppo complicato, 135 + allora implementate una scadenza oppure come ultima spiaggia una rete di 136 + sicurezza per rilevare situazioni di stallo quando l'hardware da di matto. 137 + 138 + * Preparate dei test riguardo ai casi particolarmente estremi nel codice di 139 + recupero del sistema - è troppo facile create uno stallo fra il vostro codice 140 + anti-stallo e un processo scrittore. 141 + 142 + 143 + Tempi, attese e mancate scadenze 144 + -------------------------------- 145 + 146 + Le GPU fanno quasi tutto in modo asincrono, dunque dobbiamo regolare le 147 + operazioni ed attendere quelle in sospeso. Questo è davvero difficile; al 148 + momento nessuna delle ioctl supportante dal driver drm/i915 riesce a farlo 149 + perfettamente, il che significa che qui ci sono ancora una valanga di lezioni da 150 + apprendere. 151 + 152 + * Per fare riferimento al tempo usate sempre ``CLOCK_MONOTONIC``. Oggigiorno 153 + questo è quello che viene usato di base da alsa, drm, e v4l. Tuttavia, 154 + lasciate allo spazio utente la possibilità di capire quali *timestamp* 155 + derivano da domini temporali diversi come il vostro orologio di sistema 156 + (fornito dal kernel) oppure un contatore hardware indipendente da qualche 157 + parte. Gli orologi divergeranno, ma con questa informazione gli strumenti di 158 + analisi delle prestazioni possono compensare il problema. Se il vostro spazio 159 + utente può ottenere i valori grezzi degli orologi, allora considerate di 160 + esporre anch'essi. 161 + 162 + * Per descrivere il tempo, usate ``__s64`` per i secondi e ``__u64`` per i 163 + nanosecondi. Non è il modo migliore per specificare il tempo, ma è 164 + praticamente uno standard. 165 + 166 + * Verificate che gli input di valori temporali siano normalizzati, e se non lo 167 + sono scartateli. Fate attenzione perché la struttura dati ``struct ktime`` 168 + del kernel usa interi con segni sia per i secondi che per i nanosecondi. 169 + 170 + * Per le scadenze (*timeout*) usate valori temporali assoluti. Se siete dei 171 + bravi ragazzi e avete reso la vostra ioctl rieseguibile, allora i tempi 172 + relativi tendono ad essere troppo grossolani e a causa degli arrotondamenti 173 + potrebbero estendere in modo indefinito i tempi di attesa ad ogni 174 + riesecuzione. Particolarmente vero se il vostro orologio di riferimento è 175 + qualcosa di molto lento come il contatore di *frame*. Con la giacca da 176 + avvocato delle specifiche diremmo che questo non è un baco perché tutte le 177 + scadenze potrebbero essere estese - ma sicuramente gli utenti vi odieranno 178 + quando le animazioni singhiozzano. 179 + 180 + * Considerate l'idea di eliminare tutte le ioctl sincrone con scadenze, e di 181 + sostituirle con una versione asincrona il cui stato può essere consultato 182 + attraverso il descrittore di file mediante ``poll``. Questo approccio si 183 + sposa meglio in un applicazione guidata dagli eventi. 184 + 185 + * Sviluppate dei test per i casi estremi, specialmente verificate che i valori 186 + di ritorno per gli eventi già completati, le attese terminate con successo, e 187 + le attese scadute abbiano senso e servano ai vostri scopi. 188 + 189 + 190 + Non perdere risorse 191 + ------------------- 192 + Nel suo piccolo il driver drm implementa un sistema operativo specializzato per 193 + certe GPU. Questo significa che il driver deve esporre verso lo spazio 194 + utente tonnellate di agganci per accedere ad oggetti e altre risorse. Farlo 195 + correttamente porterà con se alcune insidie: 196 + 197 + * Collegate sempre la vita di una risorsa creata dinamicamente, a quella del 198 + descrittore di file. Considerate una mappatura 1:1 se la vostra risorsa 199 + dev'essere condivisa fra processi - passarsi descrittori di file sul socket 200 + unix semplifica la gestione anche per lo spazio utente. 201 + 202 + * Dev'esserci sempre Il supporto ``O_CLOEXEC``. 203 + 204 + * Assicuratevi di avere abbastanza isolamento fra utenti diversi. Di base 205 + impostate uno spazio dei nomi riservato per ogni descrittore di file, il che 206 + forzerà ogni condivisione ad essere esplicita. Usate uno spazio più globale 207 + per dispositivo solo se gli oggetti sono effettivamente unici per quel 208 + dispositivo. Un controesempio viene dall'interfaccia drm modeset, dove 209 + oggetti specifici di dispositivo, come i connettori, condividono uno spazio 210 + dei nomi con oggetti per il *framebuffer*, ma questi non sono per niente 211 + condivisi. Uno spazio separato, privato di base, per i *framebuffer* sarebbe 212 + stato meglio. 213 + 214 + * Pensate all'identificazione univoca degli agganci verso lo spazio utente. Per 215 + esempio, per la maggior parte dei driver drm, si considera fallace la doppia 216 + sottomissione di un oggetto allo stesso comando ioctl. Ma per evitarlo, se 217 + gli oggetti sono condivisibili, lo spazio utente ha bisogno di sapere se il 218 + driver ha importato un oggetto da un altro processo. Non l'ho ancora provato, 219 + ma considerate l'idea di usare il numero di inode come identificatore per i 220 + descrittori di file condivisi - che poi è come si distinguono i veri file. 221 + Sfortunatamente, questo richiederebbe lo sviluppo di un vero e proprio 222 + filesystem virtuale nel kernel. 223 + 224 + 225 + Ultimo, ma non meno importante 226 + ------------------------------ 227 + 228 + Non tutti i problemi si risolvono con una nuova ioctl: 229 + 230 + * Pensateci su due o tre volte prima di implementare un'interfaccia privata per 231 + un driver. Ovviamente è molto più veloce seguire questa via piuttosto che 232 + buttarsi in lunghe discussioni alla ricerca di una soluzione più generica. Ed 233 + a volte un'interfaccia privata è quello che serve per sviluppare un nuovo 234 + concetto. Ma alla fine, una volta che c'è un'interfaccia generica a 235 + disposizione finirete per mantenere due interfacce. Per sempre. 236 + 237 + * Considerate interfacce alternative alle ioctl. Gli attributi sysfs sono molto 238 + meglio per impostazioni che sono specifiche di un dispositivo, o per 239 + sotto-oggetti con una vita piuttosto statica (come le uscite dei connettori in 240 + drm con tutti gli attributi per la sovrascrittura delle rilevazioni). O magari 241 + solo il vostro sistema di test ha bisogno di una certa interfaccia, e allora 242 + debugfs (che non ha un'interfaccia stabile) sarà la soluzione migliore. 243 + 244 + Per concludere. Questo gioco consiste nel fare le cose giuste fin da subito, 245 + dato che se il vostro driver diventa popolare e la piattaforma hardware longeva 246 + finirete per mantenere le vostre ioctl per sempre. Potrete tentare di deprecare 247 + alcune orribili ioctl, ma ci vorranno anni per riuscirci effettivamente. E 248 + ancora, altri anni prima che sparisca l'ultimo utente capace di lamentarsi per 249 + una regressione.
+11
Documentation/translations/it_IT/process/changes.rst
··· 35 35 GNU C 5.1 gcc --version 36 36 Clang/LLVM (optional) 11.0.0 clang --version 37 37 GNU make 3.81 make --version 38 + bash 4.2 bash --version 38 39 binutils 2.23 ld -v 39 40 flex 2.5.35 flex --version 40 41 bison 2.0 bison --version ··· 88 87 ---- 89 88 90 89 Per compilare il kernel vi servirà GNU make 3.81 o successivo. 90 + 91 + Bash 92 + ---- 93 + Per generare il kernel vengono usati alcuni script per bash. 94 + Questo richiede bash 4.2 o successivo. 91 95 92 96 Binutils 93 97 -------- ··· 375 369 ---- 376 370 377 371 - <ftp://ftp.gnu.org/gnu/make/> 372 + 373 + Bash 374 + ---- 375 + 376 + - <ftp://ftp.gnu.org/gnu/bash/> 378 377 379 378 Binutils 380 379 --------
+48 -23
Documentation/translations/it_IT/process/email-clients.rst
··· 106 106 Per inserire una patch usate :menuselection:`Messaggio-->Inserisci file` 107 107 (:kbd:`CTRL-I`) oppure un editor esterno. 108 108 109 - Se la patch che avete inserito dev'essere modificata usato la finestra di 109 + Se la patch che avete inserito dev'essere modificata usando la finestra di 110 110 scrittura di Claws, allora assicuratevi che l'"auto-interruzione" sia 111 111 disabilitata :menuselection:`Configurazione-->Preferenze-->Composizione-->Interruzione riga`. 112 112 ··· 288 288 Thunderbird è un clone di Outlook a cui piace maciullare il testo, ma esistono 289 289 modi per impedirglielo. 290 290 291 - - permettere l'uso di editor esterni: 292 - La cosa più semplice da fare con Thunderbird e le patch è quello di usare 293 - l'estensione "external editor" e di usare il vostro ``$EDITOR`` preferito per 294 - leggere/includere patch nel vostro messaggio. Per farlo, scaricate ed 295 - installate l'estensione e aggiungete un bottone per chiamarla rapidamente 296 - usando :menuselection:`Visualizza-->Barra degli strumenti-->Personalizza...`; 297 - una volta fatto potrete richiamarlo premendo sul bottone mentre siete nella 298 - finestra :menuselection:`Scrivi` 291 + Dopo la configurazione, inclusa l'installazione delle estenzioni, dovrete 292 + riavviare Thunderbird. 299 293 300 - Tenete presente che "external editor" richiede che il vostro editor non 301 - faccia alcun fork, in altre parole, l'editor non deve ritornare prima di 302 - essere stato chiuso. Potreste dover passare dei parametri aggiuntivi al 303 - vostro editor oppure cambiargli la configurazione. Per esempio, usando 304 - gvim dovrete aggiungere l'opzione -f ``/usr/bin/gvim -f`` (Se il binario 305 - si trova in ``/usr/bin``) nell'apposito campo nell'interfaccia di 306 - configurazione di :menuselection:`external editor`. Se usate altri editor 307 - consultate il loro manuale per sapere come configurarli. 294 + - permettere l'uso di editor esterni: 295 + 296 + La cosa più semplice da fare con Thunderbird e le patch è quello di usare 297 + estensioni che permettano di aprire il vostro editor preferito. 298 + 299 + Di seguito alcune estensioni che possono essere utili al caso. 300 + 301 + - "External Editor Revived" 302 + 303 + https://github.com/Frederick888/external-editor-revived 304 + 305 + https://addons.thunderbird.net/en-GB/thunderbird/addon/external-editor-revived/ 306 + 307 + L'estensione richiede l'installazione di "native messaging host". Date 308 + un'occhiata alla seguente wiki: 309 + https://github.com/Frederick888/external-editor-revived/wiki 310 + 311 + - "External Editor" 312 + 313 + https://github.com/exteditor/exteditor 314 + 315 + Per usarlo, scaricate ed installate l'applicazione. Poi aprite la finestra 316 + :menuselection:`Scrivi` e a seguire aggiungete un bottone per eseguirlo 317 + `Visualizza-->Barra degli strumenti-->Personalizza...`. Infine, premente 318 + questo nuovo bottone tutte le volte che volete usare l'editor esterno. 319 + 320 + Tenete presente che "external editor" richiede che il vostro editor non 321 + faccia alcun fork, in altre parole, l'editor non deve ritornare prima di 322 + essere stato chiuso. Potreste dover passare dei parametri aggiuntivi al 323 + vostro editor oppure cambiargli la configurazione. Per esempio, usando 324 + gvim dovrete aggiungere l'opzione -f ``/usr/bin/gvim -f`` (Se il binario 325 + si trova in ``/usr/bin``) nell'apposito campo nell'interfaccia di 326 + configurazione di :menuselection:`external editor`. Se usate altri editor 327 + consultate il loro manuale per sapere come configurarli.``)`` 308 328 309 329 Per rendere l'editor interno un po' più sensato, fate così: 310 330 311 - - Modificate le impostazioni di Thunderbird per far si che non usi 312 - ``format=flowed``. Andate in :menuselection:`Modifica-->Preferenze-->Avanzate-->Editor di configurazione` 331 + - Modificate le impostazioni di Thunderbird per far si che non usi ``format=flowed``! 332 + Andate sulla finestra principale e cercate il bottone per il menu a tendina principale. 333 + Poi :menuselection:`Modifica-->Preferenze-->Avanzate-->Editor di configurazione` 313 334 per invocare il registro delle impostazioni. 314 335 315 - - impostate ``mailnews.send_plaintext_flowed`` a ``false`` 336 + - impostate ``mailnews.send_plaintext_flowed`` a ``false`` 316 337 317 - - impostate ``mailnews.wraplength`` da ``72`` a ``0`` 338 + - impostate ``mailnews.wraplength`` da ``72`` a ``0`` 318 339 319 - - :menuselection:`Visualizza-->Corpo del messaggio come-->Testo semplice` 340 + - Non scrivete messaggi HTML! Andate sulla finestra principale ed aprite la 341 + schermata :menuselection:`Menu principale-->Impostazioni account-->nome@unserver.ovunque-->Composizioni e indirizzi`. 342 + Qui potrete disabilitare l'opzione "Componi i messaggi in HTML" 320 343 321 - - :menuselection:`Visualizza-->Codifica del testo-->Unicode` 344 + - Aprite i messaggi solo in formato testo! Andate sulla finestra principale e 345 + selezionate 346 + :menuselection:`Menu principale-->Visualizza-->Copro del messaggio come-->Testo semplice` 322 347 323 348 324 349 TkRat (GUI)
+1
Documentation/translations/it_IT/process/index.rst
··· 58 58 adding-syscalls 59 59 magic-number 60 60 volatile-considered-harmful 61 + botching-up-ioctls 61 62 clang-format 62 63 ../riscv/patch-acceptance 63 64
+2 -2
Documentation/translations/it_IT/process/kernel-docs.rst
··· 6 6 7 7 .. _it_kernel_docs: 8 8 9 - Indice di documenti per le persone interessate a capire e/o scrivere per il kernel Linux 10 - ======================================================================================== 9 + Ulteriore Documentazione Del Kernel Linux 10 + ========================================= 11 11 12 12 .. note:: 13 13 Questo documento contiene riferimenti a documenti in lingua inglese; inoltre
+2 -4
Documentation/translations/it_IT/process/maintainer-pgp-guide.rst
··· 163 163 comprendere i seguenti punti: 164 164 165 165 1. Non ci sono differenze tecniche tra la chiave principale e la sottochiave. 166 - 2. In fesa di creazione, assegniamo limitazioni funzionali ad ogni chiave 166 + 2. In fase di creazione, assegniamo limitazioni funzionali ad ogni chiave 167 167 assegnando capacità specifiche. 168 168 3. Una chiave PGP può avere 4 capacità: 169 169 ··· 286 286 Probabilmente la vostra stampante non è più quello stupido dispositivo 287 287 connesso alla porta parallela, ma dato che il suo output è comunque 288 288 criptato con la passphrase, eseguire la stampa in un sistema "cloud" 289 - moderno dovrebbe essere comunque relativamente sicuro. Un'opzione potrebbe 290 - essere quella di cambiare la passphrase della vostra chiave primaria 291 - subito dopo aver finito con paperkey. 289 + moderno dovrebbe essere comunque relativamente sicuro. 292 290 293 291 Copia di riserva di tutta la cartella GnuPG 294 292 -------------------------------------------
+1 -1
Documentation/translations/it_IT/process/submitting-patches.rst
··· 340 340 ringraziarli per il loro tempo. Revisionare codice è un lavoro faticoso e che 341 341 richiede molto tempo, e a volte i revisori diventano burberi. Tuttavia, anche in 342 342 questo caso, rispondete con educazione e concentratevi sul problema che hanno 343 - evidenziato. Quando inviate una version successiva ricordatevi di aggiungere un 343 + evidenziato. Quando inviate una versione successiva ricordatevi di aggiungere un 344 344 ``patch changelog`` alla email di intestazione o ad ogni singola patch spiegando 345 345 le differenze rispetto a sottomissioni precedenti (vedere 346 346 :ref:`it_the_canonical_patch_format`).
+97
Documentation/translations/sp_SP/process/code-of-conduct.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: :ref:`Documentation/process/code-of-conduct.rst <code_of_conduct>` 4 + :Translator: Contributor Covenant and Carlos Bilbao <carlos.bilbao@amd.com> 5 + 6 + .. _sp_code_of_conduct: 7 + 8 + Código de Conducta para Contribuyentes 9 + +++++++++++++++++++++++++++++++++++++++ 10 + 11 + Nuestro Compromiso 12 + ================== 13 + 14 + Nosotros, como miembros, contribuyentes y administradores nos comprometemos 15 + a hacer de la participación en nuestra comunidad una experiencia libre de 16 + acoso para todo el mundo, independientemente de la edad, dimensión corporal, 17 + minusvalía visible o invisible, etnicidad, características sexuales, 18 + identidad y expresión de género, nivel de experiencia, educación, nivel 19 + socio-económico, nacionalidad, apariencia personal, raza, religión, o 20 + identidad u orientación sexual. Nos comprometemos a actuar e interactuar de 21 + maneras que contribuyan a una comunidad abierta, acogedora, diversa, 22 + inclusiva y sana. 23 + 24 + Nuestros Estándares 25 + =================== 26 + 27 + Ejemplos de comportamiento que contribuyen a crear un ambiente positivo 28 + para nuestra comunidad: 29 + 30 + * Demostrar empatía y amabilidad ante otras personas 31 + * Respeto a diferentes opiniones, puntos de vista y experiencias 32 + * Dar y aceptar adecuadamente retroalimentación constructiva 33 + * Aceptar la responsabilidad y disculparse ante quienes se vean afectados 34 + por nuestros errores, aprendiendo de la experiencia 35 + * Centrarse en lo que sea mejor no sólo para nosotros como individuos, sino 36 + para la comunidad en general 37 + 38 + 39 + Ejemplos de comportamiento inaceptable: 40 + 41 + * El uso de lenguaje o imágenes sexualizadas, y aproximaciones o 42 + atenciones sexuales de cualquier tipo 43 + * Comentarios despectivos (trolling), insultantes o derogatorios, y ataques 44 + personales o políticos 45 + * El acoso en público o privado 46 + * Publicar información privada de otras personas, tales como direcciones 47 + físicas o de correo 48 + electrónico, sin su permiso explícito 49 + * Otras conductas que puedan ser razonablemente consideradas como 50 + inapropiadas en un entorno profesional 51 + 52 + 53 + Aplicación de las responsabilidades 54 + =================================== 55 + 56 + Los administradores de la comunidad son responsables de aclarar y hacer 57 + cumplir nuestros estándares de comportamiento aceptable y tomarán acciones 58 + apropiadas y correctivas de forma justa en respuesta a cualquier 59 + comportamiento que consideren inapropiado, amenazante, ofensivo o dañino. 60 + 61 + Los administradores de la comunidad tendrán el derecho y la responsabilidad 62 + de eliminar, editar o rechazar comentarios, commits, código, ediciones de 63 + páginas de wiki, issues y otras contribuciones que no se alineen con este 64 + Código de Conducta, y comunicarán las razones para sus decisiones de 65 + moderación cuando sea apropiado. 66 + 67 + Alcance 68 + ======= 69 + 70 + Este código de conducta aplica tanto a espacios del proyecto como a 71 + espacios públicos donde un individuo esté en representación del proyecto o 72 + comunidad. Ejemplos de esto incluyen el uso de la cuenta oficial de correo 73 + electrónico, publicaciones a través de las redes sociales oficiales, o 74 + presentaciones con personas designadas en eventos en línea o no. 75 + 76 + Aplicación 77 + ========== 78 + 79 + Instancias de comportamiento abusivo, acosador o inaceptable de otro modo 80 + podrán ser reportadas contactando el Code of Conduct Commitee a través de 81 + <conduct@kernel.org>. Todas las quejas serán evaluadas e investigadas de 82 + una manera puntual y justa. El Code of Condut Commitee está obligados a 83 + respetar la privacidad y la seguridad de quienes reporten incidentes. 84 + Detalles de políticas y aplicación en particular, serán incluidos por 85 + separado. 86 + 87 + Atribución 88 + ========== 89 + 90 + Este Código de Conducta es una adaptación del Contributor Covenant, versión 91 + 1.4, disponible en https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 92 + 93 + Interpretación 94 + ============== 95 + 96 + Consulte el documento :ref:`code_of_conduct_interpretation` para ver cómo 97 + interpretará la comunidad del kernel Linux este documento.
+374
Documentation/translations/sp_SP/process/email-clients.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: :ref:`Documentation/process/email-clients.rst <email_clients>` 4 + :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 5 + 6 + .. _sp_email_clients: 7 + 8 + Información de clientes de correo electrónico para Linux 9 + ======================================================== 10 + 11 + Git 12 + --- 13 + 14 + A día de hoy, la mayoría de los desarrolladores usan ``git send-email`` en 15 + lugar de los clientes de correo electrónico normales. La página de manual 16 + para esto es bastante buena. En la recepción del correo, los maintainers 17 + usan ``git am`` para aplicar los parches. 18 + 19 + Si es usted nuevo en ``git`` entonces envíese su primer parche. Guárdelo 20 + como texto sin formato, incluidos todos los encabezados. Ejecute ``git am raw_email.txt`` 21 + y luego revise el registro de cambios con ``git log``. Cuando eso funcione, 22 + envíe el parche a la(s) lista(s) de correo apropiada(s). 23 + 24 + Preferencias Generales 25 + ---------------------- 26 + 27 + Los parches para el kernel de Linux se envían por correo electrónico, 28 + preferiblemente como texto en línea en el cuerpo del correo electrónico. 29 + Algunos maintainers aceptan archivos adjuntos, pero entonces los archivos 30 + adjuntos deben tener tipo de contenido ``text/plain``. Sin embargo, los 31 + archivos adjuntos generalmente están mal vistos porque hacen que citar 32 + partes del parche sea más difícil durante el proceso de revisión del 33 + parche. 34 + 35 + También se recomienda encarecidamente que utilice texto sin formato en el 36 + cuerpo del correo electrónico, para parches y otros correos electrónicos 37 + por igual. https://useplaintext.email puede ser útil para obtener 38 + información sobre cómo configurar su cliente de correo electrónico 39 + preferido, así como una lista de clientes de correo electrónico 40 + recomendados si aún no tiene una preferencia. 41 + 42 + Los clientes de correo electrónico que se utilizan para los parches del 43 + kernel Linux deben enviar el texto del parche intacto. Por ejemplo, no 44 + deben modificar ni eliminar pestañas o espacios, incluso al principio o al 45 + final de las líneas. 46 + 47 + No envíe parches con ``format=flowed``. Esto puede causar saltos de línea 48 + no deseados e inesperados. 49 + 50 + No deje que su cliente de correo electrónico ajuste automáticamente las 51 + palabras por usted. Esto también puede corromper su parche. 52 + 53 + Los clientes de correo electrónico no deben modificar la codificación del 54 + de caracteres del texto. Los parches enviados por correo electrónico deben 55 + estar en codificación ASCII o UTF-8 únicamente. Si configura su cliente de 56 + correo electrónico para enviar correos electrónicos con codificación UTF-8, 57 + evite algunos posibles problemas con los caracteres. 58 + 59 + Los clientes de correo electrónico deben generar y mantener los 60 + encabezados "References:" o "In-Reply-To:" para que el hilo de correo no 61 + se rompa. 62 + 63 + Copiar y pegar (o cortar y pegar) generalmente no funciona para los 64 + parches, porque las tabulaciones se convierten en espacios. Utilizar 65 + xclipboard, xclip y/o xcutsel puede funcionar, pero es mejor probarlo usted 66 + mismo o simplemente evitar copiar y pegar. 67 + 68 + No utilice firmas PGP/GPG en el correo que contiene parches. 69 + Esto rompe muchos scripts que leen y aplican los parches. 70 + (Esto debería ser reparable.) 71 + 72 + Es una buena idea enviarse un parche a sí mismo, guardar el mensaje 73 + recibido, y aplicarlo con éxito con 'patch' antes de enviar el parche a las 74 + listas de correo de Linux. 75 + 76 + Algunas sugerencias para el cliente de correo electrónico (MUA) 77 + --------------------------------------------------------------- 78 + 79 + Aquí hay algunos consejos específicos de configuración de MUA para editar y 80 + enviar parches para el kernel de Linux. Estos no pretenden cubrir todo 81 + detalle de configuración de los paquetes de software. 82 + 83 + Leyenda: 84 + 85 + - TUI = text-based user interface (interfaz de usuario basada en texto) 86 + - GUI = graphical user interface (interfaz de usuario gráfica) 87 + 88 + Alpine (TUI) 89 + ************ 90 + 91 + Opciones de configuración: 92 + 93 + En la sección :menuselection:`Sending Preferences`: 94 + 95 + - :menuselection: `Do Not Send Flowed Text` debe estar ``enabled`` 96 + - :menuselection:`Strip Whitespace Before Sending` debe estar ``disabled`` 97 + 98 + Al redactar el mensaje, el cursor debe colocarse donde el parche debería 99 + aparecer, y luego presionando :kbd:`CTRL-R` se le permite especificar e 100 + archivo de parche a insertar en el mensaje. 101 + 102 + Claws Mail (GUI) 103 + **************** 104 + 105 + Funciona. Algunos usan esto con éxito para los parches. 106 + 107 + Para insertar un parche haga :menuselection:`Message-->Insert File` (:kbd:`CTRL-I`) 108 + o use un editor externo. 109 + 110 + Si el parche insertado debe editarse en la ventana de composición de Claws 111 + "Auto wrapping" en 112 + :menuselection:`Configuration-->Preferences-->Compose-->Wrapping` debe 113 + permanecer deshabilitado. 114 + 115 + Evolution (GUI) 116 + *************** 117 + 118 + Algunos usan esto con éxito para sus parches. 119 + 120 + Cuando escriba un correo seleccione: Preformat 121 + desde :menuselection:`Format-->Paragraph Style-->Preformatted` (:kbd:`CTRL-7`) 122 + o en la barra de herramientas 123 + 124 + Luego haga: 125 + :menuselection:`Insert-->Text File...` (:kbd:`ALT-N x`) 126 + para insertar el parche. 127 + 128 + También puede hacer ``diff -Nru old.c new.c | xclip``, seleccione 129 + :menuselection:`Preformat`, luego pege con el boton del medio. 130 + 131 + Kmail (GUI) 132 + *********** 133 + 134 + Algunos usan Kmail con éxito para los parches. 135 + 136 + La configuración predeterminada de no redactar en HTML es adecuada; no haga 137 + cambios en esto. 138 + 139 + Al redactar un correo electrónico, en las opciones, desmarque "word wrap". 140 + La única desventaja es que cualquier texto que escriba en el correo 141 + electrónico no se ajustará a cada palabra, por lo que tendrá que ajustar 142 + manualmente el texto antes del parche. La forma más fácil de evitar esto es 143 + redactar su correo electrónico con Word Wrap habilitado, luego guardar 144 + como borrador. Una vez que lo vuelva a sacar de sus borradores, estará 145 + envuelto por palabras y puede desmarcar "word wrap" sin perder el existente 146 + texto. 147 + 148 + En la parte inferior de su correo electrónico, coloque el delimitador de 149 + parche de uso común antes de insertar su parche: tres guiones (``---``). 150 + 151 + Luego desde la opción de menu :menuselection:`Message` seleccione 152 + :menuselection:`insert file` y busque su parche. 153 + De forma adicional, puede personalizar el menú de la barra de herramientas 154 + de creación de mensajes y poner el icono :menuselection:`insert file`. 155 + 156 + Haga que la ventana del editor sea lo suficientemente ancha para que no se 157 + envuelva ninguna línea. A partir de KMail 1.13.5 (KDE 4.5.4), KMail 158 + aplicará ajuste de texto al enviar el correo electrónico si las líneas se 159 + ajustan en la ventana del redactor. Tener ajuste de palabras deshabilitado 160 + en el menú Opciones no es suficiente. Por lo tanto, si su parche tiene 161 + líneas muy largas, debe hacer que la ventana del redactor sea muy amplia 162 + antes de enviar el correo electrónico. Consulte: https://bugs.kde.org/show_bug.cgi?id=174034 163 + 164 + You can safely GPG sign attachments, but inlined text is preferred for 165 + patches so do not GPG sign them. Signing patches that have been inserted 166 + as inlined text will make them tricky to extract from their 7-bit encoding. 167 + 168 + Puede firmar archivos adjuntos con GPG de forma segura, pero se prefiere el 169 + texto en línea para parches, así que no los firme con GPG. Firmar parches 170 + que se han insertado como texto en línea hará que sea difícil extraerlos de 171 + su codificación de 7 bits. 172 + 173 + Si es absolutamente necesario enviar parches como archivos adjuntos en 174 + lugar de como texto en línea, haga clic con el botón derecho en el archivo 175 + adjunto y seleccione :menuselection:`properties`, y luego 176 + :menuselection:`Suggest automatic display` para hacer que el archivo 177 + adjunto esté en línea para que sea más visible. 178 + 179 + Al guardar parches que se envían como texto en línea, seleccione el correo 180 + electrónico que contiene el parche del panel de la lista de mensajes, haga 181 + clic con el botón derecho y seleccione :menuselection:`save as`. Puede usar 182 + todo el correo electrónico sin modificar como un parche de estar bien 183 + compuesto. Los correos electrónicos se guardan como lectura y escritura 184 + solo para el usuario, por lo que tendrá que cambiarlos para que sean 185 + legibles en grupo y en todo el mundo si copia estos en otro lugar. 186 + 187 + Notas de Lotus (GUI) 188 + ******************** 189 + 190 + Huya de este. 191 + 192 + IBM Verse (Web GUI) 193 + ******************* 194 + 195 + Vea notas sobre Lotus. 196 + 197 + Mutt (TUI) 198 + ********** 199 + 200 + Muchos desarrolladores de Linux usan ``mutt``, por lo que debe funcionar 201 + bastante bien. 202 + 203 + Mutt no viene con un editor, por lo que cualquier editor que use debe ser 204 + utilizado de forma que no haya saltos de línea automáticos. La mayoría de 205 + los editores tienen una opción :menuselection:`insert file` que inserta el 206 + contenido de un archivo inalterado. 207 + 208 + Para usar ``vim`` con mutt:: 209 + 210 + set editor="vi" 211 + 212 + Si utiliza xclip, escriba el comando:: 213 + 214 + :set paste 215 + 216 + antes del boton del medio o shift-insert o use:: 217 + 218 + :r filename 219 + 220 + si desea incluir el parche en línea. 221 + (a)ttach (adjuntar) funciona bien sin ``set paste``. 222 + 223 + También puedes generar parches con ``git format-patch`` y luego usar Mutt 224 + para enviarlos:: 225 + 226 + $ mutt -H 0001-some-bug-fix.patch 227 + 228 + Opciones de configuración: 229 + 230 + Debería funcionar con la configuración predeterminada. 231 + Sin embargo, es una buena idea establecer ``send_charset`` en: 232 + 233 + set send_charset="us-ascii:utf-8" 234 + 235 + Mutt es altamente personalizable. Aquí tiene una configuración mínima para 236 + empezar a usar Mutt para enviar parches a través de Gmail:: 237 + 238 + # .muttrc 239 + # ================ IMAP ==================== 240 + set imap_user = 'suusuario@gmail.com' 241 + set imap_pass = 'sucontraseña' 242 + set spoolfile = imaps://imap.gmail.com/INBOX 243 + set folder = imaps://imap.gmail.com/ 244 + set record="imaps://imap.gmail.com/[Gmail]/Sent Mail" 245 + set postponed="imaps://imap.gmail.com/[Gmail]/Drafts" 246 + set mbox="imaps://imap.gmail.com/[Gmail]/All Mail" 247 + 248 + # ================ SMTP ==================== 249 + set smtp_url = "smtp://username@smtp.gmail.com:587/" 250 + set smtp_pass = $imap_pass 251 + set ssl_force_tls = yes # Requerir conexión encriptada 252 + 253 + # ================ Composición ==================== 254 + set editor = `echo \$EDITOR` 255 + set edit_headers = yes # Ver los encabezados al editar 256 + set charset = UTF-8 # valor de $LANG; also fallback for send_charset 257 + # El remitente, la dirección de correo electrónico y la línea de firma deben coincidir 258 + unset use_domain # Porque joe@localhost es simplemente vergonzoso 259 + set realname = "SU NOMBRE" 260 + set from = "username@gmail.com" 261 + set use_from = yes 262 + 263 + Los documentos Mutt tienen mucha más información: 264 + 265 + https://gitlab.com/muttmua/mutt/-/wikis/UseCases/Gmail 266 + 267 + http://www.mutt.org/doc/manual/ 268 + 269 + Pine (TUI) 270 + ********** 271 + 272 + Pine ha tenido algunos problemas de truncamiento de espacios en blanco en 273 + el pasado, pero estos todo debería estar arreglados ahora. 274 + 275 + Use alpine (sucesor de pino) si puede. 276 + 277 + Opciones de configuración: 278 + 279 + - ``quell-flowed-text`` necesitado para versiones actuales 280 + - la opción ``no-strip-whitespace-before-send`` es necesaria 281 + 282 + 283 + Sylpheed (GUI) 284 + ************** 285 + 286 + - Funciona bien para insertar texto (o usar archivos adjuntos). 287 + - Permite el uso de un editor externo. 288 + - Es lento en carpetas grandes. 289 + - No realizará la autenticación TLS SMTP en una conexión que no sea SSL. 290 + - Tiene una útil barra de reglas en la ventana de redacción. 291 + - Agregar direcciones a la libreta de direcciones no las muestra 292 + adecuadamente. 293 + 294 + Thunderbird (GUI) 295 + ***************** 296 + 297 + Thunderbird es un clon de Outlook al que le gusta alterar el texto, pero 298 + hay formas para obligarlo a comportarse. 299 + 300 + Después de hacer las modificaciones, que incluye instalar las extensiones, 301 + necesita reiniciar Thunderbird. 302 + 303 + - Permitir el uso de un editor externo: 304 + 305 + Lo más fácil de hacer con Thunderbird y los parches es usar extensiones 306 + que abran su editor externo favorito. 307 + 308 + Aquí hay algunas extensiones de ejemplo que son capaces de hacer esto. 309 + 310 + - "External Editor Revived" 311 + 312 + https://github.com/Frederick888/external-editor-revived 313 + 314 + https://addons.thunderbird.net/en-GB/thunderbird/addon/external-editor-revived/ 315 + 316 + Requiere instalar un "native messaging host". 317 + Por favor, lea la wiki que se puede encontrar aquí: 318 + https://github.com/Frederick888/external-editor-revived/wiki 319 + 320 + - "External Editor" 321 + 322 + https://github.com/exteditor/exteditor 323 + 324 + Para hacer esto, descargue e instale la extensión, luego abra la ventana 325 + :menuselection:`compose`, agregue un botón para ello usando 326 + :menuselection:`View-->Toolbars-->Customize...` 327 + luego simplemente haga clic en el botón nuevo cuando desee usar el editor 328 + externo. 329 + 330 + Tenga en cuenta que "External Editor" requiere que su editor no haga 331 + fork, o en otras palabras, el editor no debe regresar antes de cerrar. 332 + Es posible que deba pasar flags adicionales o cambiar la configuración 333 + de su editor. En particular, si está utilizando gvim, debe pasar la 334 + opción -f a gvim poniendo ``/usr/bin/gvim --nofork"`` (si el binario 335 + está en ``/usr/bin``) al campo del editor de texto en los ajustes 336 + :menuselection:`external editor`. Si está utilizando algún otro editor, 337 + lea su manual para saber cómo hacer esto. 338 + 339 + Para sacarle algo de sentido al editor interno, haga esto: 340 + 341 + - Edite sus ajustes de configuración de Thunderbird para que no utilice ``format=flowed``! 342 + Vaya a su ventana principal y busque el botón de su menú desplegable principal. 343 + :menuselection:`Main Menu-->Preferences-->General-->Config Editor...` 344 + para abrir el editor de registro de Thunderbird. 345 + 346 + - Seleccione ``mailnews.send_plaintext_flowed`` como ``false`` 347 + 348 + - Seleccione ``mailnews.wraplength`` de ``72`` a ``0`` 349 + 350 + - ¡No escriba mensajes HTML! Acuda a la ventana principal 351 + :menuselection:`Main Menu-->Account Settings-->youracc@server.something-->Composition & Addressing`! 352 + Ahí puede deshabilitar la opción "Compose messages in HTML format". 353 + 354 + - ¡Abra mensajes solo como texto sin formato! Acuda a la ventana principal 355 + :menuselection:`Main Menu-->View-->Message Body As-->Plain Text`! 356 + 357 + TkRat (GUI) 358 + *********** 359 + 360 + Funciona. Utilice "Insert file..." o un editor externo. 361 + 362 + Gmail (Web GUI) 363 + *************** 364 + 365 + No funciona para enviar parches. 366 + 367 + El cliente web de Gmail convierte las tabulaciones en espacios automáticamente. 368 + 369 + Al mismo tiempo, envuelve líneas cada 78 caracteres con saltos de línea de 370 + estilo CRLF aunque el problema de tab2space se puede resolver con un editor 371 + externo. 372 + 373 + Otro problema es que Gmail codificará en base64 cualquier mensaje que tenga 374 + un carácter no ASCII. Eso incluye cosas como nombres europeos.
+4
Documentation/translations/sp_SP/process/index.rst
··· 13 13 submitting-patches 14 14 kernel-docs 15 15 coding-style 16 + code-of-conduct 17 + kernel-enforcement-statement 18 + email-clients 19 + magic-number
+174
Documentation/translations/sp_SP/process/kernel-enforcement-statement.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: :ref:`Documentation/process/kernel-enforcement-statement.rst <process_statement_kernel>` 4 + :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 5 + 6 + .. _sp_process_statement_kernel: 7 + 8 + Aplicación de la licencia en el kernel Linux 9 + ============================================ 10 + 11 + Como desarrolladores del kernel Linux, tenemos un gran interés en cómo se 12 + se utiliza nuestro software y cómo se aplica la licencia de nuestro software. 13 + El cumplimiento de las obligaciones de intercambio recíproco de GPL-2.0 son 14 + fundamentales en el largo plazo para la sostenibilidad de nuestro software 15 + y comunidad. 16 + 17 + Aunque existe el derecho de hacer valer un copyright distinto en las 18 + contribuciones hechas a nuestra comunidad, compartimos el interés de 19 + asegurar que las acciones individuales para proteger estos se lleven a cabo 20 + de una manera que beneficia a nuestra comunidad y no tenga un indeseado 21 + impacto negativo en la salud y crecimiento de nuestro ecosistema de software. 22 + Con el fin de disuadir la aplicación inútil de acciones, estamos de acuerdo 23 + en que es en el mejor interés de nuestro desarrollo como comunidad asumir 24 + el siguiente compromiso con los usuarios del kernel Linux, en nombre 25 + nuestro y de cualquier sucesor de nuestros derechos de autor (copyright): 26 + 27 + Sin perjuicio de las disposiciones de terminación de GPL-2.0, aceptamos 28 + que es en el mejor interés de nuestra comunidad de desarrollo adoptar 29 + las siguientes disposiciones de GPL-3.0 como permisos adicionales bajo 30 + nuestra licencia, con respecto a cualquier interposición de alegación 31 + de infringimiento (en inglés, "non-defensive assertion") de los 32 + derechos bajo la licencia. 33 + 34 + Sin embargo, si deja de violar esta Licencia, entonces su licencia 35 + de copyright como particular se restablece (a) provisionalmente, 36 + a menos que y hasta que el titular de los derechos de autor explícita 37 + y finalmente rescinda su licencia, y (b) de forma permanente, si el 38 + titular de los derechos de autor no le notifica la violación por algún 39 + medio razonable antes de 60 días después del cese. 40 + 41 + Además, su licencia de un titular de derechos de autor en particular es 42 + restablecida permanentemente si el titular de los derechos de autor le 43 + notifica de la violación por algún medio razonable, esta es la primera 44 + vez que ha recibido notificación de violación de esta Licencia (para 45 + cualquier trabajo) de ese titular de los derechos de autor, y subsana 46 + la infracción antes de los 30 días posteriores de recibir el aviso. 47 + 48 + Nuestra intención al proporcionar estas garantías es fomentar un mayor uso 49 + del software. Queremos que empresas y particulares utilicen, modifiquen y 50 + distribuyan este software. Queremos trabajar con los usuarios de forma 51 + abierta y transparente para eliminar cualquier incertidumbre sobre nuestras 52 + expectativas con respecto al cumplimiento que podría limitar la adopción de 53 + nuestro software. Entendemos la acción legal como último recurso, que se 54 + iniciará solo cuando otros esfuerzos de la comunidad no hayan podido 55 + resolver el problema. 56 + 57 + Finalmente, una vez que se resuelva un problema de incumplimiento, 58 + esperamos que el usuario se sienta bienvenido a unirse a nosotros en 59 + nuestros esfuerzos con este proyecto. Trabajando juntos, somos más fuertes. 60 + 61 + Excepto donde se indica a continuación, hablamos solo por nosotros mismos y 62 + no por ninguna compañía donde puede que trabajemos hoy, o hayamos trabajado 63 + en el pasado, o trabajaremos en el futuro. 64 + 65 + - Laura Abbott 66 + - Bjorn Andersson (Linaro) 67 + - Andrea Arcangeli 68 + - Neil Armstrong 69 + - Jens Axboe 70 + - Pablo Neira Ayuso 71 + - Khalid Aziz 72 + - Ralf Baechle 73 + - Felipe Balbi 74 + - Arnd Bergmann 75 + - Ard Biesheuvel 76 + - Tim Bird 77 + - Paolo Bonzini 78 + - Christian Borntraeger 79 + - Mark Brown (Linaro) 80 + - Paul Burton 81 + - Javier Martinez Canillas 82 + - Rob Clark 83 + - Kees Cook (Google) 84 + - Jonathan Corbet 85 + - Dennis Dalessandro 86 + - Vivien Didelot (Savoir-faire Linux) 87 + - Hans de Goede 88 + - Mel Gorman (SUSE) 89 + - Sven Eckelmann 90 + - Alex Elder (Linaro) 91 + - Fabio Estevam 92 + - Larry Finger 93 + - Bhumika Goyal 94 + - Andy Gross 95 + - Juergen Gross 96 + - Shawn Guo 97 + - Ulf Hansson 98 + - Stephen Hemminger (Microsoft) 99 + - Tejun Heo 100 + - Rob Herring 101 + - Masami Hiramatsu 102 + - Michal Hocko 103 + - Simon Horman 104 + - Johan Hovold (Hovold Consulting AB) 105 + - Christophe JAILLET 106 + - Olof Johansson 107 + - Lee Jones (Linaro) 108 + - Heiner Kallweit 109 + - Srinivas Kandagatla 110 + - Jan Kara 111 + - Shuah Khan (Samsung) 112 + - David Kershner 113 + - Jaegeuk Kim 114 + - Namhyung Kim 115 + - Colin Ian King 116 + - Jeff Kirsher 117 + - Greg Kroah-Hartman (Linux Foundation) 118 + - Christian König 119 + - Vinod Koul 120 + - Krzysztof Kozlowski 121 + - Viresh Kumar 122 + - Aneesh Kumar K.V 123 + - Julia Lawall 124 + - Doug Ledford 125 + - Chuck Lever (Oracle) 126 + - Daniel Lezcano 127 + - Shaohua Li 128 + - Xin Long 129 + - Tony Luck 130 + - Catalin Marinas (Arm Ltd) 131 + - Mike Marshall 132 + - Chris Mason 133 + - Paul E. McKenney 134 + - Arnaldo Carvalho de Melo 135 + - David S. Miller 136 + - Ingo Molnar 137 + - Kuninori Morimoto 138 + - Trond Myklebust 139 + - Martin K. Petersen (Oracle) 140 + - Borislav Petkov 141 + - Jiri Pirko 142 + - Josh Poimboeuf 143 + - Sebastian Reichel (Collabora) 144 + - Guenter Roeck 145 + - Joerg Roedel 146 + - Leon Romanovsky 147 + - Steven Rostedt (VMware) 148 + - Frank Rowand 149 + - Ivan Safonov 150 + - Anna Schumaker 151 + - Jes Sorensen 152 + - K.Y. Srinivasan 153 + - David Sterba (SUSE) 154 + - Heiko Stuebner 155 + - Jiri Kosina (SUSE) 156 + - Willy Tarreau 157 + - Dmitry Torokhov 158 + - Linus Torvalds 159 + - Thierry Reding 160 + - Rik van Riel 161 + - Luis R. Rodriguez 162 + - Geert Uytterhoeven (Glider bvba) 163 + - Eduardo Valentin (Amazon.com) 164 + - Daniel Vetter 165 + - Linus Walleij 166 + - Richard Weinberger 167 + - Dan Williams 168 + - Rafael J. Wysocki 169 + - Arvind Yadav 170 + - Masahiro Yamada 171 + - Wei Yongjun 172 + - Lv Zheng 173 + - Marc Zyngier (Arm Ltd) 174 +
+90
Documentation/translations/sp_SP/process/magic-number.rst
··· 1 + .. include:: ../disclaimer-sp.rst 2 + 3 + :Original: :ref:`Documentation/process/magic-number.rst <magicnumbers>` 4 + :Translator: Carlos Bilbao <carlos.bilbao@amd.com> 5 + 6 + .. _sp_magicnumbers: 7 + 8 + Números mágicos de Linux 9 + ======================== 10 + 11 + Este archivo es un registro de los números mágicos que están en uso. Cuando 12 + usted incluya un número mágico a una estructura, también debe agregarlo a 13 + este documento, ya que es mejor si los números mágicos utilizados por 14 + varias estructuras son únicos. 15 + 16 + Es una muy buena idea proteger las estructuras de datos del kernel con 17 + números mágicos. Esto le permite verificar en tiempo de ejecución si (a) 18 + una estructura ha sido manipulada, o (b) ha pasado la estructura incorrecta 19 + a una rutina. Esto último es especialmente útil --- particularmente cuando 20 + pasa punteros a estructuras a través de un puntero void \*. El código tty, 21 + por ejemplo, hace esto con frecuencia para pasar información específica del 22 + driver y líneas de estructuras específicas de protocolo de un lado al 23 + otro. 24 + 25 + La forma de usar números mágicos es declararlos al principio de la 26 + estructura, así:: 27 + 28 + struct tty_ldisc { 29 + int magic; 30 + ... 31 + }; 32 + 33 + Por favor, siga este método cuando agregue futuras mejoras al kernel! Me ha 34 + ahorrado innumerables horas de depuración, especialmente en los casos 35 + complicados donde una matriz ha sido invadida y las estructuras que siguen 36 + a la matriz se han sobrescrito. Usando este método, estos casos se detectan 37 + de forma rápida y segura. 38 + 39 + Changelog:: 40 + 41 + Theodore Ts'o 42 + 31 Mar 94 43 + 44 + La tabla mágica ha sido actualizada para Linux 2.1.55. 45 + 46 + Michael Chastain 47 + <mailto:mec@shout.net> 48 + 22 Sep 1997 49 + 50 + Ahora debería estar actualizada con Linux 2.1.112. Porque 51 + estamos en fase de "feature freeze", es muy poco probable que 52 + algo cambiará antes de 2.2.x. Las entradas son 53 + ordenados por campo numérico. 54 + 55 + Krzysztof G. Baranowski 56 + <mailto: kgb@knm.org.pl> 57 + 29 Jul 1998 58 + 59 + Se actualizó la tabla mágica a Linux 2.5.45. Justo sobre el feature 60 + freeze, pero es posible que algunos nuevos números mágicos se cuelen en 61 + el kernel antes de 2.6.x todavía. 62 + 63 + Petr Baudis 64 + <pasky@ucw.cz> 65 + 03 Nov 2002 66 + 67 + La tabla mágica ha sido actualizada para Linux 2.5.74. 68 + 69 + Fabian Frederick 70 + <ffrederick@users.sourceforge.net> 71 + 09 Jul 2003 72 + 73 + ===================== ================ ======================== ========================================== 74 + Magic Name Number Structure File 75 + ===================== ================ ======================== ========================================== 76 + PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h`` 77 + APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` 78 + FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` 79 + SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` 80 + MGSLPC_MAGIC 0x5402 mgslpc_info ``drivers/char/pcmcia/synclink_cs.c`` 81 + BAYCOM_MAGIC 0x19730510 baycom_state ``drivers/net/baycom_epp.c`` 82 + HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state ``include/linux/hdlcdrv.h`` 83 + KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` 84 + CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h`` 85 + YAM_MAGIC 0xF10A7654 yam_port ``drivers/net/hamradio/yam.c`` 86 + CCB_MAGIC 0xf2691ad2 ccb ``drivers/scsi/ncr53c8xx.c`` 87 + QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry ``drivers/scsi/arm/queue.c`` 88 + QUEUE_MAGIC_USED 0xf7e1cc33 queue_entry ``drivers/scsi/arm/queue.c`` 89 + NMI_MAGIC 0x48414d4d455201 nmi_s ``arch/mips/include/asm/sn/nmi.h`` 90 + ===================== ================ ======================== ==========================================
+11
Documentation/translations/zh_CN/PCI/msi-howto.rst
··· 231 231 232 232 也需要检查设备驱动程序,看它是否支持MSI。例如,它可能包含对带有PCI_IRQ_MSI或 233 233 PCI_IRQ_MSIX标志的pci_alloc_irq_vectors()的调用。 234 + 235 + 236 + MSI(-X) APIs设备驱动程序列表 237 + ============================ 238 + 239 + PCI/MSI子系统有一个专门的C文件,用于其导出的设备驱动程序APIs - `drivers/pci/msi/api.c` 。 240 + 以下是导出的函数: 241 + 242 + 该API在以下内核代码中: 243 + 244 + drivers/pci/msi/api.c
+5 -2
Documentation/translations/zh_CN/accounting/delay-accounting.rst
··· 17 17 b) 完成由该任务发起的块I/O同步请求 18 18 c) 页面交换 19 19 d) 内存回收 20 - e) 页缓存抖动 20 + e) 抖动 21 21 f) 直接规整 22 + g) 写保护复制 22 23 23 24 并将这些统计信息通过taskstats接口提供给用户空间。 24 25 ··· 43 42 include/uapi/linux/taskstats.h 44 43 45 44 其描述了延时计数相关字段。系统通常以计数器形式返回 CPU、同步块 I/O、交换、内存 46 - 回收、页缓存抖动、直接规整等的累积延时。 45 + 回收、页缓存抖动、直接规整、写保护复制等的累积延时。 47 46 48 47 取任务某计数器两个连续读数的差值,将得到任务在该时间间隔内等待对应资源的总延时。 49 48 ··· 101 100 0 0 0ms 102 101 COMPACT count delay total delay average 103 102 0 0 0ms 103 + WPCOPY count delay total delay average 104 + 0 0 0ms 104 105 105 106 获取pid为1的IO计数,它只和-p一起使用:: 106 107 # ./getdelays -i -p 1
+1
Documentation/translations/zh_CN/admin-guide/mm/damon/index.rst
··· 22 22 start 23 23 usage 24 24 reclaim 25 + lru_sort 25 26 26 27 27 28
+263
Documentation/translations/zh_CN/admin-guide/mm/damon/lru_sort.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + .. include:: ../../../disclaimer-zh_CN.rst 3 + 4 + :Original: Documentation/admin-guide/mm/damon/lru_sort.rst 5 + 6 + :翻译: 7 + 8 + 臧雷刚 Leigang Zang <zangleigang@hisilicon.com> 9 + 10 + :校译: 11 + 12 + ================== 13 + 基于DAMON的LRU排序 14 + ================== 15 + 16 + 基于DAMON的LRU排序是一个静态的内核模块,旨在用于以主动的、轻量级的数据访问模型 17 + 为基础的页面优先级处理的LRU链表上,以使得LRU上的数据访问模型更为可信。 18 + 19 + 哪里需要主动的LRU排序 20 + ===================== 21 + 22 + 在一个大型系统中,以页为粒度的访问检测会有比较显著的开销,LRU通常不会主动去排序, 23 + 而是对部分特殊事件进行部分的、响应式的排序,例如:特殊的用户请求,系统调用或者 24 + 内存压力。这导致,在有些场景下,LRU不能够完美的作为一个可信的数据访问模型,比如 25 + 在内存压力下对目标内存进行回收。 26 + 27 + 因为DAMON能够尽可能准确的识别数据访问模型,同时只引起用户指定范围的开销,主动的 28 + 执行DAMON_LRU_SORT让LRU变得更为可信是有益的,而且这只需要较少和可控的开销。 29 + 30 + 这是如何工作的 31 + ============== 32 + 33 + DAMON_LRU_SORT使用DAMON寻找热页(范围内的页面访问频率高于用户指定的阈值)和冷页 34 + (范围内的页面在超过用户指定的时间无访问),并提高热页和降低冷页在LRU中的优先级。 35 + 为了避免在排序过程占用更多的CPU计算资源,可以设置一个CPU占用时间的约束值。在约 36 + 束下,分别提升或者降低更多的热页和冷页。系统管理员也可以配置三个内存水位以控制 37 + 在何种条件下自动激活或者停止这种机制。 38 + 39 + 冷热阈值和CPU约束的默认值是比较保守的。这意味着,在默认参数下,模块可以广泛且无 40 + 负作用的使用在常见环境中,同时在只消耗一小部分CPU时间的情况下,给有内存压力的系 41 + 统提供一定水平的冷热识别。 42 + 43 + 接口:模块参数 44 + ============== 45 + 46 + 使用此特性,你首先需要确认你的系统中运行的内核在编译时启用了 47 + ``CONFIG_DAMON_LRU_SORT=y``. 48 + 49 + 为了让系统管理员打开或者关闭并且调节指定的系统,DAMON_LRU_SORT设计了模块参数。 50 + 这意味着,你可以添加 ``damon_lru_sort.<parameter>=<value>`` 到内核的启动命令行 51 + 参数,或者在 ``/sys/modules/damon_lru_sort/parameters/<parameter>`` 写入正确的 52 + 值。 53 + 54 + 下边是每个参数的描述 55 + 56 + enabled 57 + ------- 58 + 59 + 打开或者关闭DAMON_LRU_SORT. 60 + 61 + 你可以通过设置这个参数为 ``Y`` 来打开DAMON_LRU_SORT。设置为 ``N`` 关闭 62 + DAMON_LRU_SORT。注意,在基于水位的激活的情况下,DAMON_LRU_SORT有可能不会真正去 63 + 监测或者做LRU排序。对这种情况,参考下方关于水位的描述。 64 + 65 + commit_inputs 66 + ------------- 67 + 68 + 让DAMON_LRU_SORT再次读取输入参数,除了 ``enabled`` 。 69 + 70 + 在DAMON_LRU_SORT运行时,新的输入参数默认不会被应用。一旦这个参数被设置为 ``Y`` 71 + ,DAMON_LRU_SORT会再次读取除了 ``enabled`` 之外的参数。读取完成后,这个参数会被 72 + 设置为 ``N`` 。如果在读取时发现有无效参数,DAMON_LRU_SORT会被关闭。 73 + 74 + hot_thres_access_freq 75 + --------------------- 76 + 77 + 热点内存区域的访问频率阈值,千分比。 78 + 79 + 如果一个内存区域的访问频率大于等于这个值,DAMON_LRU_SORT把这个区域看作热区,并 80 + 在LRU上把这个区域标记为已访问,因些在内存压力下这部分内存不会被回收。默认为50%。 81 + 82 + cold_min_age 83 + ------------ 84 + 85 + 用于识别冷内存区域的时间阈值,单位是微秒。 86 + 87 + 如果一个内存区域在这个时间内未被访问过,DAMON_LRU_SORT把这个区域看作冷区,并在 88 + LRU上把这个区域标记为未访问,因此在内存压力下这些内存会首先被回收。默认值为120 89 + 秒。 90 + 91 + quota_ms 92 + -------- 93 + 94 + 尝试LRU链表排序的时间限制,单位是毫秒。 95 + 96 + DAMON_LRU_SORT在一个时间窗口内(quota_reset_interval_ms)内最多尝试这么长时间来 97 + 对LRU进行排序。这个可以用来作为CPU计算资源的约束。如果值为0,则表示无限制。 98 + 99 + 默认10毫秒。 100 + 101 + quota_reset_interval_ms 102 + ----------------------- 103 + 104 + 配额计时重置周期,毫秒。 105 + 106 + 配额计时重置周期。即,在quota_reset_interval_ms毫秒内,DAMON_LRU_SORT对LRU进行 107 + 排序不会超过quota_ms或者quota_sz。 108 + 109 + 默认1秒。 110 + 111 + wmarks_interval 112 + --------------- 113 + 114 + 水位的检查周期,单位是微秒。 115 + 116 + 当DAMON_LRU_SORT使能但是由于水位而不活跃时检查水位前最小的等待时间。默认值5秒。 117 + 118 + wmarks_high 119 + ----------- 120 + 121 + 空闲内存高水位,千分比。 122 + 123 + 如果空闲内存水位高于这个值,DAMON_LRU_SORT停止工作,不做任何事,除了周期性的检 124 + 查水位。默认200(20%)。 125 + 126 + wmarks_mid 127 + ---------- 128 + 129 + 空闲内存中间水位,千分比。 130 + 131 + 如果空闲内存水位在这个值与低水位之间,DAMON_LRU_SORT开始工作,开始检测并对LRU链 132 + 表进行排序。默认150(15%)。 133 + 134 + wmarks_low 135 + ---------- 136 + 137 + 空闲内存低水位,千分比。 138 + 139 + 如果空闲内存小于这个值,DAMON_LRU_SORT不再工作,不做任何事,除了周期性的检查水 140 + 线。默认50(5%)。 141 + 142 + sample_interval 143 + --------------- 144 + 145 + 监测的采样周期,微秒。 146 + 147 + DAMON对冷内存监测的采样周期。更多细节请参考DAMON文档 (:doc:`usage`) 。默认5 148 + 毫秒。 149 + 150 + aggr_interval 151 + ------------- 152 + 153 + 监测的收集周期,微秒。 154 + 155 + DAMON对冷内存进行收集的时间周期。更多细节请参考DAMON文档 (:doc:`usage`) 。默认 156 + 100毫秒。 157 + 158 + min_nr_regions 159 + -------------- 160 + 161 + 最小监测区域数量。 162 + 163 + 对冷内存区域监测的最小数量。这个值可以作为监测质量的下限。不过,这个值设置的过 164 + 大会增加开销。更多细节请参考DAMON文档 (:doc:`usage`) 。默认值为10。 165 + 166 + max_nr_regions 167 + -------------- 168 + 169 + 最大监测区域数量。 170 + 171 + 对冷内存区域监测的最大数量。这个值可以作为监测质量的上限。然而,这个值设置的过 172 + 低会导致监测结果变差。更多细节请参考DAMON文档 (:doc:`usage`) 。默认值为1000。 173 + 174 + monitor_region_start 175 + -------------------- 176 + 177 + 目标内存区域的起始物理地址。 178 + 179 + DAMON_LRU_SORT要处理的目标内存区域的起始物理地址。默认,使用系统最大内存。 180 + 181 + monitor_region_end 182 + ------------------ 183 + 184 + 目标内存区域的结束物理地址。 185 + 186 + DAMON_LRU_SORT要处理的目标内存区域的结束物理地址。默认,使用系统最大内存。 187 + 188 + kdamond_pid 189 + ----------- 190 + 191 + DAMON线程的PID。 192 + 193 + 如果DAMON_LRU_SORT是使能的,这个表示任务线程的PID。其它情况为-1。 194 + 195 + nr_lru_sort_tried_hot_regions 196 + ----------------------------- 197 + 198 + 被尝试进行LRU排序的热内存区域的数量。 199 + 200 + bytes_lru_sort_tried_hot_regions 201 + -------------------------------- 202 + 203 + 被尝试进行LRU排序的热内存区域的大小(字节)。 204 + 205 + nr_lru_sorted_hot_regions 206 + ------------------------- 207 + 208 + 成功进行LRU排序的热内存区域的数量。 209 + 210 + bytes_lru_sorted_hot_regions 211 + ---------------------------- 212 + 213 + 成功进行LRU排序的热内存区域的大小(字节)。 214 + 215 + nr_hot_quota_exceeds 216 + -------------------- 217 + 218 + 热区域时间约束超过限制的次数。 219 + 220 + nr_lru_sort_tried_cold_regions 221 + ------------------------------ 222 + 223 + 被尝试进行LRU排序的冷内存区域的数量。 224 + 225 + bytes_lru_sort_tried_cold_regions 226 + --------------------------------- 227 + 228 + 被尝试进行LRU排序的冷内存区域的大小(字节)。 229 + 230 + nr_lru_sorted_cold_regions 231 + -------------------------- 232 + 233 + 成功进行LRU排序的冷内存区域的数量。 234 + 235 + bytes_lru_sorted_cold_regions 236 + ----------------------------- 237 + 238 + 成功进行LRU排序的冷内存区域的大小(字节)。 239 + 240 + nr_cold_quota_exceeds 241 + --------------------- 242 + 243 + 冷区域时间约束超过限制的次数。 244 + 245 + Example 246 + ======= 247 + 248 + 如下是一个运行时的命令示例,使DAMON_LRU_SORT查找访问频率超过50%的区域并对其进行 249 + LRU的优先级的提升,同时降低那些超过120秒无人访问的内存区域的优先级。优先级的处 250 + 理被限制在最多1%的CPU以避免DAMON_LRU_SORT消费过多CPU时间。在系统空闲内存超过50% 251 + 时DAMON_LRU_SORT停止工作,并在低于40%时重新开始工作。如果DAMON_RECLAIM没有取得 252 + 进展且空闲内存低于20%,再次让DAMON_LRU_SORT停止工作,以此回退到以LRU链表为基础 253 + 以页面为单位的内存回收上。 254 + 255 + # cd /sys/modules/damon_lru_sort/parameters 256 + # echo 500 > hot_thres_access_freq 257 + # echo 120000000 > cold_min_age 258 + # echo 10 > quota_ms 259 + # echo 1000 > quota_reset_interval_ms 260 + # echo 500 > wmarks_high 261 + # echo 400 > wmarks_mid 262 + # echo 200 > wmarks_low 263 + # echo Y > enabled
+2 -6
Documentation/translations/zh_CN/admin-guide/mm/damon/reclaim.rst
··· 45 45 46 46 为了让系统管理员启用或禁用它,并为给定的系统进行调整,DAMON_RECLAIM利用了模块参数。也就 47 47 是说,你可以把 ``damon_reclaim.<parameter>=<value>`` 放在内核启动命令行上,或者把 48 - 适当的值写入 ``/sys/modules/damon_reclaim/parameters/<parameter>`` 文件。 49 - 50 - 注意,除 ``启用`` 外的参数值只在DAMON_RECLAIM启动时应用。因此,如果你想在运行时应用新 51 - 的参数值,而DAMON_RECLAIM已经被启用,你应该通过 ``启用`` 的参数文件禁用和重新启用它。 52 - 在重新启用之前,应将新的参数值写入适当的参数值中。 48 + 适当的值写入 ``/sys/module/damon_reclaim/parameters/<parameter>`` 文件。 53 49 54 50 下面是每个参数的描述。 55 51 ··· 214 218 就开始真正的工作。如果DAMON_RECLAIM没有取得进展,因此空闲内存率低于20%,它会要求 215 219 DAMON_RECLAIM再次什么都不做,这样我们就可以退回到基于LRU列表的页面粒度回收了:: 216 220 217 - # cd /sys/modules/damon_reclaim/parameters 221 + # cd /sys/module/damon_reclaim/parameters 218 222 # echo 30000000 > min_age 219 223 # echo $((1 * 1024 * 1024 * 1024)) > quota_sz 220 224 # echo 1000 > quota_reset_interval_ms
+2 -10
Documentation/translations/zh_CN/admin-guide/mm/damon/start.rst
··· 34 34 https://github.com/awslabs/damo找到。下面的例子假设DAMO在你的$PATH上。当然,但 35 35 这并不是强制性的。 36 36 37 - 因为DAMO使用的是DAMON的debugfs接口(详情请参考 :doc:`usage` 中的使用方法) 你应该 38 - 确保debugfs被挂载。手动挂载它,如下所示:: 39 - 40 - # mount -t debugfs none /sys/kernel/debug/ 41 - 42 - 或者在你的 ``/etc/fstab`` 文件中添加以下一行,这样你的系统就可以在启动时自动挂载 43 - debugfs了:: 44 - 45 - debugfs /sys/kernel/debug debugfs defaults 0 0 46 - 37 + 因为DAMO使用了DAMON的sysfs接口(详情请参考:doc:`usage`),你应该确保 38 + :doc:`sysfs </filesystems/sysfs>` 被挂载。 47 39 48 40 记录数据访问模式 49 41 ================
+50 -18
Documentation/translations/zh_CN/admin-guide/mm/damon/usage.rst
··· 46 46 对于一个简短的例子,用户可以监测一个给定工作负载的虚拟地址空间,如下所示:: 47 47 48 48 # cd /sys/kernel/mm/damon/admin/ 49 - # echo 1 > kdamonds/nr && echo 1 > kdamonds/0/contexts/nr 49 + # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts 50 50 # echo vaddr > kdamonds/0/contexts/0/operations 51 - # echo 1 > kdamonds/0/contexts/0/targets/nr 52 - # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid 51 + # echo 1 > kdamonds/0/contexts/0/targets/nr_targets 52 + # echo $(pidof <workload>) > kdamonds/0/contexts/0/targets/0/pid_target 53 53 # echo on > kdamonds/0/state 54 54 55 55 文件层次结构 ··· 82 82 │ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil 83 83 │ │ │ │ │ │ │ watermarks/metric,interval_us,high,mid,low 84 84 │ │ │ │ │ │ │ stats/nr_tried,sz_tried,nr_applied,sz_applied,qt_exceeds 85 + │ │ │ │ │ │ │ tried_regions/ 86 + │ │ │ │ │ │ │ │ 0/start,end,nr_accesses,age 87 + │ │ │ │ │ │ │ │ ... 85 88 │ │ │ │ │ │ ... 86 89 │ │ │ │ ... 87 90 │ │ ... ··· 114 111 读取 ``state`` 时,如果kdamond当前正在运行,则返回 ``on`` ,如果没有运行则返回 ``off`` 。 115 112 写入 ``on`` 或 ``off`` 使kdamond处于状态。向 ``state`` 文件写 ``update_schemes_stats`` , 116 113 更新kdamond的每个基于DAMON的操作方案的统计文件的内容。关于统计信息的细节,请参考 117 - :ref:`stats section <sysfs_schemes_stats>`. 114 + :ref:`stats section <sysfs_schemes_stats>`. 将 ``update_schemes_tried_regions`` 写到 115 + ``state`` 文件,为kdamond的每个基于DAMON的操作方案,更新基于DAMON的操作方案动作的尝试区域目录。 116 + 将`clear_schemes_tried_regions`写入`state`文件,清除kdamond的每个基于DAMON的操作方案的动作 117 + 尝试区域目录。 关于基于DAMON的操作方案动作尝试区域目录的细节,请参考:ref:tried_regions 部分 118 + <sysfs_schemes_tried_regions>`。 118 119 119 120 如果状态为 ``on``,读取 ``pid`` 显示kdamond线程的pid。 120 121 ··· 193 186 在每个区域目录中,你会发现两个文件( ``start`` 和 ``end`` )。你可以通过向文件写入 194 187 和从文件中读出,分别设置和获得初始监测目标区域的起始和结束地址。 195 188 189 + 每个区域不应该与其他区域重叠。 目录“N”的“结束”应等于或小于目录“N+1”的“开始”。 190 + 196 191 contexts/<N>/schemes/ 197 192 --------------------- 198 193 ··· 208 199 schemes/<N>/ 209 200 ------------ 210 201 211 - 在每个方案目录中,存在四个目录(``access_pattern``, ``quotas``,``watermarks``, 212 - 和 ``stats``)和一个文件(``action``)。 202 + 在每个方案目录中,存在五个目录(``access_pattern``、``quotas``、``watermarks``、 203 + ``stats`` 和 ``tried_regions``)和一个文件(``action``)。 213 204 214 205 ``action`` 文件用于设置和获取你想应用于具有特定访问模式的内存区域的动作。可以写入文件 215 206 和从文件中读取的关键词及其含义如下。 ··· 238 229 239 230 每个 ``动作`` 的最佳 ``目标访问模式`` 取决于工作负载,所以不容易找到。更糟糕的是,将某些动作 240 231 的方案设置得过于激进会造成严重的开销。为了避免这种开销,用户可以为每个方案限制时间和大小配额。 241 - 具体来说,用户可以要求DAMON尽量只使用特定的时间(``时间配额``)来应用行动,并且在给定的时间间 242 - 隔(``重置间隔``)内,只对具有目标访问模式的内存区域应用行动,而不使用特定数量(``大小配额``)。 232 + 具体来说,用户可以要求DAMON尽量只使用特定的时间(``时间配额``)来应用动作,并且在给定的时间间 233 + 隔(``重置间隔``)内,只对具有目标访问模式的内存区域应用动作,而不使用特定数量(``大小配额``)。 243 234 244 235 当预计超过配额限制时,DAMON会根据 ``目标访问模式`` 的大小、访问频率和年龄,对找到的内存区域 245 236 进行优先排序。为了进行个性化的优先排序,用户可以为这三个属性设置权重。 ··· 281 272 你应该要求DAMON sysfs接口通过在相关的 ``kdamonds/<N>/state`` 文件中写入一个特殊的关键字 282 273 ``update_schemes_stats`` 来更新统计信息的文件内容。 283 274 275 + schemes/<N>/tried_regions/ 276 + -------------------------- 277 + 278 + 当一个特殊的关键字 ``update_schemes_tried_regions`` 被写入相关的 ``kdamonds/<N>/state`` 279 + 文件时,DAMON会在这个目录下创建从 ``0`` 开始命名的整数目录。每个目录包含的文件暴露了关于每个 280 + 内存区域的详细信息,在下一个 :ref:`聚集区间 <sysfs_monitoring_attrs>`,相应的方案的 ``动作`` 281 + 已经尝试在这个目录下应用。这些信息包括地址范围、``nr_accesses`` 以及区域的 ``年龄`` 。 282 + 283 + 当另一个特殊的关键字 ``clear_schemes_tried_regions`` 被写入相关的 ``kdamonds/<N>/state`` 284 + 文件时,这些目录将被删除。 285 + 286 + tried_regions/<N>/ 287 + ------------------ 288 + 289 + 在每个区域目录中,你会发现四个文件(``start``, ``end``, ``nr_accesses``, and ``age``)。 290 + 读取这些文件将显示相应的基于DAMON的操作方案 ``动作`` 试图应用的区域的开始和结束地址、``nr_accesses`` 291 + 和 ``年龄`` 。 292 + 284 293 用例 285 294 ~~~~ 286 295 ··· 314 287 # echo 1 > kdamonds/0/contexts/0/schemes/nr_schemes 315 288 # cd kdamonds/0/contexts/0/schemes/0 316 289 # # set the basic access pattern and the action 317 - # echo 4096 > access_patterns/sz/min 318 - # echo 8192 > access_patterns/sz/max 319 - # echo 0 > access_patterns/nr_accesses/min 320 - # echo 5 > access_patterns/nr_accesses/max 321 - # echo 10 > access_patterns/age/min 322 - # echo 20 > access_patterns/age/max 290 + # echo 4096 > access_pattern/sz/min 291 + # echo 8192 > access_pattern/sz/max 292 + # echo 0 > access_pattern/nr_accesses/min 293 + # echo 5 > access_pattern/nr_accesses/max 294 + # echo 10 > access_pattern/age/min 295 + # echo 20 > access_pattern/age/max 323 296 # echo pageout > action 324 297 # # set quotas 325 298 # echo 10 > quotas/ms ··· 337 310 338 311 debugfs接口 339 312 =========== 313 + 314 + .. note:: 315 + 316 + DAMON debugfs接口将在下一个LTS内核发布后被移除,所以用户应该转移到 317 + :ref:`sysfs接口<sysfs_interface>`。 340 318 341 319 DAMON导出了八个文件, ``attrs``, ``target_ids``, ``init_regions``, 342 320 ``schemes``, ``monitor_on``, ``kdamond_pid``, ``mk_contexts`` 和 ··· 396 364 监测目标区域。 397 365 398 366 在这种情况下,用户可以通过在 ``init_regions`` 文件中写入适当的值,明确地设置他们想要的初 399 - 始监测目标区域。输入的每一行应代表一个区域,形式如下:: 367 + 始监测目标区域。输入应该是一个由三个整数组成的队列,用空格隔开,代表一个区域的形式如下:: 400 368 401 369 <target idx> <start address> <end address> 402 370 ··· 408 376 # cd <debugfs>/damon 409 377 # cat target_ids 410 378 42 4242 411 - # echo "0 1 100 412 - 0 100 200 413 - 1 20 40 379 + # echo "0 1 100 \ 380 + 0 100 200 \ 381 + 1 20 40 \ 414 382 1 50 100" > init_regions 415 383 416 384 请注意,这只是设置了初始的监测目标区域。在虚拟内存监测的情况下,DAMON会在一个 ``更新间隔``
+1 -1
Documentation/translations/zh_CN/admin-guide/mm/index.rst
··· 22 22 .. _man 5 proc: http://man7.org/linux/man-pages/man5/proc.5.html 23 23 24 24 Linux内存管理有它自己的术语,如果你还不熟悉它,请考虑阅读下面参考: 25 - :ref:`Documentation/admin-guide/mm/concepts.rst <mm_concepts>`. 25 + Documentation/admin-guide/mm/concepts.rst. 26 26 27 27 在此目录下,我们详细描述了如何与Linux内存管理中的各种机制交互。 28 28
+50
Documentation/translations/zh_CN/admin-guide/mm/ksm.rst
··· 146 146 147 147 比值 ``pages_sharing/pages_shared`` 的最大值受限制于 ``max_page_sharing`` 148 148 的设定。要想增加该比值,则相应地要增加 ``max_page_sharing`` 的值。 149 + 150 + 监测KSM的收益 151 + ============= 152 + 153 + KSM可以通过合并相同的页面来节省内存,但也会消耗额外的内存,因为它需要生成一些rmap_items 154 + 来保存每个扫描页面的简要rmap信息。其中有些页面可能会被合并,但有些页面在被检查几次 155 + 后可能无法被合并,这些都是无益的内存消耗。 156 + 157 + 1) 如何确定KSM在全系统范围内是节省内存还是消耗内存?这里有一个简单的近似计算方法供参考:: 158 + 159 + general_profit =~ pages_sharing * sizeof(page) - (all_rmap_items) * 160 + sizeof(rmap_item); 161 + 162 + 其中all_rmap_items可以通过对 ``pages_sharing`` 、 ``pages_shared`` 、 ``pages_unshared`` 163 + 和 ``pages_volatile`` 的求和而轻松获得。 164 + 165 + 2) 单一进程中KSM的收益也可以通过以下近似的计算得到:: 166 + 167 + process_profit =~ ksm_merging_pages * sizeof(page) - 168 + ksm_rmap_items * sizeof(rmap_item). 169 + 170 + 其中ksm_merging_pages显示在 ``/proc/<pid>/`` 目录下,而ksm_rmap_items 171 + 显示在 ``/proc/<pid>/ksm_stat`` 。 172 + 173 + 从应用的角度来看, ``ksm_rmap_items`` 和 ``ksm_merging_pages`` 的高比例意 174 + 味着不好的madvise-applied策略,所以开发者或管理员必须重新考虑如何改变madvis策 175 + 略。举个例子供参考,一个页面的大小通常是4K,而rmap_item的大小在32位CPU架构上分 176 + 别是32B,在64位CPU架构上是64B。所以如果 ``ksm_rmap_items/ksm_merging_pages`` 177 + 的比例在64位CPU上超过64,或者在32位CPU上超过128,那么应用程序的madvise策略应 178 + 该被放弃,因为ksm收益大约为零或负值。 179 + 180 + 监控KSM事件 181 + =========== 182 + 183 + 在/proc/vmstat中有一些计数器,可以用来监控KSM事件。KSM可能有助于节省内存,这是 184 + 一种权衡,因为它可能会在KSM COW或复制中的交换上遭受延迟。这些事件可以帮助用户评估 185 + 是否或如何使用KSM。例如,如果cow_ksm增加得太快,用户可以减少madvise(, , MADV_MERGEABLE) 186 + 的范围。 187 + 188 + cow_ksm 189 + 在每次KSM页面触发写时拷贝(COW)时都会被递增,当用户试图写入KSM页面时, 190 + 我们必须做一个拷贝。 191 + 192 + ksm_swpin_copy 193 + 在换入时,每次KSM页被复制时都会被递增。请注意,KSM页在换入时可能会被复 194 + 制,因为do_swap_page()不能做所有的锁,而需要重组一个跨anon_vma的KSM页。 195 + 196 + -- 197 + Izik Eidus, 198 + Hugh Dickins, 2009年11月17日。
+8 -2
Documentation/translations/zh_CN/core-api/kernel-api.rst
··· 48 48 49 49 该API在以下内核代码中: 50 50 51 + include/linux/fortify-string.h 52 + 51 53 lib/string.c 52 54 53 55 include/linux/string.h ··· 121 119 Linux中的CRC和数学函数 122 120 ====================== 123 121 122 + 算术溢出检查 123 + ------------ 124 + 125 + 该API在以下内核代码中: 126 + 127 + include/linux/overflow.h 124 128 125 129 CRC函数 126 130 ------- ··· 173 165 include/asm-generic/div64.h 174 166 175 167 include/linux/math64.h 176 - 177 - lib/math/div64.c 178 168 179 169 lib/math/gcd.c 180 170
+1 -1
Documentation/translations/zh_CN/core-api/mm-api.rst
··· 37 37 38 38 该API在以下内核代码中: 39 39 40 - include/linux/gfp.h 40 + include/linux/gfp_types.h 41 41 42 42 Slab缓存 43 43 ========
+2 -2
Documentation/translations/zh_CN/core-api/workqueue.rst
··· 313 313 314 314 第一个可以用追踪的方式进行跟踪: :: 315 315 316 - $ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event 317 - $ cat /sys/kernel/debug/tracing/trace_pipe > out.txt 316 + $ echo workqueue:workqueue_queue_work > /sys/kernel/tracing/set_event 317 + $ cat /sys/kernel/tracing/trace_pipe > out.txt 318 318 (wait a few secs) 319 319 320 320 如果有什么东西在工作队列上忙着做循环,它就会主导输出,可以用工作项函数确定违规者。
+41 -33
Documentation/translations/zh_CN/dev-tools/kasan.rst
··· 90 90 ``CONFIG_STACKTRACE`` 。要包括受影响物理页面的分配和释放堆栈跟踪的话, 91 91 请启用 ``CONFIG_PAGE_OWNER`` 并使用 ``page_owner=on`` 进行引导。 92 92 93 + 启动参数 94 + ~~~~~~~~ 95 + 96 + KASAN受到通用 ``panic_on_warn`` 命令行参数的影响。当它被启用时,KASAN 97 + 在打印出错误报告后会使内核恐慌。 98 + 99 + 默认情况下,KASAN只对第一个无效的内存访问打印错误报告。使用 100 + ``kasan_multi_shot``,KASAN对每一个无效的访问都打印一份报告。这会禁用 101 + 了KASAN报告的 ``panic_on_warn``。 102 + 103 + 另外,独立于 ``panic_on_warn`` 、 ``kasan.fault=`` boot参数可以用 104 + 来控制恐慌和报告行为。 105 + 106 + - ``kasan.fault=report`` 或 ``=panic`` 控制是否只打印KASAN report或 107 + 同时使内核恐慌(默认: ``report`` )。即使 ``kasan_multi_shot`` 被 108 + 启用,恐慌也会发生。 109 + 110 + 基于软件和硬件标签的KASAN模式(见下面关于各种模式的部分)支持改变堆栈跟 111 + 踪收集行为: 112 + 113 + - ``kasan.stacktrace=off`` 或 ``=on`` 禁用或启用分配和释放堆栈痕 114 + 迹的收集(默认: ``on`` )。 115 + 116 + - ``kasan.stack_ring_size=<number of entries>`` 指定堆栈环的条 117 + 目数(默认: ``32768`` )。 118 + 119 + 基于硬件标签的KASAN模式是为了在生产中作为一种安全缓解措施使用。因此,它 120 + 支持额外的启动参数,允许完全禁用KASAN或控制其功能。 121 + 122 + - ``kasan=off`` 或 ``=on`` 控制KASAN是否被启用(默认: ``on`` )。 123 + 124 + - ``kasan.mode=sync``, ``=async`` or ``=asymm`` 控制KASAN是否 125 + 被配置为同步、异步或非对称的执行模式(默认: ``同步`` )。 126 + 同步模式:当标签检查异常发生时,会立即检测到不良访问。 127 + 异步模式:不良访问的检测是延迟的。当标签检查异常发生时,信息被存储在硬 128 + 件中(对于arm64来说是在TFSR_EL1寄存器中)。内核周期性地检查硬件,并\ 129 + 且只在这些检查中报告标签异常。 130 + 非对称模式:读取时同步检测不良访问,写入时异步检测。 131 + 132 + - ``kasan.vmalloc=off`` or ``=on`` 禁用或启用vmalloc分配的标记(默认: ``on`` )。 133 + 93 134 错误报告 94 135 ~~~~~~~~ 95 136 ··· 234 193 235 194 通用KASAN还报告两个辅助调用堆栈跟踪。这些堆栈跟踪指向代码中与对象交互但不直接 236 195 出现在错误访问堆栈跟踪中的位置。目前,这包括 call_rcu() 和排队的工作队列。 237 - 238 - 启动参数 239 - ~~~~~~~~ 240 - 241 - KASAN受通用 ``panic_on_warn`` 命令行参数的影响。启用该功能后,KASAN在打印错误 242 - 报告后会引起内核恐慌。 243 - 244 - 默认情况下,KASAN只为第一次无效内存访问打印错误报告。使用 ``kasan_multi_shot`` , 245 - KASAN会针对每个无效访问打印报告。这有效地禁用了KASAN报告的 ``panic_on_warn`` 。 246 - 247 - 另外,独立于 ``panic_on_warn`` , ``kasan.fault=`` 引导参数可以用来控制恐慌和报 248 - 告行为: 249 - 250 - - ``kasan.fault=report`` 或 ``=panic`` 控制是只打印KASAN报告还是同时使内核恐慌 251 - (默认: ``report`` )。即使启用了 ``kasan_multi_shot`` ,也会发生内核恐慌。 252 - 253 - 基于硬件标签的KASAN模式(请参阅下面有关各种模式的部分)旨在在生产中用作安全缓解 254 - 措施。因此,它支持允许禁用KASAN或控制其功能的附加引导参数。 255 - 256 - - ``kasan=off`` 或 ``=on`` 控制KASAN是否启用 (默认: ``on`` )。 257 - 258 - - ``kasan.mode=sync`` 、 ``=async`` 或 ``=asymm`` 控制KASAN是否配置 259 - 为同步或异步执行模式(默认:``sync`` )。 260 - 同步模式:当标签检查错误发生时,立即检测到错误访问。 261 - 异步模式:延迟错误访问检测。当标签检查错误发生时,信息存储在硬件中(在arm64的 262 - TFSR_EL1寄存器中)。内核会定期检查硬件,并且仅在这些检查期间报告标签错误。 263 - 非对称模式:读取时同步检测不良访问,写入时异步检测。 264 - 265 - - ``kasan.vmalloc=off`` 或 ``=on`` 禁用或启用vmalloc分配的标记(默认:``on`` )。 266 - 267 - - ``kasan.stacktrace=off`` 或 ``=on`` 禁用或启用alloc和free堆栈跟踪收集 268 - (默认: ``on`` )。 269 - 270 196 271 197 实施细则 272 198 --------
+27
Documentation/translations/zh_CN/dev-tools/testing-overview.rst
··· 132 132 133 133 不过要注意的是,静态分析工具存在**假阳性**的问题。在试图修复错误和警 134 134 告之前,需要仔细评估它们。 135 + 136 + 何时使用Sparse和Smatch 137 + ---------------------- 138 + 139 + Sparse做类型检查,例如验证注释的变量不会导致无符号的错误,检测 140 + ``__user`` 指针使用不当的地方,以及分析符号初始化器的兼容性。 141 + 142 + Smatch进行流程分析,如果允许建立函数数据库,它还会进行跨函数分析。 143 + Smatch试图回答一些问题,比如这个缓冲区是在哪里分配的?它有多大?这 144 + 个索引可以由用户控制吗?这个变量比那个变量大吗? 145 + 146 + 一般来说,在Smatch中写检查比在Sparse中写检查要容易。尽管如此, 147 + Sparse和Smatch的检查还是有一些重叠的地方。 148 + 149 + Smatch和Coccinelle的强项 150 + ------------------------ 151 + 152 + Coccinelle可能是最容易写检查的。它在预处理器之前工作,所以用Coccinelle 153 + 检查宏中的错误更容易。Coccinelle还能为你创建补丁,这是其他工具无法做到的。 154 + 155 + 例如,用Coccinelle你可以从 ``kmalloc_array(x, size, GFP_KERNEL)`` 156 + 到 ``kmalloc_array(x, size, GFP_KERNEL)`` 进行大规模转换,这真的很 157 + 有用。如果你只是创建一个Smatch警告,并试图把转换的工作推给维护者,他们会很 158 + 恼火。你将不得不为每个警告争论是否真的可以溢出。 159 + 160 + Coccinelle不对变量值进行分析,而这正是Smatch的强项。另一方面,Coccinelle 161 + 允许你用简单的方法做简单的事情。
+36
Documentation/translations/zh_CN/glossary.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 2 + 3 + 术语表 4 + ====== 5 + 6 + 这不是一个完善的术语表,我们只是将有争议的和陌生的翻译词汇记录于此, 7 + 它的篇幅应该根据内核文档翻译的需求而增加。新词条最好随翻译补丁一起 8 + 提交,且仅在以下情况下收录新词条: 9 + 10 + - 在翻译过程中遇到陌生词汇,且尚无翻译先例的; 11 + - 在审阅过程中,针对某词条出现了不同的翻译意见; 12 + - 使用频率不高的词条和首字母缩写类型的词条; 13 + - 已经存在且有歧义的词条翻译。 14 + 15 + 16 + * atomic: 原子的,一般指不可中断的极小的临界区操作。 17 + * DVFS: 动态电压频率升降。(Dynamic Voltage and Frequency Scaling) 18 + * EAS: 能耗感知调度。(Energy Aware Scheduling) 19 + * flush: 刷新,一般指对cache的冲洗操作。 20 + * fork: 创建, 通常指父进程创建子进程。 21 + * futex: 快速用户互斥锁。(fast user mutex) 22 + * guest halt polling: 客户机停机轮询机制。 23 + * HugePage: 巨页。 24 + * hypervisor: 虚拟机超级管理器。 25 + * memory barriers: 内存屏障。 26 + * MIPS: 每秒百万指令。(Millions of Instructions Per Second),注意与mips指令集区分开。 27 + * mutex: 互斥锁。 28 + * NUMA: 非统一内存访问。 29 + * OpenCAPI: 开放相干加速器处理器接口。(Open Coherent Accelerator Processor Interface) 30 + * OPP: 操作性能值。 31 + * overhead: 开销,一般指需要消耗的计算机资源。 32 + * PELT: 实体负载跟踪。(Per-Entity Load Tracking) 33 + * sched domain: 调度域。 34 + * semaphores: 信号量。 35 + * spinlock: 自旋锁。 36 + * watermark: 水位,一般指页表的消耗水平。
+9
Documentation/translations/zh_CN/index.rst
··· 133 133 134 134 staging/index 135 135 136 + 术语表 137 + ------ 138 + 139 + .. toctree:: 140 + :maxdepth: 1 141 + 142 + glossary 143 + 144 + 136 145 索引和表格 137 146 ---------- 138 147
+17 -3
Documentation/translations/zh_CN/mm/highmem.rst
··· 57 57 58 58 在可行的情况下,这个函数应该比其他所有的函数优先使用。 59 59 60 - 这些映射是线程本地和CPU本地的,这意味着映射只能从这个线程中访问,并且当映射处于活动状 61 - 态时,该线程与CPU绑定。即使线程被抢占了(因为抢占永远不会被函数禁用),CPU也不能通过 62 - CPU-hotplug从系统中拔出,直到映射被处理掉。 60 + 这些映射是线程本地和CPU本地的,这意味着映射只能从这个线程中访问,并且当映射处于活跃状 61 + 态时,线程被绑定到CPU上。尽管这个函数从来没有禁用过抢占,但在映射被处理之前,CPU不能 62 + 通过CPU-hotplug从系统中拔出。 63 63 64 64 在本地的kmap区域中采取pagefaults是有效的,除非获取本地映射的上下文由于其他原因不允许 65 65 这样做。 66 66 67 + 如前所述,缺页异常和抢占从未被禁用。没有必要禁用抢占,因为当上下文切换到一个不同的任务 68 + 时,离开的任务的映射被保存,而进入的任务的映射被恢复。 69 + 67 70 kmap_local_page()总是返回一个有效的虚拟地址,并且假定kunmap_local()不会失败。 71 + 72 + 在CONFIG_HIGHMEM=n的内核中,对于低内存页,它返回直接映射的虚拟地址。只有真正的高内 73 + 存页面才会被临时映射。因此,用户可以为那些已知不是来自ZONE_HIGHMEM的页面调用普通的 74 + page_address()。然而,使用kmap_local_page() / kunmap_local()总是安全的。 75 + 76 + 虽然它比kmap()快得多,但在高内存的情况下,它对指针的有效性有限制。与kmap()映射相反, 77 + 本地映射只在调用者的上下文中有效,不能传递给其他上下文。这意味着用户必须绝对保证返回 78 + 地址的使用只限于映射它的线程。 79 + 80 + 大多数代码可以被设计成使用线程本地映射。因此,用户在设计他们的代码时,应该尽量避免使用 81 + kmap(),将页面映射到将被使用的同一线程中,并优先使用kmap_local_page()。 68 82 69 83 嵌套kmap_local_page()和kmap_atomic()映射在一定程度上是允许的(最多到KMAP_TYPE_NR), 70 84 但是它们的调用必须严格排序,因为映射的实现是基于堆栈的。关于如何管理嵌套映射的细节,
+1 -1
Documentation/translations/zh_CN/mm/hmm.rst
··· 248 248 还有devm_request_free_mem_region(), devm_memremap_pages(), 249 249 devm_memunmap_pages() 和 devm_release_mem_region() 当资源可以绑定到 ``struct device``. 250 250 251 - 整体迁移步骤类似于在系统内存中迁移 NUMA 页面(see :ref:`Page migration <page_migration>`) , 251 + 整体迁移步骤类似于在系统内存中迁移 NUMA 页面(see Documentation/mm/page_migration.rst) , 252 252 但这些步骤分为设备驱动程序特定代码和共享公共代码: 253 253 254 254 1. ``mmap_read_lock()``
+1 -1
Documentation/translations/zh_CN/mm/hugetlbfs_reserv.rst
··· 15 15 概述 16 16 ==== 17 17 18 - :ref:`hugetlbpage` 中描述的巨页通常是预先分配给应用程序使用的。如果VMA指 18 + Documentation/mm/hugetlbpage.rst 中描述的巨页通常是预先分配给应用程序使用的。如果VMA指 19 19 示要使用巨页,这些巨页会在缺页异常时被实例化到任务的地址空间。如果在缺页异常 20 20 时没有巨页存在,任务就会被发送一个SIGBUS,并经常不高兴地死去。在加入巨页支 21 21 持后不久,人们决定,在mmap()时检测巨页的短缺情况会更好。这个想法是,如果
+1 -1
Documentation/translations/zh_CN/mm/numa.rst
··· 76 76 系统管理员和应用程序设计者可以使用各种CPU亲和命令行接口,如taskset(1)和numactl(1),以及程 77 77 序接口,如sched_setaffinity(2),来限制任务的迁移,以改善NUMA定位。此外,人们可以使用 78 78 Linux NUMA内存策略修改内核的默认本地分配行为。 [见 79 - :ref:`Documentation/admin-guide/mm/numa_memory_policy.rst <numa_memory_policy>`]. 79 + Documentation/admin-guide/mm/numa_memory_policy.rst]. 80 80 81 81 系统管理员可以使用控制组和CPUsets限制非特权用户在调度或NUMA命令和功能中可以指定的CPU和节点 82 82 的内存。 [见 Documentation/admin-guide/cgroup-v1/cpusets.rst]
+3 -14
Documentation/translations/zh_CN/mm/page_owner.rst
··· 34 34 一样进行。这两个不可能的分支应该不会影响到分配的性能,特别是在静态键跳转标签修补 35 35 功能可用的情况下。以下是由于这个功能而导致的内核代码大小的变化。 36 36 37 - - 没有page owner:: 38 - 39 - text data bss dec hex filename 40 - 48392 2333 644 51369 c8a9 mm/page_alloc.o 41 - 42 - - 有page owner:: 43 - 44 - text data bss dec hex filename 45 - 48800 2445 644 51889 cab1 mm/page_alloc.o 46 - 6662 108 29 6799 1a8f mm/page_owner.o 47 - 1025 8 8 1041 411 mm/page_ext.o 48 - 49 - 虽然总共增加了8KB的代码,但page_alloc.o增加了520字节,其中不到一半是在hotpath 50 - 中。构建带有page owner的内核,并在需要时打开它,将是调试内核内存问题的最佳选择。 37 + 尽管启用page owner会使内核的大小增加几千字节,但这些代码大部分都在页面分配器和 38 + 热路径之外。构建带有page owner的内核,并在需要时打开它,将是调试内核内存问题的 39 + 最佳选择。 51 40 52 41 有一个问题是由实现细节引起的。页所有者将信息存储到struct page扩展的内存中。这 53 42 个内存的初始化时间比稀疏内存系统中的页面分配器启动的时间要晚一些,所以,在初始化
+28 -8
Documentation/translations/zh_CN/power/energy-model.rst
··· 23 23 实现支持,EM框架作为一个抽象层介入,它在内核中对功率成本表的格式进行标准化, 24 24 因此能够避免多余的工作。 25 25 26 - 功率值可以用毫瓦或“抽象刻度”表示。多个子系统可能使用EM,由系统集成商来检查 26 + 功率值可以用微瓦或“抽象刻度”表示。多个子系统可能使用EM,由系统集成商来检查 27 27 功率值刻度类型的要求是否满足。可以在能量感知调度器的文档中找到一个例子 28 28 Documentation/scheduler/sched-energy.rst。对于一些子系统,比如热能或 29 29 powercap,用“抽象刻度”描述功率值可能会导致问题。这些子系统对过去使用的功率的 30 - 估算值更感兴趣,因此可能需要真实的毫瓦。这些要求的一个例子可以在智能功率分配 30 + 估算值更感兴趣,因此可能需要真实的微瓦。这些要求的一个例子可以在智能功率分配 31 31 Documentation/driver-api/thermal/power_allocator.rst文档中找到。 32 32 33 33 内核子系统可能(基于EM内部标志位)实现了对EM注册设备是否具有不一致刻度的自动 34 - 检查。要记住的重要事情是,当功率值以“抽象刻度”表示时,从中推导以毫焦耳为单位 34 + 检查。要记住的重要事情是,当功率值以“抽象刻度”表示时,从中推导以微焦耳为单位 35 35 的真实能量消耗是不可能的。 36 36 37 37 下图描述了一个驱动的例子(这里是针对Arm的,但该方法适用于任何体系结构),它 ··· 89 89 驱动程序应通过以下API将性能域注册到EM框架中:: 90 90 91 91 int em_dev_register_perf_domain(struct device *dev, unsigned int nr_states, 92 - struct em_data_callback *cb, cpumask_t *cpus, bool milliwatts); 92 + struct em_data_callback *cb, cpumask_t *cpus, bool microwatts); 93 93 94 94 驱动程序必须提供一个回调函数,为每个性能状态返回<频率,功率>元组。驱动程序 95 95 提供的回调函数可以自由地从任何相关位置(DT、固件......)以及以任何被认为是 96 96 必要的方式获取数据。只有对于CPU设备,驱动程序必须使用cpumask指定性能域的CPU。 97 97 对于CPU以外的其他设备,最后一个参数必须被设置为NULL。 98 98 99 - 最后一个参数“milliwatts”(毫瓦)设置成正确的值是很重要的,使用EM的内核 99 + 最后一个参数“microwatts”(微瓦)设置成正确的值是很重要的,使用EM的内核 100 100 子系统可能会依赖这个标志来检查所有的EM设备是否使用相同的刻度。如果有不同的 101 - 刻度,这些子系统可能决定:返回警告/错误,停止工作或崩溃(panic)。 101 + 刻度,这些子系统可能决定返回警告/错误,停止工作或崩溃(panic)。 102 102 103 103 关于实现这个回调函数的驱动程序的例子,参见第3节。或者在第2.4节阅读这个API 104 104 的更多文档。 105 105 106 + 使用DT的EM注册 107 + ============== 108 + 109 + EM也可以使用OPP框架和DT "操作点-v2 "中的信息注册。DT中的每个OPP条目都可 110 + 以用一个包含微瓦特功率值的属性 "op-microwatt "来扩展。这个OPP DT属性允 111 + 许平台注册反映总功率(静态+动态)的EM功率值。这些功率值可能直接来自实验和 112 + 测量。 113 + 114 + “人工”EM的注册 115 + ============== 116 + 117 + 有一个选项可以为缺少关于每个性能状态的功率值的详细知识的驱动程序提供一个自 118 + 定义回调。回调.get_cost()是可选的,它提供EAS使用的“成本”值。这对那些只提 119 + 供CPU类型之间相对效率信息的平台很有用,人们可以利用这些信息来创建一个抽象的 120 + 功率模型。但是,考虑到输入功率值的大小限制,即使是抽象的功率模型有时也很难装 121 + 进去。.get_cost()允许提供反映CPU效率的“成本”值。这将允许提供EAS信息,它 122 + 与EM内部计算'成本'值的公式有不同的关系。要为这样的平台注册EM,驱动程序必须 123 + 将标志“microwatts”设置为0,提供.get_power()回调和.get_cost()回调。EM 124 + 框架会在注册过程中正确处理这样的平台。这种平台会被设置EM_PERF_DOMAIN_ARTIFICIAL 125 + 标志。其他使用EM的框架应该特别注意测试和正确对待这个标志。 106 126 107 127 “简单”EM的注册 108 128 ~~~~~~~~~~~~~~~~ ··· 167 147 168 148 -> drivers/cpufreq/foo_cpufreq.c 169 149 170 - 01 static int est_power(unsigned long *mW, unsigned long *KHz, 171 - 02 struct device *dev) 150 + 01 static int est_power(struct device *dev, unsigned long *mW, 151 + 02 unsigned long *KHz) 172 152 03 { 173 153 04 long freq, power; 174 154 05
+1 -1
Documentation/translations/zh_CN/process/howto.rst
··· 254 254 https://git.kernel.org/?p=linux/kernel/git/next/linux-next.git 255 255 256 256 通过这种方式,Linux-next 对下一个合并阶段将进入主线内核的内容给出了一个概要 257 - 展望。非常欢冒险的测试者运行测试Linux-next。 257 + 展望。非常欢迎冒险的测试者运行测试Linux-next。 258 258 259 259 多个主要版本的稳定版内核树 260 260 -----------------------------------
+1 -1
Documentation/userspace-api/iommufd.rst
··· 165 165 iopt_pages which avoids multi-pinning and double accounting of page 166 166 consumption. 167 167 168 - iommufd_ioas is sharable between subsystems, e.g. VFIO and VDPA, as long as 168 + iommufd_ioas is shareable between subsystems, e.g. VFIO and VDPA, as long as 169 169 devices managed by different subsystems are bound to a same iommufd. 170 170 171 171 IOMMUFD User API
+1 -1
Documentation/userspace-api/media/drivers/st-vgxy61.rst
··· 18 18 * - HDR linearize 19 19 - The merger outputs a long exposure capture as long as it is not 20 20 saturated. 21 - * - HDR substraction 21 + * - HDR subtraction 22 22 - This involves subtracting the short exposure frame from the long 23 23 exposure frame. 24 24 * - No HDR
+1 -1
Documentation/userspace-api/media/rc/lirc-set-wideband-receiver.rst
··· 43 43 44 44 .. note:: 45 45 46 - Wide band receiver might be implictly enabled if you enable 46 + Wide band receiver might be implicitly enabled if you enable 47 47 carrier reports. In that case it will be disabled as soon as you disable 48 48 carrier reports. Trying to disable wide band receiver while carrier 49 49 reports are active will do nothing.
+1 -1
Documentation/userspace-api/media/rc/rc-protos.rst
··· 75 75 - Command 76 76 77 77 There is a variant of rc5 called either rc5x or extended rc5 78 - where there the second stop bit is the 6th commmand bit, but inverted. 78 + where there the second stop bit is the 6th command bit, but inverted. 79 79 This is done so it the scancodes and encoding is compatible with existing 80 80 schemes. This bit is stored in bit 6 of the scancode, inverted. This is 81 81 done to keep it compatible with plain rc-5 where there are two start bits.
+1 -1
Documentation/userspace-api/media/rc/rc-tables.rst
··· 628 628 629 629 - Put device into zoom/full screen mode 630 630 631 - - ZOOM / FULL SCREEN / ZOOM+ / HIDE PANNEL / SWITCH 631 + - ZOOM / FULL SCREEN / ZOOM+ / HIDE PANEL / SWITCH 632 632 633 633 - .. row 80 634 634
+1 -1
Documentation/userspace-api/media/v4l/dev-sliced-vbi.rst
··· 490 490 - An alternate form of the sliced VBI data payload used when 36 491 491 lines of sliced VBI data are present. No line masks are provided 492 492 in this form of the payload; all valid line mask bits are 493 - implcitly set. 493 + implicitly set. 494 494 * - } 495 495 - 496 496
+1 -1
Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
··· 1213 1213 - Luma AC coefficient table index. 1214 1214 * - __s8 1215 1215 - ``y_dc_delta`` 1216 - - Luma DC delta vaue. 1216 + - Luma DC delta value. 1217 1217 * - __s8 1218 1218 - ``y2_dc_delta`` 1219 1219 - Y2 block DC delta value.
+1 -1
Documentation/userspace-api/media/v4l/ext-ctrls-jpeg.rst
··· 8 8 9 9 The JPEG class includes controls for common features of JPEG encoders 10 10 and decoders. Currently it includes features for codecs implementing 11 - progressive baseline DCT compression process with Huffman entrophy 11 + progressive baseline DCT compression process with Huffman entropy 12 12 coding. 13 13 14 14
+2 -2
Documentation/userspace-api/media/v4l/hist-v4l2.rst
··· 47 47 1998-11-08: Many minor changes. Most symbols have been renamed. Some 48 48 material changes to struct v4l2_capability. 49 49 50 - 1998-11-12: The read/write directon of some ioctls was misdefined. 50 + 1998-11-12: The read/write direction of some ioctls was misdefined. 51 51 52 52 1998-11-14: ``V4L2_PIX_FMT_RGB24`` changed to ``V4L2_PIX_FMT_BGR24``, 53 53 and ``V4L2_PIX_FMT_RGB32`` changed to ``V4L2_PIX_FMT_BGR32``. Audio ··· 145 145 ``VIDIOC_G_INFMT``, ``VIDIOC_S_OUTFMT``, ``VIDIOC_G_OUTFMT``, 146 146 ``VIDIOC_S_VBIFMT`` and ``VIDIOC_G_VBIFMT``. The image format 147 147 struct v4l2_format was renamed to struct v4l2_pix_format, while 148 - struct v4l2_format is now the envelopping structure 148 + struct v4l2_format is now the enveloping structure 149 149 for all format negotiations. 150 150 151 151 5. Similar to the changes above, the ``VIDIOC_G_PARM`` and
+1 -1
Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst
··· 14 14 - In all the tables that follow, bit 7 is the most significant bit in a byte. 15 15 - Formats are described with the minimum number of pixels needed to create a 16 16 byte-aligned repeating pattern. `...` indicates repetition of the pattern. 17 - - Y'\ :sub:`x`\ [9:2] denotes bits 9 to 2 of the Y' value for pixel at colum 17 + - Y'\ :sub:`x`\ [9:2] denotes bits 9 to 2 of the Y' value for pixel at column 18 18 `x`. 19 19 - `0` denotes padding bits set to 0. 20 20
+1 -1
Documentation/userspace-api/media/v4l/vidioc-cropcap.rst
··· 71 71 - Default cropping rectangle, it shall cover the "whole picture". 72 72 Assuming pixel aspect 1/1 this could be for example a 640 × 480 73 73 rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM 74 - centered over the active picture area. The same co-ordinate system 74 + centered over the active picture area. The same coordinate system 75 75 as for ``bounds`` is used. 76 76 * - struct :c:type:`v4l2_fract` 77 77 - ``pixelaspect``
+1 -1
Documentation/userspace-api/seccomp_filter.rst
··· 274 274 The notifying process can be preempted, resulting in the notification being 275 275 aborted. This can be problematic when trying to take actions on behalf of the 276 276 notifying process that are long-running and typically retryable (mounting a 277 - filesytem). Alternatively, at filter installation time, the 277 + filesystem). Alternatively, at filter installation time, the 278 278 ``SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV`` flag can be set. This flag makes it 279 279 such that when a user notification is received by the supervisor, the notifying 280 280 process will ignore non-fatal signals until the response is sent. Signals that
+1 -1
Documentation/userspace-api/sysfs-platform_profile.rst
··· 37 37 If there is no good match when mapping then a new profile name may be 38 38 added. Drivers which wish to introduce new profile names must: 39 39 40 - 1. Explain why the existing profile names canot be used. 40 + 1. Explain why the existing profile names cannot be used. 41 41 2. Add the new profile name, along with a clear description of the 42 42 expected behaviour, to the sysfs-platform_profile ABI documentation.
+3 -3
Documentation/virt/index.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - ============================ 4 - Linux Virtualization Support 5 - ============================ 3 + ====================== 4 + Virtualization Support 5 + ====================== 6 6 7 7 .. toctree:: 8 8 :maxdepth: 2
+1 -1
Documentation/virt/kvm/x86/amd-memory-encryption.rst
··· 440 440 441 441 See [white-paper]_, [api-spec]_, [amd-apm]_ and [kvm-forum]_ for more info. 442 442 443 - .. [white-paper] http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf 443 + .. [white-paper] https://developer.amd.com/wordpress/media/2013/12/AMD_Memory_Encryption_Whitepaper_v7-Public.pdf 444 444 .. [api-spec] https://support.amd.com/TechDocs/55766_SEV-KM_API_Specification.pdf 445 445 .. [amd-apm] https://support.amd.com/TechDocs/24593.pdf (section 15.34) 446 446 .. [kvm-forum] https://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf
+1 -1
Documentation/virt/kvm/x86/running-nested-guests.rst
··· 150 150 $ qemu-kvm -cpu host [...] 151 151 152 152 The above will pass through the host CPU's capabilities as-is to the 153 - gues); or for better live migration compatibility, use a named CPU 153 + guest, or for better live migration compatibility, use a named CPU 154 154 model supported by QEMU. e.g.:: 155 155 156 156 $ qemu-kvm -cpu Haswell-noTSX-IBRS,vmx=on
+4 -4
Documentation/watchdog/hpwdt.rst
··· 48 48 NOTE: 49 49 More information about watchdog drivers in general, including the ioctl 50 50 interface to /dev/watchdog can be found in 51 - Documentation/watchdog/watchdog-api.rst and Documentation/IPMI.txt. 51 + Documentation/watchdog/watchdog-api.rst and Documentation/driver-api/ipmi.rst 52 52 53 53 Due to limitations in the iLO hardware, the NMI pretimeout if enabled, 54 54 can only be set to 9 seconds. Attempts to set pretimeout to other ··· 63 63 and loop forever. This is generally not what a watchdog user wants. 64 64 65 65 For those wishing to learn more please see: 66 - Documentation/admin-guide/kdump/kdump.rst 67 - Documentation/admin-guide/kernel-parameters.txt (panic=) 68 - Your Linux Distribution specific documentation. 66 + - Documentation/admin-guide/kdump/kdump.rst 67 + - Documentation/admin-guide/kernel-parameters.txt (panic=) 68 + - Your Linux Distribution specific documentation. 69 69 70 70 If the hpwdt does not receive the NMI associated with an expiring timer, 71 71 the iLO will proceed to reset the system at timeout if the timer hasn't
+3 -3
Documentation/watchdog/index.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 3 - ====================== 4 - Linux Watchdog Support 5 - ====================== 3 + ================ 4 + Watchdog Support 5 + ================ 6 6 7 7 .. toctree:: 8 8 :maxdepth: 1
+9 -9
Documentation/x86/resctrl.rst
··· 751 751 visualize this data with a histogram that is available if CONFIG_HIST_TRIGGERS 752 752 is set:: 753 753 754 - # :> /sys/kernel/debug/tracing/trace 755 - # echo 'hist:keys=latency' > /sys/kernel/debug/tracing/events/resctrl/pseudo_lock_mem_latency/trigger 756 - # echo 1 > /sys/kernel/debug/tracing/events/resctrl/pseudo_lock_mem_latency/enable 754 + # :> /sys/kernel/tracing/trace 755 + # echo 'hist:keys=latency' > /sys/kernel/tracing/events/resctrl/pseudo_lock_mem_latency/trigger 756 + # echo 1 > /sys/kernel/tracing/events/resctrl/pseudo_lock_mem_latency/enable 757 757 # echo 1 > /sys/kernel/debug/resctrl/newlock/pseudo_lock_measure 758 - # echo 0 > /sys/kernel/debug/tracing/events/resctrl/pseudo_lock_mem_latency/enable 759 - # cat /sys/kernel/debug/tracing/events/resctrl/pseudo_lock_mem_latency/hist 758 + # echo 0 > /sys/kernel/tracing/events/resctrl/pseudo_lock_mem_latency/enable 759 + # cat /sys/kernel/tracing/events/resctrl/pseudo_lock_mem_latency/hist 760 760 761 761 # event histogram 762 762 # ··· 785 785 and misses using the platform's precision counters. 786 786 :: 787 787 788 - # :> /sys/kernel/debug/tracing/trace 789 - # echo 1 > /sys/kernel/debug/tracing/events/resctrl/pseudo_lock_l2/enable 788 + # :> /sys/kernel/tracing/trace 789 + # echo 1 > /sys/kernel/tracing/events/resctrl/pseudo_lock_l2/enable 790 790 # echo 2 > /sys/kernel/debug/resctrl/newlock/pseudo_lock_measure 791 - # echo 0 > /sys/kernel/debug/tracing/events/resctrl/pseudo_lock_l2/enable 792 - # cat /sys/kernel/debug/tracing/trace 791 + # echo 0 > /sys/kernel/tracing/events/resctrl/pseudo_lock_l2/enable 792 + # cat /sys/kernel/tracing/trace 793 793 794 794 # tracer: nop 795 795 #
+1 -1
Documentation/x86/x86_64/mm.rst
··· 140 140 memory address (this means in some cases it can also include PCI memory 141 141 holes). 142 142 143 - We map EFI runtime services in the 'efi_pgd' PGD in a 64Gb large virtual 143 + We map EFI runtime services in the 'efi_pgd' PGD in a 64GB large virtual 144 144 memory window (this size is arbitrary, it can be raised later if needed). 145 145 The mappings are not part of any other kernel PGD and are only available 146 146 during EFI runtime calls.
-2
lib/Kconfig.debug
··· 2891 2891 2892 2892 endmenu # "Rust" 2893 2893 2894 - source "Documentation/Kconfig" 2895 - 2896 2894 endmenu # Kernel hacking
-11
scripts/kernel-doc
··· 2079 2079 sub process_body($$) { 2080 2080 my $file = shift; 2081 2081 2082 - # Until all named variable macro parameters are 2083 - # documented using the bare name (`x`) rather than with 2084 - # dots (`x...`), strip the dots: 2085 - if ($section =~ /\w\.\.\.$/) { 2086 - $section =~ s/\.\.\.$//; 2087 - 2088 - if ($verbose) { 2089 - emit_warning("${file}:$.", "Variable macro arguments should be documented without dots\n"); 2090 - } 2091 - } 2092 - 2093 2082 if ($state == STATE_BODY_WITH_BLANK_LINE && /^\s*\*\s?\S/) { 2094 2083 dump_section($file, $section, $contents); 2095 2084 $section = $section_default;