• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:scan +full:- +full:on +full:- +full:init

11 - Portions Copyright (c) 2004-2006 Silicon Graphics, Inc.
12 - Modified by Paul Jackson <pj@sgi.com>
13 - Modified by Christoph Lameter <cl@linux.com>
14 - Modified by Paul Menage <menage@google.com>
15 - Modified by Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
41 ----------------------
45 an on-line node that contains memory.
51 job placement on large systems.
54 Documentation/admin-guide/cgroup-v1/cgroups.rst.
61 schedule a task on a CPU that is not allowed in its cpus_allowed
62 vector, and the kernel page allocator will not allocate a page on a
73 ----------------------------
77 non-uniform access times (NUMA) presents additional challenges for
87 can benefit from explicitly placing jobs on properly sized subsets of
90 This can be especially valuable on:
106 kernel to avoid any additional impact on the critical scheduler or
111 ---------------------------------
116 The Linux kernel already has a pair of mechanisms to specify on which
117 CPUs a task may be scheduled (sched_setaffinity) and on which Memory
122 - Cpusets are sets of allowed CPUs and Memory Nodes, known to the
124 - Each task in the system is attached to a cpuset, via a pointer
126 - Calls to sched_setaffinity are filtered to just those CPUs
128 - Calls to mbind and set_mempolicy are filtered to just
130 - The root cpuset contains all the systems CPUs and Memory
132 - For any cpuset, one can define child cpusets containing a subset
134 - The hierarchy of cpusets can be mounted at /dev/cpuset, for
136 - A cpuset may be marked exclusive, which ensures that no other
139 - You can list all the tasks (by pid) attached to any cpuset.
144 - in init/main.c, to initialize the root cpuset at system boot.
145 - in fork and exit, to attach and detach a task from its cpuset.
146 - in sched_setaffinity, to mask the requested CPUs by what's
148 - in sched.c migrate_live_tasks(), to keep migrating tasks within
150 - in the mbind and set_mempolicy system calls, to mask the requested
152 - in page_alloc.c, to restrict memory to allowed nodes.
153 - in vmscan.c, to restrict page recovery to the current cpuset.
156 browsing and modifying the cpusets presently known to the kernel. No
157 new system calls are added for cpusets - all support for querying and
161 displaying the task's cpus_allowed (on which CPUs it may be scheduled)
162 and mems_allowed (on which Memory Nodes it may obtain memory),
166 Cpus_allowed_list: 0-127
168 Mems_allowed_list: 0-63
171 containing (on top of the standard cgroup files) the following
174 - cpuset.cpus: list of CPUs in that cpuset
175 - cpuset.mems: list of Memory Nodes in that cpuset
176 - cpuset.memory_migrate flag: if set, move pages to cpusets nodes
177 - cpuset.cpu_exclusive flag: is cpu placement exclusive?
178 - cpuset.mem_exclusive flag: is memory placement exclusive?
179 - cpuset.mem_hardwall flag: is memory allocation hardwalled
180 - cpuset.memory_pressure: measure of how much paging pressure in cpuset
181 - cpuset.memory_spread_page flag: if set, spread page cache evenly on allowed nodes
182 - cpuset.memory_spread_slab flag: OBSOLETE. Doesn't have any function.
183 - cpuset.sched_load_balance flag: if set, load balance within CPUs on that cpuset
184 - cpuset.sched_relax_domain_level: the searching range when migrating tasks
188 - cpuset.memory_pressure_enabled flag: compute memory_pressure?
196 a large system into nested, dynamically changeable, "soft-partitions".
200 on a system into related sets of tasks such that each set is constrained
202 may be re-attached to any other cpuset, if allowed by the permissions
203 on the necessary cpuset file system directories.
206 the detailed placement done on individual tasks and memory regions
211 - Its CPUs and Memory Nodes must be a subset of its parents.
212 - It can't be marked exclusive unless its parent is.
213 - If its cpu or memory is exclusive, they may not overlap any sibling.
216 enforcement of the exclusive guarantee, without having to scan all
223 read-only. The cpus file automatically tracks the value of
225 automatically tracks the value of node_states[N_MEMORY]--i.e.,
226 nodes with memory--using the cpuset_track_online_nodes() hook.
229 normally read-only copies of cpuset.cpus and cpuset.mems files
236 See Documentation/admin-guide/cgroup-v2.rst for more information about
241 --------------------------------
243 If a cpuset is cpu or mem exclusive, no other cpuset, other than
255 construct child, non-mem_exclusive cpusets for each individual job.
262 -----------------------------
263 The memory_pressure of a cpuset provides a simple per-cpuset metric
265 use memory on the nodes of the cpuset to satisfy additional memory
272 This is useful both on tightly managed systems running a wide mix of
273 submitted jobs, which may choose to terminate or re-prioritize jobs that
274 are trying to use more memory than allowed on the nodes assigned to them,
291 Why a per-cpuset, running average:
293 Because this meter is per-cpuset, rather than per-task or mm,
295 metric is sharply reduced on large systems, because a scan of
296 the tasklist can be avoided on each set of queries.
303 Because this meter is per-cpuset rather than per-task or mm,
309 A per-cpuset simple digital filter (requires a spinlock and 3 words
310 of data per-cpuset) is kept, and updated by any task attached to that
313 A per-cpuset file provides an integer number representing the recent
314 (half-life of 10 seconds) rate of direct page reclaims caused by
320 ---------------------------
326 If the per-cpuset boolean flag file 'cpuset.memory_spread_page' is set, then
329 of preferring to put those pages on the node where the task is running.
331 If the per-cpuset boolean flag file 'cpuset.memory_spread_slab' is set,
335 pages on the node where the task is running.
341 pages are allocated on the node local to where the task is running,
359 the named feature on.
363 Setting the flag 'cpuset.memory_spread_page' turns on a per-process flag
370 Similarly, setting 'cpuset.memory_spread_slab' turns on the flag
375 value of a per-task rotor cpuset_mem_spread_rotor to select the next
379 round-robin or interleave.
382 to place thread local data on the corresponding node, but that need
390 --------------------------------
393 tasks. If one CPU is underutilized, kernel code running on that
394 CPU will look for tasks on other more overloaded CPUs and move those
398 The algorithmic cost of load balancing and its impact on key shared
404 no two sched domains overlap; some CPUs might not be in any sched
414 have tasks running on them unless explicitly assigned.
419 1) On large systems, load balancing across many CPUs is expensive.
421 on separate sets of CPUs, full load balancing is unnecessary.
422 2) Systems supporting realtime on some CPUs need to minimize
423 system overhead on those CPUs, including avoiding task load
426 When the per-cpuset flag "cpuset.sched_load_balance" is enabled (the default
432 When the per-cpuset flag "cpuset.sched_load_balance" is disabled, then the
434 --except-- in so far as is necessary because some overlapping cpuset
447 the top cpuset that might use non-trivial amounts of CPU, as such tasks
448 may be artificially constrained to some subset of CPUs, depending on
470 This mismatch is why there is not a simple one-to-one relation
474 it will only be assured of no load balancing if no other overlapping
479 tasks only partially load balanced, just on the overlapping CPUs.
482 don't leave tasks that might use non-trivial amounts of CPU in
492 ------------------------------------------------
494 The per-cpuset flag 'cpuset.sched_load_balance' defaults to enabled (contrary
522 - the 'cpuset.sched_load_balance' flag of a cpuset with non-empty CPUs changes,
523 - or CPUs come or go from a cpuset with this flag enabled,
524 - or 'cpuset.sched_relax_domain_level' value of a cpuset with non-empty CPUs
526 - or a cpuset with non-empty CPUs and with this flag enabled is removed,
527 - or a cpu is offlined/onlined.
530 setup - one sched domain for each element (struct cpumask) in the
541 --------------------------------------
544 balance on tick, and at time of some schedule events.
546 When a task is woken up, scheduler try to move the task on idle CPU.
547 For example, if a task A running on CPU X activates another task B
548 on the same CPU X, and if CPU Y is X's sibling and performing idle,
549 then scheduler migrate task B to CPU Y so that task B can start on
550 CPU Y without waiting task A on CPU X.
558 every time. In fact, in some architectures, the searching ranges on
560 while the load balance on tick searches all.
565 As the result, task B on CPU X need to wait task A or wait load balance
566 on the next tick. For some applications in special situation, waiting
572 otherwise initial value -1 that indicates the cpuset has no request.
575 -1 no request. use system default or follow request of others.
576 0 no search.
579 3 search cpus in a node [= system wide on non-NUMA system]
580 4 search nodes in a chunk of node [on NUMA system]
581 5 search system wide [on NUMA system]
584 Not all levels can be present and values can change depending on the
586 /sys/kernel/debug/sched/domains/cpu*/domain*/ for system-specific
592 This file is per-cpuset and affect the sched domain where the cpuset
594 is disabled, then 'cpuset.sched_relax_domain_level' have no effect since
595 there is no sched domain belonging the cpuset.
599 requests 0 and others are -1 then 0 is used.
602 and whether it is acceptable or not depends on your situation.
607 - The migration costs between each cpu can be assumed considerably
610 - The searching cost doesn't have impact(for you) or you can make
612 - The latency is required even it sacrifices cache hit rate etc.
617 --------------------------
619 In order to minimize the impact of cpusets on critical kernel
622 task directly, the impact on a task of changing its cpuset CPU
629 in the task's cpuset, and update its per-task memory placement to
647 the task will be allowed to run on any CPU allowed in its new cpuset,
651 updated by the kernel, on the next allocation of a page for that task,
655 of main memory) then that page stays on whatever node it
660 allocated to it on nodes in its previous cpuset are migrated
663 For example if the page was on the second valid node of the prior cpuset
664 then the page will be placed on the second valid node of the new cpuset.
668 cpuset, that were on nodes in the previous setting of 'cpuset.mems',
676 with non-empty cpus. But the moving of some (or all) tasks might fail if
678 on task attaching. In this failing case, those tasks will stay
697 2) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
709 mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset
713 /bin/echo 2-3 > cpuset.cpus
723 - via the cpuset file system directly, using the various cd, mkdir, echo,
725 - via the C library libcpuset.
726 - via the C library libcgroup.
728 - via the python application cset.
740 ---------------
746 # mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset
784 # /bin/echo 0-7 > cpuset.cpus
788 # /bin/echo 0-7 > cpuset.mems
811 mount -t cpuset X /sys/fs/cgroup/cpuset
815 mount -t cgroup -ocpuset,noprefix X /sys/fs/cgroup/cpuset
819 ------------------------
824 # /bin/echo 1-4 > cpuset.cpus -> set cpus list to cpus 1,2,3,4
825 # /bin/echo 1,2,3,4 > cpuset.cpus -> set cpus list to cpus 1,2,3,4
830 # /bin/echo 1-4,6 > cpuset.cpus -> set cpus list to cpus 1,2,3,4,6
837 # /bin/echo "" > cpuset.cpus -> clear cpus list
840 -----------------
844 # /bin/echo 1 > cpuset.cpu_exclusive -> set flag 'cpuset.cpu_exclusive'
845 # /bin/echo 0 > cpuset.cpu_exclusive -> unset flag 'cpuset.cpu_exclusive'
848 -----------------------