18c2ecf20Sopenharmony_ci=============================== 28c2ecf20Sopenharmony_ciDocumentation for /proc/sys/fs/ 38c2ecf20Sopenharmony_ci=============================== 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_cikernel version 2.2.10 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciCopyright (c) 1998, 1999, Rik van Riel <riel@nl.linux.org> 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciCopyright (c) 2009, Shen Feng<shen@cn.fujitsu.com> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciFor general info and legal blurb, please look in intro.rst. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci------------------------------------------------------------------------------ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciThis file contains documentation for the sysctl files in 168c2ecf20Sopenharmony_ci/proc/sys/fs/ and is valid for Linux kernel version 2.2. 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciThe files in this directory can be used to tune and monitor 198c2ecf20Sopenharmony_cimiscellaneous and general things in the operation of the Linux 208c2ecf20Sopenharmony_cikernel. Since some of the files _can_ be used to screw up your 218c2ecf20Sopenharmony_cisystem, it is advisable to read both documentation and source 228c2ecf20Sopenharmony_cibefore actually making adjustments. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci1. /proc/sys/fs 258c2ecf20Sopenharmony_ci=============== 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciCurrently, these files are in /proc/sys/fs: 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci- aio-max-nr 308c2ecf20Sopenharmony_ci- aio-nr 318c2ecf20Sopenharmony_ci- dentry-state 328c2ecf20Sopenharmony_ci- dquot-max 338c2ecf20Sopenharmony_ci- dquot-nr 348c2ecf20Sopenharmony_ci- file-max 358c2ecf20Sopenharmony_ci- file-nr 368c2ecf20Sopenharmony_ci- inode-max 378c2ecf20Sopenharmony_ci- inode-nr 388c2ecf20Sopenharmony_ci- inode-state 398c2ecf20Sopenharmony_ci- nr_open 408c2ecf20Sopenharmony_ci- overflowuid 418c2ecf20Sopenharmony_ci- overflowgid 428c2ecf20Sopenharmony_ci- pipe-user-pages-hard 438c2ecf20Sopenharmony_ci- pipe-user-pages-soft 448c2ecf20Sopenharmony_ci- protected_fifos 458c2ecf20Sopenharmony_ci- protected_hardlinks 468c2ecf20Sopenharmony_ci- protected_regular 478c2ecf20Sopenharmony_ci- protected_symlinks 488c2ecf20Sopenharmony_ci- suid_dumpable 498c2ecf20Sopenharmony_ci- super-max 508c2ecf20Sopenharmony_ci- super-nr 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ciaio-nr & aio-max-nr 548c2ecf20Sopenharmony_ci------------------- 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ciaio-nr is the running total of the number of events specified on the 578c2ecf20Sopenharmony_ciio_setup system call for all currently active aio contexts. If aio-nr 588c2ecf20Sopenharmony_cireaches aio-max-nr then io_setup will fail with EAGAIN. Note that 598c2ecf20Sopenharmony_ciraising aio-max-nr does not result in the pre-allocation or re-sizing 608c2ecf20Sopenharmony_ciof any kernel data structures. 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_cidentry-state 648c2ecf20Sopenharmony_ci------------ 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ciFrom linux/include/linux/dcache.h:: 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci struct dentry_stat_t dentry_stat { 698c2ecf20Sopenharmony_ci int nr_dentry; 708c2ecf20Sopenharmony_ci int nr_unused; 718c2ecf20Sopenharmony_ci int age_limit; /* age in seconds */ 728c2ecf20Sopenharmony_ci int want_pages; /* pages requested by system */ 738c2ecf20Sopenharmony_ci int nr_negative; /* # of unused negative dentries */ 748c2ecf20Sopenharmony_ci int dummy; /* Reserved for future use */ 758c2ecf20Sopenharmony_ci }; 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ciDentries are dynamically allocated and deallocated. 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_cinr_dentry shows the total number of dentries allocated (active 808c2ecf20Sopenharmony_ci+ unused). nr_unused shows the number of dentries that are not 818c2ecf20Sopenharmony_ciactively used, but are saved in the LRU list for future reuse. 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ciAge_limit is the age in seconds after which dcache entries 848c2ecf20Sopenharmony_cican be reclaimed when memory is short and want_pages is 858c2ecf20Sopenharmony_cinonzero when shrink_dcache_pages() has been called and the 868c2ecf20Sopenharmony_cidcache isn't pruned yet. 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_cinr_negative shows the number of unused dentries that are also 898c2ecf20Sopenharmony_cinegative dentries which do not map to any files. Instead, 908c2ecf20Sopenharmony_cithey help speeding up rejection of non-existing files provided 918c2ecf20Sopenharmony_ciby the users. 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_cidquot-max & dquot-nr 958c2ecf20Sopenharmony_ci-------------------- 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ciThe file dquot-max shows the maximum number of cached disk 988c2ecf20Sopenharmony_ciquota entries. 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ciThe file dquot-nr shows the number of allocated disk quota 1018c2ecf20Sopenharmony_cientries and the number of free disk quota entries. 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ciIf the number of free cached disk quotas is very low and 1048c2ecf20Sopenharmony_ciyou have some awesome number of simultaneous system users, 1058c2ecf20Sopenharmony_ciyou might want to raise the limit. 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_cifile-max & file-nr 1098c2ecf20Sopenharmony_ci------------------ 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ciThe value in file-max denotes the maximum number of file- 1128c2ecf20Sopenharmony_cihandles that the Linux kernel will allocate. When you get lots 1138c2ecf20Sopenharmony_ciof error messages about running out of file handles, you might 1148c2ecf20Sopenharmony_ciwant to increase this limit. 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ciHistorically,the kernel was able to allocate file handles 1178c2ecf20Sopenharmony_cidynamically, but not to free them again. The three values in 1188c2ecf20Sopenharmony_cifile-nr denote the number of allocated file handles, the number 1198c2ecf20Sopenharmony_ciof allocated but unused file handles, and the maximum number of 1208c2ecf20Sopenharmony_cifile handles. Linux 2.6 always reports 0 as the number of free 1218c2ecf20Sopenharmony_cifile handles -- this is not an error, it just means that the 1228c2ecf20Sopenharmony_cinumber of allocated file handles exactly matches the number of 1238c2ecf20Sopenharmony_ciused file handles. 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ciAttempts to allocate more file descriptors than file-max are 1268c2ecf20Sopenharmony_cireported with printk, look for "VFS: file-max limit <number> 1278c2ecf20Sopenharmony_cireached". 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_cinr_open 1318c2ecf20Sopenharmony_ci------- 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ciThis denotes the maximum number of file-handles a process can 1348c2ecf20Sopenharmony_ciallocate. Default value is 1024*1024 (1048576) which should be 1358c2ecf20Sopenharmony_cienough for most machines. Actual limit depends on RLIMIT_NOFILE 1368c2ecf20Sopenharmony_ciresource limit. 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ciinode-max, inode-nr & inode-state 1408c2ecf20Sopenharmony_ci--------------------------------- 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ciAs with file handles, the kernel allocates the inode structures 1438c2ecf20Sopenharmony_cidynamically, but can't free them yet. 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ciThe value in inode-max denotes the maximum number of inode 1468c2ecf20Sopenharmony_cihandlers. This value should be 3-4 times larger than the value 1478c2ecf20Sopenharmony_ciin file-max, since stdin, stdout and network sockets also 1488c2ecf20Sopenharmony_cineed an inode struct to handle them. When you regularly run 1498c2ecf20Sopenharmony_ciout of inodes, you need to increase this value. 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ciThe file inode-nr contains the first two items from 1528c2ecf20Sopenharmony_ciinode-state, so we'll skip to that file... 1538c2ecf20Sopenharmony_ci 1548c2ecf20Sopenharmony_ciInode-state contains three actual numbers and four dummies. 1558c2ecf20Sopenharmony_ciThe actual numbers are, in order of appearance, nr_inodes, 1568c2ecf20Sopenharmony_cinr_free_inodes and preshrink. 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ciNr_inodes stands for the number of inodes the system has 1598c2ecf20Sopenharmony_ciallocated, this can be slightly more than inode-max because 1608c2ecf20Sopenharmony_ciLinux allocates them one pageful at a time. 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ciNr_free_inodes represents the number of free inodes (?) and 1638c2ecf20Sopenharmony_cipreshrink is nonzero when the nr_inodes > inode-max and the 1648c2ecf20Sopenharmony_cisystem needs to prune the inode list instead of allocating 1658c2ecf20Sopenharmony_cimore. 1668c2ecf20Sopenharmony_ci 1678c2ecf20Sopenharmony_ci 1688c2ecf20Sopenharmony_cioverflowgid & overflowuid 1698c2ecf20Sopenharmony_ci------------------------- 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ciSome filesystems only support 16-bit UIDs and GIDs, although in Linux 1728c2ecf20Sopenharmony_ciUIDs and GIDs are 32 bits. When one of these filesystems is mounted 1738c2ecf20Sopenharmony_ciwith writes enabled, any UID or GID that would exceed 65535 is translated 1748c2ecf20Sopenharmony_cito a fixed value before being written to disk. 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ciThese sysctls allow you to change the value of the fixed UID and GID. 1778c2ecf20Sopenharmony_ciThe default is 65534. 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci 1808c2ecf20Sopenharmony_cipipe-user-pages-hard 1818c2ecf20Sopenharmony_ci-------------------- 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ciMaximum total number of pages a non-privileged user may allocate for pipes. 1848c2ecf20Sopenharmony_ciOnce this limit is reached, no new pipes may be allocated until usage goes 1858c2ecf20Sopenharmony_cibelow the limit again. When set to 0, no limit is applied, which is the default 1868c2ecf20Sopenharmony_cisetting. 1878c2ecf20Sopenharmony_ci 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_cipipe-user-pages-soft 1908c2ecf20Sopenharmony_ci-------------------- 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ciMaximum total number of pages a non-privileged user may allocate for pipes 1938c2ecf20Sopenharmony_cibefore the pipe size gets limited to a single page. Once this limit is reached, 1948c2ecf20Sopenharmony_cinew pipes will be limited to a single page in size for this user in order to 1958c2ecf20Sopenharmony_cilimit total memory usage, and trying to increase them using fcntl() will be 1968c2ecf20Sopenharmony_cidenied until usage goes below the limit again. The default value allows to 1978c2ecf20Sopenharmony_ciallocate up to 1024 pipes at their default size. When set to 0, no limit is 1988c2ecf20Sopenharmony_ciapplied. 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ciprotected_fifos 2028c2ecf20Sopenharmony_ci--------------- 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ciThe intent of this protection is to avoid unintentional writes to 2058c2ecf20Sopenharmony_cian attacker-controlled FIFO, where a program expected to create a regular 2068c2ecf20Sopenharmony_cifile. 2078c2ecf20Sopenharmony_ci 2088c2ecf20Sopenharmony_ciWhen set to "0", writing to FIFOs is unrestricted. 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ciWhen set to "1" don't allow O_CREAT open on FIFOs that we don't own 2118c2ecf20Sopenharmony_ciin world writable sticky directories, unless they are owned by the 2128c2ecf20Sopenharmony_ciowner of the directory. 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ciWhen set to "2" it also applies to group writable sticky directories. 2158c2ecf20Sopenharmony_ci 2168c2ecf20Sopenharmony_ciThis protection is based on the restrictions in Openwall. 2178c2ecf20Sopenharmony_ci 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ciprotected_hardlinks 2208c2ecf20Sopenharmony_ci-------------------- 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ciA long-standing class of security issues is the hardlink-based 2238c2ecf20Sopenharmony_citime-of-check-time-of-use race, most commonly seen in world-writable 2248c2ecf20Sopenharmony_cidirectories like /tmp. The common method of exploitation of this flaw 2258c2ecf20Sopenharmony_ciis to cross privilege boundaries when following a given hardlink (i.e. a 2268c2ecf20Sopenharmony_ciroot process follows a hardlink created by another user). Additionally, 2278c2ecf20Sopenharmony_cion systems without separated partitions, this stops unauthorized users 2288c2ecf20Sopenharmony_cifrom "pinning" vulnerable setuid/setgid files against being upgraded by 2298c2ecf20Sopenharmony_cithe administrator, or linking to special files. 2308c2ecf20Sopenharmony_ci 2318c2ecf20Sopenharmony_ciWhen set to "0", hardlink creation behavior is unrestricted. 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ciWhen set to "1" hardlinks cannot be created by users if they do not 2348c2ecf20Sopenharmony_cialready own the source file, or do not have read/write access to it. 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ciThis protection is based on the restrictions in Openwall and grsecurity. 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_ciprotected_regular 2408c2ecf20Sopenharmony_ci----------------- 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ciThis protection is similar to protected_fifos, but it 2438c2ecf20Sopenharmony_ciavoids writes to an attacker-controlled regular file, where a program 2448c2ecf20Sopenharmony_ciexpected to create one. 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ciWhen set to "0", writing to regular files is unrestricted. 2478c2ecf20Sopenharmony_ci 2488c2ecf20Sopenharmony_ciWhen set to "1" don't allow O_CREAT open on regular files that we 2498c2ecf20Sopenharmony_cidon't own in world writable sticky directories, unless they are 2508c2ecf20Sopenharmony_ciowned by the owner of the directory. 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ciWhen set to "2" it also applies to group writable sticky directories. 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ciprotected_symlinks 2568c2ecf20Sopenharmony_ci------------------ 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ciA long-standing class of security issues is the symlink-based 2598c2ecf20Sopenharmony_citime-of-check-time-of-use race, most commonly seen in world-writable 2608c2ecf20Sopenharmony_cidirectories like /tmp. The common method of exploitation of this flaw 2618c2ecf20Sopenharmony_ciis to cross privilege boundaries when following a given symlink (i.e. a 2628c2ecf20Sopenharmony_ciroot process follows a symlink belonging to another user). For a likely 2638c2ecf20Sopenharmony_ciincomplete list of hundreds of examples across the years, please see: 2648c2ecf20Sopenharmony_cihttps://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=/tmp 2658c2ecf20Sopenharmony_ci 2668c2ecf20Sopenharmony_ciWhen set to "0", symlink following behavior is unrestricted. 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ciWhen set to "1" symlinks are permitted to be followed only when outside 2698c2ecf20Sopenharmony_cia sticky world-writable directory, or when the uid of the symlink and 2708c2ecf20Sopenharmony_cifollower match, or when the directory owner matches the symlink's owner. 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ciThis protection is based on the restrictions in Openwall and grsecurity. 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_cisuid_dumpable: 2768c2ecf20Sopenharmony_ci-------------- 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ciThis value can be used to query and set the core dump mode for setuid 2798c2ecf20Sopenharmony_cior otherwise protected/tainted binaries. The modes are 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_ci= ========== =============================================================== 2828c2ecf20Sopenharmony_ci0 (default) traditional behaviour. Any process which has changed 2838c2ecf20Sopenharmony_ci privilege levels or is execute only will not be dumped. 2848c2ecf20Sopenharmony_ci1 (debug) all processes dump core when possible. The core dump is 2858c2ecf20Sopenharmony_ci owned by the current user and no security is applied. This is 2868c2ecf20Sopenharmony_ci intended for system debugging situations only. 2878c2ecf20Sopenharmony_ci Ptrace is unchecked. 2888c2ecf20Sopenharmony_ci This is insecure as it allows regular users to examine the 2898c2ecf20Sopenharmony_ci memory contents of privileged processes. 2908c2ecf20Sopenharmony_ci2 (suidsafe) any binary which normally would not be dumped is dumped 2918c2ecf20Sopenharmony_ci anyway, but only if the "core_pattern" kernel sysctl is set to 2928c2ecf20Sopenharmony_ci either a pipe handler or a fully qualified path. (For more 2938c2ecf20Sopenharmony_ci details on this limitation, see CVE-2006-2451.) This mode is 2948c2ecf20Sopenharmony_ci appropriate when administrators are attempting to debug 2958c2ecf20Sopenharmony_ci problems in a normal environment, and either have a core dump 2968c2ecf20Sopenharmony_ci pipe handler that knows to treat privileged core dumps with 2978c2ecf20Sopenharmony_ci care, or specific directory defined for catching core dumps. 2988c2ecf20Sopenharmony_ci If a core dump happens without a pipe handler or fully 2998c2ecf20Sopenharmony_ci qualified path, a message will be emitted to syslog warning 3008c2ecf20Sopenharmony_ci about the lack of a correct setting. 3018c2ecf20Sopenharmony_ci= ========== =============================================================== 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci 3048c2ecf20Sopenharmony_cisuper-max & super-nr 3058c2ecf20Sopenharmony_ci-------------------- 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ciThese numbers control the maximum number of superblocks, and 3088c2ecf20Sopenharmony_cithus the maximum number of mounted filesystems the kernel 3098c2ecf20Sopenharmony_cican have. You only need to increase super-max if you need to 3108c2ecf20Sopenharmony_cimount more filesystems than the current value in super-max 3118c2ecf20Sopenharmony_ciallows you to. 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci 3148c2ecf20Sopenharmony_ciaio-nr & aio-max-nr 3158c2ecf20Sopenharmony_ci------------------- 3168c2ecf20Sopenharmony_ci 3178c2ecf20Sopenharmony_ciaio-nr shows the current system-wide number of asynchronous io 3188c2ecf20Sopenharmony_cirequests. aio-max-nr allows you to change the maximum value 3198c2ecf20Sopenharmony_ciaio-nr can grow to. 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci 3228c2ecf20Sopenharmony_cimount-max 3238c2ecf20Sopenharmony_ci--------- 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ciThis denotes the maximum number of mounts that may exist 3268c2ecf20Sopenharmony_ciin a mount namespace. 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci 3308c2ecf20Sopenharmony_ci2. /proc/sys/fs/binfmt_misc 3318c2ecf20Sopenharmony_ci=========================== 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ciDocumentation for the files in /proc/sys/fs/binfmt_misc is 3348c2ecf20Sopenharmony_ciin Documentation/admin-guide/binfmt-misc.rst. 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci 3378c2ecf20Sopenharmony_ci3. /proc/sys/fs/mqueue - POSIX message queues filesystem 3388c2ecf20Sopenharmony_ci======================================================== 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci 3418c2ecf20Sopenharmony_ciThe "mqueue" filesystem provides the necessary kernel features to enable the 3428c2ecf20Sopenharmony_cicreation of a user space library that implements the POSIX message queues 3438c2ecf20Sopenharmony_ciAPI (as noted by the MSG tag in the POSIX 1003.1-2001 version of the System 3448c2ecf20Sopenharmony_ciInterfaces specification.) 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ciThe "mqueue" filesystem contains values for determining/setting the amount of 3478c2ecf20Sopenharmony_ciresources used by the file system. 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ci/proc/sys/fs/mqueue/queues_max is a read/write file for setting/getting the 3508c2ecf20Sopenharmony_cimaximum number of message queues allowed on the system. 3518c2ecf20Sopenharmony_ci 3528c2ecf20Sopenharmony_ci/proc/sys/fs/mqueue/msg_max is a read/write file for setting/getting the 3538c2ecf20Sopenharmony_cimaximum number of messages in a queue value. In fact it is the limiting value 3548c2ecf20Sopenharmony_cifor another (user) limit which is set in mq_open invocation. This attribute of 3558c2ecf20Sopenharmony_cia queue must be less or equal then msg_max. 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_ci/proc/sys/fs/mqueue/msgsize_max is a read/write file for setting/getting the 3588c2ecf20Sopenharmony_cimaximum message size value (it is every message queue's attribute set during 3598c2ecf20Sopenharmony_ciits creation). 3608c2ecf20Sopenharmony_ci 3618c2ecf20Sopenharmony_ci/proc/sys/fs/mqueue/msg_default is a read/write file for setting/getting the 3628c2ecf20Sopenharmony_cidefault number of messages in a queue value if attr parameter of mq_open(2) is 3638c2ecf20Sopenharmony_ciNULL. If it exceed msg_max, the default value is initialized msg_max. 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci/proc/sys/fs/mqueue/msgsize_default is a read/write file for setting/getting 3668c2ecf20Sopenharmony_cithe default message size value if attr parameter of mq_open(2) is NULL. If it 3678c2ecf20Sopenharmony_ciexceed msgsize_max, the default value is initialized msgsize_max. 3688c2ecf20Sopenharmony_ci 3698c2ecf20Sopenharmony_ci4. /proc/sys/fs/epoll - Configuration options for the epoll interface 3708c2ecf20Sopenharmony_ci===================================================================== 3718c2ecf20Sopenharmony_ci 3728c2ecf20Sopenharmony_ciThis directory contains configuration options for the epoll(7) interface. 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_cimax_user_watches 3758c2ecf20Sopenharmony_ci---------------- 3768c2ecf20Sopenharmony_ci 3778c2ecf20Sopenharmony_ciEvery epoll file descriptor can store a number of files to be monitored 3788c2ecf20Sopenharmony_cifor event readiness. Each one of these monitored files constitutes a "watch". 3798c2ecf20Sopenharmony_ciThis configuration option sets the maximum number of "watches" that are 3808c2ecf20Sopenharmony_ciallowed for each user. 3818c2ecf20Sopenharmony_ciEach "watch" costs roughly 90 bytes on a 32bit kernel, and roughly 160 bytes 3828c2ecf20Sopenharmony_cion a 64bit one. 3838c2ecf20Sopenharmony_ciThe current default value for max_user_watches is the 1/32 of the available 3848c2ecf20Sopenharmony_cilow memory, divided for the "watch" cost in bytes. 385