1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 26eedf8d3SAlexey Dobriyanconfig PROC_FS 36a108a14SDavid Rientjes bool "/proc file system support" if EXPERT 46eedf8d3SAlexey Dobriyan default y 56eedf8d3SAlexey Dobriyan help 66eedf8d3SAlexey Dobriyan This is a virtual file system providing information about the status 76eedf8d3SAlexey Dobriyan of the system. "Virtual" means that it doesn't take up any space on 86eedf8d3SAlexey Dobriyan your hard disk: the files are created on the fly by the kernel when 96eedf8d3SAlexey Dobriyan you try to access them. Also, you cannot read the files with older 106eedf8d3SAlexey Dobriyan version of the program less: you need to use more or cat. 116eedf8d3SAlexey Dobriyan 126eedf8d3SAlexey Dobriyan It's totally cool; for example, "cat /proc/interrupts" gives 136eedf8d3SAlexey Dobriyan information about what the different IRQs are used for at the moment 146eedf8d3SAlexey Dobriyan (there is a small number of Interrupt ReQuest lines in your computer 156eedf8d3SAlexey Dobriyan that are used by the attached devices to gain the CPU's attention -- 166eedf8d3SAlexey Dobriyan often a source of trouble if two devices are mistakenly configured 176eedf8d3SAlexey Dobriyan to use the same IRQ). The program procinfo to display some 186eedf8d3SAlexey Dobriyan information about your system gathered from the /proc file system. 196eedf8d3SAlexey Dobriyan 206eedf8d3SAlexey Dobriyan Before you can use the /proc file system, it has to be mounted, 216eedf8d3SAlexey Dobriyan meaning it has to be given a location in the directory hierarchy. 226eedf8d3SAlexey Dobriyan That location should be /proc. A command such as "mount -t proc proc 236eedf8d3SAlexey Dobriyan /proc" or the equivalent line in /etc/fstab does the job. 246eedf8d3SAlexey Dobriyan 256eedf8d3SAlexey Dobriyan The /proc file system is explained in the file 260c1bc6b8SMauro Carvalho Chehab <file:Documentation/filesystems/proc.rst> and on the proc(5) manpage 276eedf8d3SAlexey Dobriyan ("man 5 proc"). 286eedf8d3SAlexey Dobriyan 296eedf8d3SAlexey Dobriyan This option will enlarge your kernel by about 67 KB. Several 306eedf8d3SAlexey Dobriyan programs depend on this, so everyone should say Y here. 316eedf8d3SAlexey Dobriyan 326eedf8d3SAlexey Dobriyanconfig PROC_KCORE 336eedf8d3SAlexey Dobriyan bool "/proc/kcore support" if !ARM 346eedf8d3SAlexey Dobriyan depends on PROC_FS && MMU 35443cbaf9SBaoquan He select VMCORE_INFO 361c3fc3e5SRandy Dunlap help 371c3fc3e5SRandy Dunlap Provides a virtual ELF core file of the live kernel. This can 381c3fc3e5SRandy Dunlap be read with gdb and other ELF tools. No modifications can be 391c3fc3e5SRandy Dunlap made using this mechanism. 406eedf8d3SAlexey Dobriyan 416eedf8d3SAlexey Dobriyanconfig PROC_VMCORE 42a4f7326dSWANG Cong bool "/proc/vmcore support" 436eedf8d3SAlexey Dobriyan depends on PROC_FS && CRASH_DUMP 446eedf8d3SAlexey Dobriyan default y 456eedf8d3SAlexey Dobriyan help 466eedf8d3SAlexey Dobriyan Exports the dump image of crashed kernel in ELF format. 476eedf8d3SAlexey Dobriyan 482724273eSRahul Lakkireddyconfig PROC_VMCORE_DEVICE_DUMP 492724273eSRahul Lakkireddy bool "Device Hardware/Firmware Log Collection" 502724273eSRahul Lakkireddy depends on PROC_VMCORE 512724273eSRahul Lakkireddy default n 522724273eSRahul Lakkireddy help 532724273eSRahul Lakkireddy After kernel panic, device drivers can collect the device 542724273eSRahul Lakkireddy specific snapshot of their hardware or firmware before the 552724273eSRahul Lakkireddy underlying devices are initialized in crash recovery kernel. 562724273eSRahul Lakkireddy Note that the device driver must be present in the crash 572724273eSRahul Lakkireddy recovery kernel's initramfs to collect its underlying device 582724273eSRahul Lakkireddy snapshot. 592724273eSRahul Lakkireddy 602724273eSRahul Lakkireddy If you say Y here, the collected device dumps will be added 61c6c40533SKairui Song as ELF notes to /proc/vmcore. You can still disable device 62c6c40533SKairui Song dump using the kernel command line option 'novmcoredd'. 632724273eSRahul Lakkireddy 647ad4d1f6SDavid Hildenbrandconfig NEED_PROC_VMCORE_DEVICE_RAM 657ad4d1f6SDavid Hildenbrand bool 667ad4d1f6SDavid Hildenbrand 677ad4d1f6SDavid Hildenbrandconfig PROC_VMCORE_DEVICE_RAM 687ad4d1f6SDavid Hildenbrand def_bool y 697ad4d1f6SDavid Hildenbrand depends on PROC_VMCORE && NEED_PROC_VMCORE_DEVICE_RAM 70*c6a8239aSDavid Hildenbrand depends on VIRTIO_MEM 717ad4d1f6SDavid Hildenbrand help 727ad4d1f6SDavid Hildenbrand If the elfcore hdr is allocated and prepared by the dump kernel 737ad4d1f6SDavid Hildenbrand ("2nd kernel") instead of the crashed kernel, RAM provided by memory 747ad4d1f6SDavid Hildenbrand devices such as virtio-mem will not be included in the dump 757ad4d1f6SDavid Hildenbrand image, because only the device driver can properly detect them. 767ad4d1f6SDavid Hildenbrand 777ad4d1f6SDavid Hildenbrand With this config enabled, these RAM ranges will be queried from the 787ad4d1f6SDavid Hildenbrand device drivers once the device gets probed, so they can be included 797ad4d1f6SDavid Hildenbrand in the crash dump. 807ad4d1f6SDavid Hildenbrand 817ad4d1f6SDavid Hildenbrand Relevant architectures should select NEED_PROC_VMCORE_DEVICE_RAM. 827ad4d1f6SDavid Hildenbrand 836eedf8d3SAlexey Dobriyanconfig PROC_SYSCTL 846a108a14SDavid Rientjes bool "Sysctl support (/proc/sys)" if EXPERT 856eedf8d3SAlexey Dobriyan depends on PROC_FS 866eedf8d3SAlexey Dobriyan select SYSCTL 876eedf8d3SAlexey Dobriyan default y 88a7f7f624SMasahiro Yamada help 896eedf8d3SAlexey Dobriyan The sysctl interface provides a means of dynamically changing 906eedf8d3SAlexey Dobriyan certain kernel parameters and variables on the fly without requiring 916eedf8d3SAlexey Dobriyan a recompile of the kernel or reboot of the system. The primary 926eedf8d3SAlexey Dobriyan interface is through /proc/sys. If you say Y here a tree of 936eedf8d3SAlexey Dobriyan modifiable sysctl entries will be generated beneath the 946eedf8d3SAlexey Dobriyan /proc/sys directory. They are explained in the files 9557043247SMauro Carvalho Chehab in <file:Documentation/admin-guide/sysctl/>. Note that enabling this 966eedf8d3SAlexey Dobriyan option will enlarge the kernel by at least 8 KB. 976eedf8d3SAlexey Dobriyan 986eedf8d3SAlexey Dobriyan As it is generally a good thing, you should say Y here unless 996eedf8d3SAlexey Dobriyan building a kernel for install/rescue disks or your system is very 1006eedf8d3SAlexey Dobriyan limited in memory. 10153167a3eSAlexey Dobriyan 10253167a3eSAlexey Dobriyanconfig PROC_PAGE_MONITOR 10353167a3eSAlexey Dobriyan default y 10453167a3eSAlexey Dobriyan depends on PROC_FS && MMU 1056a108a14SDavid Rientjes bool "Enable /proc page monitoring" if EXPERT 10653167a3eSAlexey Dobriyan help 10753167a3eSAlexey Dobriyan Various /proc files exist to monitor process memory utilization: 10853167a3eSAlexey Dobriyan /proc/pid/smaps, /proc/pid/clear_refs, /proc/pid/pagemap, 10953167a3eSAlexey Dobriyan /proc/kpagecount, and /proc/kpageflags. Disabling these 11053167a3eSAlexey Dobriyan interfaces will reduce the size of the kernel by approximately 4kb. 1112e13ba54SIago López Galeiras 1122e13ba54SIago López Galeirasconfig PROC_CHILDREN 1132e13ba54SIago López Galeiras bool "Include /proc/<pid>/task/<tid>/children file" 1147ec354baSLukas Bulwahn depends on PROC_FS 1152e13ba54SIago López Galeiras default n 116db5d5b36SIago López Galeiras help 117db5d5b36SIago López Galeiras Provides a fast way to retrieve first level children pids of a task. See 1180c1bc6b8SMauro Carvalho Chehab <file:Documentation/filesystems/proc.rst> for more information. 119db5d5b36SIago López Galeiras 120db5d5b36SIago López Galeiras Say Y if you are running any user-space software which takes benefit from 121db5d5b36SIago López Galeiras this interface. For example, rkt is such a piece of software. 12268bc30bbSAubrey Li 12368bc30bbSAubrey Liconfig PROC_PID_ARCH_STATUS 12468bc30bbSAubrey Li def_bool n 12568bc30bbSAubrey Li depends on PROC_FS 126e79f15a4SChen Yu 127e79f15a4SChen Yuconfig PROC_CPU_RESCTRL 128e79f15a4SChen Yu def_bool n 129e79f15a4SChen Yu depends on PROC_FS 130