2013-11-13 22:59:14 +01:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
2015-06-28 16:08:57 +02:00
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
2013-11-13 22:59:14 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
config FS_PROCFS
|
|
|
|
bool "PROCFS File System"
|
|
|
|
default n
|
|
|
|
---help---
|
2013-12-12 16:21:55 +01:00
|
|
|
The PROCFS file system provides access to task status and other driver
|
|
|
|
status through the NuttX file system. The PROCFS may, for example, be
|
|
|
|
mount at /proc. Then information about all of the currently active
|
|
|
|
tasks and threads will be available in /proc.
|
|
|
|
|
|
|
|
if FS_PROCFS
|
|
|
|
|
2015-12-01 21:56:20 +01:00
|
|
|
config FS_PROCFS_REGISTER
|
|
|
|
bool "Run-time registration"
|
|
|
|
default n
|
|
|
|
---help---
|
|
|
|
Support run-time registration of the new entries in the procfs file
|
|
|
|
system.
|
|
|
|
|
2013-12-12 16:21:55 +01:00
|
|
|
menu "Exclude individual procfs entries"
|
|
|
|
|
2017-10-26 21:33:08 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_BLOCKS
|
|
|
|
bool "Exclude fs/blocks information"
|
|
|
|
depends on !DISABLE_MOUNTPOINT
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2017-10-26 21:33:08 +02:00
|
|
|
---help---
|
|
|
|
Causes the fs block usage information to be excluded from the procfs
|
2017-10-28 02:30:18 +02:00
|
|
|
system. This procfs file provides the text output for the NSH 'df'
|
|
|
|
command.
|
2017-10-26 21:33:08 +02:00
|
|
|
|
2023-03-15 13:48:40 +01:00
|
|
|
config FS_PROCFS_EXCLUDE_CPUINFO
|
|
|
|
bool "Exclude cpuinfo procfs"
|
|
|
|
depends on ARCH_HAVE_CPUINFO
|
|
|
|
default DEFAULT_SMALL
|
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_CPULOAD
|
|
|
|
bool "Exclude CPU load"
|
2023-10-26 15:03:16 +02:00
|
|
|
depends on !SCHED_CPULOAD_NONE
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2017-10-26 21:33:08 +02:00
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_ENVIRON
|
|
|
|
bool "Exclude environment information"
|
|
|
|
depends on !FS_PROCFS_EXCLUDE_PROCESS
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2017-10-26 21:33:08 +02:00
|
|
|
---help---
|
2023-04-17 20:33:48 +02:00
|
|
|
Causes the environment variable information to be excluded from the
|
|
|
|
procfs system. This will reduce code space slightly.
|
2013-12-14 17:34:08 +01:00
|
|
|
|
2023-05-07 09:13:31 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_FDT
|
|
|
|
bool "Exclude flattened device tree blob"
|
|
|
|
depends on DEVICE_TREE
|
|
|
|
default DEFAULT_SMALL
|
|
|
|
---help---
|
|
|
|
Causes the flatted device tree information to be excluded from the
|
|
|
|
procfs system. This will reduce code space slightly.
|
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_IOBINFO
|
|
|
|
bool "Exclude iobinfo"
|
|
|
|
depends on MM_IOB
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2018-11-08 17:13:45 +01:00
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_PROCESS
|
|
|
|
bool "Exclude process information"
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2023-04-17 20:33:48 +02:00
|
|
|
---help---
|
|
|
|
Causes the process information to be excluded from the procfs system.
|
|
|
|
This will reduce code space, but then giving access to process info
|
|
|
|
was kinda the whole point of procfs, but hey, whatever.
|
2014-02-22 22:20:12 +01:00
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_INCLUDE_PROGMEM
|
|
|
|
bool "Include prog mem"
|
|
|
|
depends on ARCH_HAVE_PROGMEM && !FS_PROCFS_EXCLUDE_MEMINFO
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2017-11-13 20:33:12 +01:00
|
|
|
|
2022-01-06 13:44:17 +01:00
|
|
|
config FS_PROCFS_EXCLUDE_MEMDUMP
|
|
|
|
bool "Exclude memdump"
|
2023-04-17 20:33:48 +02:00
|
|
|
depends on !FS_PROCFS_EXCLUDE_MEMINFO
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2022-01-06 13:44:17 +01:00
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_MEMINFO
|
|
|
|
bool "Exclude meminfo"
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2016-02-06 18:35:30 +01:00
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_MODULE
|
|
|
|
bool "Exclude module information"
|
|
|
|
depends on MODULE
|
|
|
|
default DEFAULT_SMALL
|
|
|
|
---help---
|
|
|
|
Causes the module information to be excluded from the procfs system.
|
|
|
|
|
|
|
|
config FS_PROCFS_EXCLUDE_MOUNT
|
|
|
|
bool "Exclude fs/mount information"
|
|
|
|
depends on !DISABLE_MOUNTPOINT
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2023-04-17 20:33:48 +02:00
|
|
|
---help---
|
|
|
|
Causes the mount point information to be excluded from the procfs
|
|
|
|
system. This procfs file provides the text output for the NSH 'mount'
|
|
|
|
command.
|
2019-08-17 00:42:25 +02:00
|
|
|
|
2014-02-22 22:20:12 +01:00
|
|
|
config FS_PROCFS_EXCLUDE_MOUNTS
|
|
|
|
bool "Exclude mounts"
|
|
|
|
depends on !DISABLE_MOUNTPOINT
|
2023-04-17 20:33:48 +02:00
|
|
|
default DEFAULT_SMALL
|
2014-02-22 22:20:12 +01:00
|
|
|
|
2015-11-27 19:33:58 +01:00
|
|
|
config FS_PROCFS_EXCLUDE_NET
|
|
|
|
bool "Exclude network"
|
|
|
|
depends on NET
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2015-11-27 19:33:58 +01:00
|
|
|
|
2013-12-12 16:21:55 +01:00
|
|
|
config FS_PROCFS_EXCLUDE_PARTITIONS
|
|
|
|
bool "Exclude partitions"
|
|
|
|
depends on MTD_PARTITION
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2013-12-12 16:21:55 +01:00
|
|
|
|
2017-11-13 16:08:39 +01:00
|
|
|
config FS_PROCFS_EXCLUDE_ROUTE
|
|
|
|
bool "Exclude routing table"
|
|
|
|
depends on !FS_PROCFS_EXCLUDE_NET && NET_ROUTE
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2017-11-13 16:08:39 +01:00
|
|
|
|
2013-12-12 16:21:55 +01:00
|
|
|
config FS_PROCFS_EXCLUDE_SMARTFS
|
|
|
|
bool "Exclude fs/smartfs"
|
|
|
|
depends on FS_SMARTFS
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2013-12-12 16:21:55 +01:00
|
|
|
|
2021-10-14 13:39:44 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_TCBINFO
|
|
|
|
bool "Exclude tcbinfo procfs"
|
2023-07-19 23:28:37 +02:00
|
|
|
depends on ARCH_HAVE_TCBINFO
|
2022-10-15 20:29:20 +02:00
|
|
|
default DEFAULT_SMALL
|
2021-10-14 13:39:44 +02:00
|
|
|
|
2023-04-17 20:33:48 +02:00
|
|
|
config FS_PROCFS_EXCLUDE_UPTIME
|
|
|
|
bool "Exclude uptime"
|
|
|
|
default DEFAULT_SMALL
|
|
|
|
|
|
|
|
config FS_PROCFS_EXCLUDE_USAGE
|
|
|
|
bool "Exclude fs/usage information"
|
|
|
|
depends on !DISABLE_MOUNTPOINT
|
|
|
|
default DEFAULT_SMALL
|
|
|
|
---help---
|
|
|
|
Causes the fs usage information to be excluded from the procfs
|
|
|
|
system. This procfs file provides the text output for the NSH 'df -h'
|
|
|
|
command.
|
|
|
|
|
|
|
|
config FS_PROCFS_EXCLUDE_VERSION
|
|
|
|
bool "Exclude version"
|
|
|
|
default DEFAULT_SMALL
|
|
|
|
|
procfs: add memory pressure notification support
This is a memory monitoring interface implemented with reference to Linux's PSI (Pressure Stall Information),
which can send notifications when the system's remaining memory is below the threshold.
The following example code sets two different thresholds.
When the system memory is below 10MB, a notification is triggered.
When the system memory is below 20 MB, a notification (POLLPRI event) is triggered every 1s.
```
int main(int argc, FAR char *argv[])
{
struct pollfd fds[2];
int ret;
if (argc == 2)
{
char *ptr = malloc(1024*1024*atoi(argv[1]));
printf("Allocating %d MB\n", atoi(argv[1]));
ptr[0] = 0;
return 0;
}
fds[0].fd = open("/proc/pressure/memory", O_RDWR);
fds[1].fd = open("/proc/pressure/memory", O_RDWR);
fds[0].events = POLLPRI;
fds[1].events = POLLPRI;
dprintf(fds[0].fd, "%llu -1", 1024LLU*1024 * 10);
dprintf(fds[1].fd, "%llu 1000000", 1024LLU*1024 * 20);
while (1)
{
ret = poll(fds, 2, -1);
if (ret > 0)
{
printf("Memory pressure: POLLPRI, %d\n", ret);
}
}
return 0;
}
```
https://docs.kernel.org/accounting/psi.html
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-11-29 14:59:49 +01:00
|
|
|
config FS_PROCFS_INCLUDE_PRESSURE
|
|
|
|
bool "Include memory pressure notification"
|
|
|
|
default n
|
|
|
|
|
2019-09-06 17:48:42 +02:00
|
|
|
endmenu # Exclude individual procfs entries
|
2014-07-03 16:50:24 +02:00
|
|
|
endif # FS_PROCFS
|