Lines Matching refs:of

40 Cpusets provide a mechanism for assigning a set of CPUs and Memory
41 Nodes to a set of tasks. In this document "Memory Node" refers to
44 Cpusets constrain the CPU and Memory placement of tasks to only
63 virtual file system, manage the attributes and permissions of these
72 The management of large computer systems, with many processors (CPUs),
75 the efficient scheduling and memory placement of processes.
84 can benefit from explicitly placing jobs on properly sized subsets of
89 * Web Servers running multiple instances of the same web application,
97 executing jobs. The location of the running jobs pages may also be moved
111 Memory Nodes are used by a process or set of processes.
113 The Linux kernel already has a pair of mechanisms to specify on which
119 - Cpusets are sets of allowed CPUs and Memory Nodes, known to the
130 of the parents CPU and Memory Node resources.
131 - The hierarchy of cpusets can be mounted at /dev/cpuset, for
138 The implementation of cpusets requires a few, simple hooks
139 into the rest of the kernel, none in performance critical paths:
168 containing (on top of the standard cgroup files) the following
171 - cpuset.cpus: list of CPUs in that cpuset
172 - cpuset.mems: list of Memory Nodes in that cpuset
177 - cpuset.memory_pressure: measure of how much paging pressure in cpuset
187 command. The properties of a cpuset, such as its flags, allowed
191 The named hierarchical structure of nested cpusets allows partitioning
194 The attachment of each task, automatically inherited at fork by any
195 children of that task, to a cpuset allows organizing the work load
196 on a system into related sets of tasks such that each set is constrained
197 to using the CPUs and Memory Nodes of a particular cpuset. A task
201 Such management of a system "in the large" integrates smoothly with
207 - Its CPUs and Memory Nodes must be a subset of its parents.
211 These rules, and the natural hierarchy of cpusets, enable efficient
212 enforcement of the exclusive guarantee, without having to scan all
213 cpusets every time any of them change to ensure nothing overlaps a
214 exclusive cpuset. Also, the use of a Linux virtual file system (vfs)
216 and name space for cpusets, with a minimum of additional kernel code.
219 read-only. The cpus file automatically tracks the value of
221 automatically tracks the value of node_states[N_MEMORY]--i.e.,
229 a direct ancestor or descendant, may share any of the same CPUs or
235 whether hardwalled or not, restrict allocations of memory for user
241 Only a small amount of typical kernel memory, such as requests from
248 The memory_pressure of a cpuset provides a simple per-cpuset metric
249 of the rate that the tasks in a cpuset are attempting to free up in
250 use memory on the nodes of the cpuset to satisfy additional memory
254 cpusets to efficiently detect what level of memory pressure that job
257 This is useful both on tightly managed systems running a wide mix of
265 to monitor a cpuset for signs of memory pressure. It's up to the
271 code of __alloc_pages() for this metric reduces to simply noticing
279 metric is sharply reduced on large systems, because a scan of
280 the tasklist can be avoided on each set of queries.
282 Because this meter is a running average, instead of an accumulating
284 single read, instead of having to read and accumulate results
285 for a period of time.
291 set of tasks in the cpuset.
294 of data per-cpuset) is kept, and updated by any task attached to that
298 (half-life of 10 seconds) rate of direct page reclaims caused by
299 the tasks in the cpuset, in units of reclaims attempted per second,
313 of preferring to put those pages on the node where the task is running.
318 faulting task is allowed to use, instead of preferring to put those
321 The setting of these flags does not affect anonymous data segment or
322 stack segment pages of a task.
324 By default, both kinds of memory spreading are off, and memory
330 of their parent.
335 mempolicies will not notice any change in these calls as a result of
359 value of a per-task rotor cpuset_mem_spread_rotor to select the next
379 tasks to itself, within the constraints of such placement mechanisms
382 The algorithmic cost of load balancing and its impact on key shared
384 linearly with the number of CPUs being balanced. So the scheduler
385 has support to partition the systems CPUs into a number of sched
387 Each sched domain covers some subset of the CPUs in the system;
392 than one big one, but doing so means that overloads in one of the
404 on separate sets of CPUs, full load balancing is unnecessary.
422 CPUs, and the setting of the "cpuset.sched_load_balance" flag in any other
426 "cpuset.sched_load_balance" should be disabled, and only some of the smaller,
430 the top cpuset that might use non-trivial amounts of CPU, as such tasks
431 may be artificially constrained to some subset of CPUs, depending on
432 the particulars of this flag setting in descendant cpusets. Even if
434 scheduler might not consider the possibility of load balancing that
446 across partially overlapping sets of CPUs would risk unstable dynamics
447 that would be beyond our understanding. So if each of two partially
449 form a single sched domain that is a superset of both. We won't move
457 it will only be assured of no load balancing if no other overlapping
461 one of them has this flag enabled, then the other may find its
463 This is just the general case of the top_cpuset example given a few
465 don't leave tasks that might use non-trivial amounts of CPU in
467 constrained to some subset of the CPUs allowed to them, for lack of
472 of the value of "cpuset.sched_load_balance" in any cpuset.
480 (makes sure that all the CPUs in the cpus_allowed of that cpuset are
488 the whole system, regardless of any other cpuset settings.
491 where it can. It will pick as fine a granularity partition of sched
493 of CPUs allowed to a cpuset having 'cpuset.sched_load_balance' enabled.
496 cpuset code to the scheduler code a partition of the load balanced
497 CPUs in the system. This partition is a set of subsets (represented
498 as an array of struct cpumask) of CPUs, pairwise disjoint, that cover
504 - the 'cpuset.sched_load_balance' flag of a cpuset with non-empty CPUs changes,
506 - or 'cpuset.sched_relax_domain_level' value of a cpuset with non-empty CPUs
526 balance on tick, and at time of some schedule events.
534 And if a CPU run out of tasks in its runqueue, the CPU try to pull
546 woken task B from X to Z since it is out of its searching range.
553 indicates size of searching range in levels ideally as follows,
556 -1 : no request. use system default or follow request of others.
561 4 : search nodes in a chunk of node [on NUMA system]
568 belongs to. Therefore if the flag 'cpuset.sched_load_balance' of a cpuset
593 In order to minimize the impact of cpusets on critical kernel
595 does not support one task updating the memory placement of another
596 task directly, the impact on a task of changing its cpuset CPU
597 or Memory Node placement, or of changing to which cpuset a task
602 a page of memory for that task, the kernel will notice the change
607 of MPOL_BIND nodes are still allowed in the new cpuset. If the task
608 was using MPOL_BIND and now none of its MPOL_BIND nodes are allowed
614 to allocate a page of memory for that task.
620 bound to some subset of its cpuset using the sched_setaffinity() call,
622 negating the effect of the prior sched_setaffinity() call.
624 In summary, the memory placement of a task whose cpuset is changed is
625 updated by the kernel, on the next allocation of a page for that task,
629 of main memory) then that page stays on whatever node it
635 to the task's new cpuset. The relative placement of the page within
637 For example if the page was on the second valid node of the prior cpuset
638 then the page will be placed on the second valid node of the new cpuset.
642 cpuset, that were on nodes in the previous setting of 'cpuset.mems',
643 will be moved to nodes in the new setting of 'mems.'
650 with non-empty cpus. But the moving of some (or all) tasks might fail if
674 4) Start a task that will be the "founding father" of the new job.
679 For example, the following sequence of commands will setup a cpuset
707 (part of Andi Kleen's numa package).
722 tree of the cpusets in the system. For instance, /sys/fs/cgroup/cpuset
743 Reading them will give you information about the state of this cpuset:
790 To add a CPU to a cpuset, write the new list of CPUs including the
795 Similarly to remove a CPU from a cpuset, write the new list of CPUs
832 Q: When I attach processes, only the first of the line gets really attached !