Back to home page

OSCL-LXR

 
 

    


0001 =================
0002 Scheduler debugfs
0003 =================
0004 
0005 Booting a kernel with CONFIG_SCHED_DEBUG=y will give access to
0006 scheduler specific debug files under /sys/kernel/debug/sched. Some of
0007 those files are described below.
0008 
0009 numa_balancing
0010 ==============
0011 
0012 `numa_balancing` directory is used to hold files to control NUMA
0013 balancing feature.  If the system overhead from the feature is too
0014 high then the rate the kernel samples for NUMA hinting faults may be
0015 controlled by the `scan_period_min_ms, scan_delay_ms,
0016 scan_period_max_ms, scan_size_mb` files.
0017 
0018 
0019 scan_period_min_ms, scan_delay_ms, scan_period_max_ms, scan_size_mb
0020 -------------------------------------------------------------------
0021 
0022 Automatic NUMA balancing scans tasks address space and unmaps pages to
0023 detect if pages are properly placed or if the data should be migrated to a
0024 memory node local to where the task is running.  Every "scan delay" the task
0025 scans the next "scan size" number of pages in its address space. When the
0026 end of the address space is reached the scanner restarts from the beginning.
0027 
0028 In combination, the "scan delay" and "scan size" determine the scan rate.
0029 When "scan delay" decreases, the scan rate increases.  The scan delay and
0030 hence the scan rate of every task is adaptive and depends on historical
0031 behaviour. If pages are properly placed then the scan delay increases,
0032 otherwise the scan delay decreases.  The "scan size" is not adaptive but
0033 the higher the "scan size", the higher the scan rate.
0034 
0035 Higher scan rates incur higher system overhead as page faults must be
0036 trapped and potentially data must be migrated. However, the higher the scan
0037 rate, the more quickly a tasks memory is migrated to a local node if the
0038 workload pattern changes and minimises performance impact due to remote
0039 memory accesses. These files control the thresholds for scan delays and
0040 the number of pages scanned.
0041 
0042 ``scan_period_min_ms`` is the minimum time in milliseconds to scan a
0043 tasks virtual memory. It effectively controls the maximum scanning
0044 rate for each task.
0045 
0046 ``scan_delay_ms`` is the starting "scan delay" used for a task when it
0047 initially forks.
0048 
0049 ``scan_period_max_ms`` is the maximum time in milliseconds to scan a
0050 tasks virtual memory. It effectively controls the minimum scanning
0051 rate for each task.
0052 
0053 ``scan_size_mb`` is how many megabytes worth of pages are scanned for
0054 a given scan.