Home
last modified time | relevance | path

Searched refs:pids (Results 1 – 25 of 90) sorted by relevance

1234

/linux/kernel/cgroup/
H A Dpids.c73 static struct pids_cgroup *parent_pids(struct pids_cgroup *pids) in parent_pids() argument
75 return css_pids(pids->css.parent); in parent_pids()
81 struct pids_cgroup *pids; in pids_css_alloc() local
83 pids = kzalloc(sizeof(struct pids_cgroup), GFP_KERNEL); in pids_css_alloc()
84 if (!pids) in pids_css_alloc()
87 atomic64_set(&pids->limit, PIDS_MAX); in pids_css_alloc()
88 return &pids->css; in pids_css_alloc()
114 static void pids_cancel(struct pids_cgroup *pids, int num) in pids_cancel() argument
120 WARN_ON_ONCE(atomic64_add_negative(-num, &pids->counter)); in pids_cancel()
128 static void pids_uncharge(struct pids_cgroup *pids, int num) in pids_uncharge() argument
[all …]
/linux/Documentation/admin-guide/cgroup-v1/
H A Dpids.rst19 In order to use the `pids` controller, set the maximum number of tasks in
20 pids.max (this is not available in the root cgroup for obvious reasons). The
21 number of processes currently in the cgroup is given by pids.current.
24 to have pids.current > pids.max. This can be done by either setting the limit to
25 be smaller than pids.current, or attaching enough processes to the cgroup such
26 that pids.current > pids.max. However, it is not possible to violate a cgroup
30 To set a cgroup to have no limit, set pids.max to "max". This is the default for
34 pids.current tracks all child cgroup hierarchies, so parent/pids.current is a
35 superset of parent/child/pids.current.
37 The pids.events file contains event counters:
[all …]
/linux/tools/testing/selftests/arm64/fp/
H A Dssve-stress10 pids=
17 if [ -n "$pids" ]; then
18 kill $pids
19 wait $pids
20 pids=
46 pids=$pids\ $!
53 kill -USR1 $pids
55 pids=$pids\ $!
H A Dza-stress10 pids=
17 if [ -n "$pids" ]; then
18 kill $pids
19 wait $pids
20 pids=
46 pids=$pids\ $!
53 kill -USR1 $pids
55 pids=$pids\ $!
H A Dsve-stress10 pids=
17 if [ -n "$pids" ]; then
18 kill $pids
19 wait $pids
20 pids=
46 pids=$pids\ $!
53 kill -USR1 $pids
55 pids=$pids\ $!
H A Dfpsimd-stress10 pids=
17 if [ -n "$pids" ]; then
18 kill $pids
19 wait $pids
20 pids=
47 pids=$pids\ $!
54 kill -USR1 $pids
56 pids=$pids\ $!
/linux/tools/testing/selftests/sched_ext/
H A Dinit_enable_count.c25 pid_t pids[num_pre_forks]; in run_test() local
43 pids[i] = fork(); in run_test()
44 SCX_FAIL_IF(pids[i] < 0, "Failed to fork child"); in run_test()
45 if (pids[i] == 0) { in run_test()
55 SCX_FAIL_IF(waitpid(pids[i], &status, 0) != pids[i], in run_test()
71 pids[i] = fork(); in run_test()
72 SCX_FAIL_IF(pids[i] < 0, "Failed to fork child"); in run_test()
74 if (pids[i] == 0) { in run_test()
92 SCX_FAIL_IF(waitpid(pids[i], &status, 0) != pids[i], in run_test()
101 pids[i] = fork(); in run_test()
[all …]
H A Dselect_cpu_dispatch.c34 pid_t pids[NUM_CHILDREN]; in run() local
41 pids[i] = fork(); in run()
42 if (pids[i] == 0) { in run()
49 SCX_EQ(waitpid(pids[i], &status, 0), pids[i]); in run()
H A Dselect_cpu_dfl_nodispatch.c34 pid_t pids[NUM_CHILDREN]; in run() local
41 pids[i] = fork(); in run()
42 if (pids[i] == 0) { in run()
49 SCX_EQ(waitpid(pids[i], &status, 0), pids[i]); in run()
H A Dselect_cpu_dfl.c34 pid_t pids[NUM_CHILDREN]; in run() local
41 pids[i] = fork(); in run()
42 if (pids[i] == 0) { in run()
49 SCX_EQ(waitpid(pids[i], &status, 0), pids[i]); in run()
/linux/tools/testing/selftests/namespaces/
H A Dlistns_pagination_bug.c34 pid_t pids[10]; in TEST() local
45 pids[i] = fork(); in TEST()
46 ASSERT_GE(pids[i], 0); in TEST()
48 if (pids[i] == 0) { in TEST()
82 kill(pids[j], SIGKILL); in TEST()
84 waitpid(pids[j], NULL, 0); in TEST()
95 kill(pids[i], SIGKILL); in TEST()
97 waitpid(pids[i], NULL, 0); in TEST()
122 kill(pids[j], SIGKILL); in TEST()
124 waitpid(pids[j], NULL, 0); in TEST()
[all …]
H A Dstress_test.c103 pid_t pids[50]; in TEST() local
122 pids[i] = fork(); in TEST()
123 ASSERT_GE(pids[i], 0); in TEST()
125 if (pids[i] == 0) { in TEST()
162 kill(pids[j], SIGKILL); in TEST()
164 waitpid(pids[j], NULL, 0); in TEST()
185 kill(pids[j], SIGKILL); in TEST()
187 waitpid(pids[j], NULL, 0); in TEST()
197 waitpid(pids[i], &status, 0); in TEST()
354 pid_t pids[30]; in TEST() local
[all …]
/linux/tools/testing/selftests/pid_namespace/
H A Dpid_max.c86 pid_t pids[2]; in pid_max_nested_inner() local
116 pids[0] = fork(); in pid_max_nested_inner()
117 if (pids[0] < 0) { in pid_max_nested_inner()
122 if (pids[0] == 0) in pid_max_nested_inner()
125 pids[1] = fork(); in pid_max_nested_inner()
126 wait_for_pid(pids[0]); in pid_max_nested_inner()
127 if (pids[1] >= 0) { in pid_max_nested_inner()
128 if (pids[1] == 0) in pid_max_nested_inner()
130 wait_for_pid(pids[1]); in pid_max_nested_inner()
160 pid_t pids[1000]; in pid_max_nested_outer() local
[all …]
/linux/tools/testing/selftests/cgroup/
H A Dtest_kill.c58 pid_t pids[100]; in test_cgkill_simple() local
71 pids[i] = cg_run_nowait(cgroup, child_fn, NULL); in test_cgkill_simple()
86 wait_for_pid(pids[i]); in test_cgkill_simple()
115 pid_t pids[5]; in test_cgkill_tree() local
164 pids[0] = cg_run_nowait(cgroup[2], child_fn, NULL); in test_cgkill_tree()
165 pids[1] = cg_run_nowait(cgroup[7], child_fn, NULL); in test_cgkill_tree()
166 pids[2] = cg_run_nowait(cgroup[9], child_fn, NULL); in test_cgkill_tree()
167 pids[3] = cg_run_nowait(cgroup[9], child_fn, NULL); in test_cgkill_tree()
168 pids[4] = cg_run_nowait(cgroup[9], child_fn, NULL); in test_cgkill_tree()
190 wait_for_pid(pids[i]); in test_cgkill_tree()
/linux/Documentation/userspace-api/media/dvb/
H A Ddmx-get-pes-pids.rst20 ``int ioctl(fd, DMX_GET_PES_PIDS, __u16 pids[5])``
28 ``pids``
41 pids[DMX_PES_AUDIO] 0 first audio PID
42 pids[DMX_PES_VIDEO] 1 first video PID
43 pids[DMX_PES_TELETEXT] 2 first teletext PID
44 pids[DMX_PES_SUBTITLE] 3 first subtitle PID
45 pids[DMX_PES_PCR] 4 first Program Clock Reference PID
/linux/tools/testing/selftests/perf_events/
H A Dremove_on_exec.c200 pid_t pids[30]; in TEST_F() local
203 for (i = 0; i < sizeof(pids) / sizeof(pids[0]); i++) { in TEST_F()
204 pids[i] = fork(); in TEST_F()
205 if (pids[i] == 0) { in TEST_F()
217 for (i = 0; i < sizeof(pids) / sizeof(pids[0]); i++) { in TEST_F()
219 EXPECT_EQ(waitpid(pids[i], &tmp, WNOHANG), 0); in TEST_F()
220 EXPECT_EQ(kill(pids[i], SIGKILL), 0); in TEST_F()
/linux/tools/testing/selftests/mm/
H A Dmigration.c29 pid_t *pids; in FIXTURE() local
56 self->pids = malloc(self->nthreads * sizeof(*self->pids)); in FIXTURE_SETUP()
57 ASSERT_NE(self->pids, NULL); in FIXTURE_SETUP()
63 free(self->pids); in FIXTURE_TEARDOWN()
172 self->pids[i] = pid;
178 ASSERT_EQ(kill(self->pids[i], SIGTERM), 0);
244 self->pids[i] = pid;
250 ASSERT_EQ(kill(self->pids[i], SIGTERM), 0);
304 self->pids[i] = pid;
310 ASSERT_EQ(kill(self->pids[i], SIGTERM), 0);
/linux/tools/testing/selftests/powerpc/pmu/ebb/
H A Dmulti_ebb_procs_test.c77 pid_t pids[NR_CHILDREN]; in multi_ebb_procs() local
85 pids[i] = fork(); in multi_ebb_procs()
86 if (pids[i] == 0) in multi_ebb_procs()
96 kill(pids[i], SIGINT); in multi_ebb_procs()
98 rc |= wait_for_child(pids[i]); in multi_ebb_procs()
/linux/drivers/usb/early/
H A Dehci-dbgp.c197 u32 pids, lpid; in dbgp_wait_until_done() local
203 pids = readl(&ehci_debug->pids); in dbgp_wait_until_done()
204 lpid = DBGP_PID_GET(pids); in dbgp_wait_until_done()
270 u32 pids, ctrl; in dbgp_bulk_write() local
277 pids = readl(&ehci_debug->pids); in dbgp_bulk_write()
278 pids = dbgp_pid_write_update(pids, USB_PID_OUT); in dbgp_bulk_write()
287 writel(pids, &ehci_debug->pids); in dbgp_bulk_write()
296 u32 pids, addr, ctrl; in dbgp_bulk_read() local
304 pids = readl(&ehci_debug->pids); in dbgp_bulk_read()
305 pids = dbgp_pid_read_update(pids, USB_PID_IN); in dbgp_bulk_read()
[all …]
/linux/drivers/media/firewire/
H A Dfiredtv-dvb.c53 u16 pids[16]; in fdtv_start_feed() local
96 collect_channels(fdtv, &pidc, pids); in fdtv_start_feed()
106 ret = avc_tuner_set_pids(fdtv, pidc, pids); in fdtv_start_feed()
124 u16 pids[16]; in fdtv_stop_feed() local
135 demux->pids[dvbdmxfeed->pes_type] |= 0x8000; in fdtv_stop_feed()
149 collect_channels(fdtv, &pidc, pids); in fdtv_stop_feed()
151 ret = avc_tuner_set_pids(fdtv, pidc, pids); in fdtv_stop_feed()
/linux/tools/testing/selftests/net/
H A Dunicast_extensions.sh122 ip netns pids $foo_ns | xargs -r kill -9
123 ip netns pids $bar_ns | xargs -r kill -9
147 ip netns pids $foo_ns | xargs -r kill -9
148 ip netns pids $bar_ns | xargs -r kill -9
149 ip netns pids $router_ns | xargs -r kill -9
/linux/scripts/
H A Dbootgraph.pl60 my %pids;
80 $pids{$func} = $1;
102 $pids{$func} = $pid;
178 my $pid = $pids{$key};
/linux/kernel/
H A Dpid.c150 void free_pids(struct pid **pids) in free_pids() argument
158 if (pids[tmp]) in free_pids()
159 free_pid(pids[tmp]); in free_pids()
334 &task->signal->pids[type]; in task_pid_ptr()
350 static void __change_pid(struct pid **pids, struct task_struct *task, in __change_pid() argument
368 WARN_ON(pids[type]); in __change_pid()
369 pids[type] = pid; in __change_pid()
372 void detach_pid(struct pid **pids, struct task_struct *task, enum pid_type type) in detach_pid() argument
374 __change_pid(pids, task, type, NULL); in detach_pid()
377 void change_pid(struct pid **pids, struct task_struct *task, enum pid_type type, in change_pid() argument
[all …]
/linux/tools/perf/util/
H A Dbpf_trace_augment.c83 int augmented_syscalls__set_filter_pids(unsigned int nr, pid_t *pids) in augmented_syscalls__set_filter_pids() argument
92 err = bpf_map__update_elem(skel->maps.pids_filtered, &pids[i], in augmented_syscalls__set_filter_pids()
93 sizeof(*pids), &value, sizeof(value), in augmented_syscalls__set_filter_pids()
/linux/tools/tracing/rtla/tests/scripts/
H A Dcheck-priority.sh3 pids="$(pgrep ^$1)" || exit 1
4 for pid in $pids

1234