-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
procfs: task_diag: remove unused computation (nice/priority) in TASK_… #1
Commits on Nov 15, 2018
-
kernel: define taststats commands in the one place
Currently if we add a new TASKSTATS_ constant, we will chanage all CGROUPSTATS_ contants and break backward compatibility. Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 2034548 - Browse repository at this point
Copy the full SHA 2034548View commit details -
0000-RFC-kernel-add-a-netlink-interface-to-get-informatio.patch
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 3021623 - Browse repository at this point
Copy the full SHA 3021623View commit details -
proc: pick out a function to iterate task children
This function will be used in task_diag. Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 54a4b0a - Browse repository at this point
Copy the full SHA 54a4b0aView commit details -
proc: export task_first_tid() and task_next_tid()
It will be more convenient when this function will be used in task_diag. Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 9ab685b - Browse repository at this point
Copy the full SHA 9ab685bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f35d392 - Browse repository at this point
Copy the full SHA f35d392View commit details -
task_diag: add a new interface to get information about tasks (v4)
The task-diag interface allows to get information about running processes (roughly same info that is now available from /proc/PID/* files). Compared to /proc/PID/*, it is faster, more flexible and provides data in a binary format. Task-diag was created using the basic idea of socket_diag. Here is the /proc/task-diag file, which operates based on the following principles: * Transactional: write request, read response * Netlink message format (same as used by sock_diag; binary and extendable) A request messages is described by the task_diag_pid structure: struct task_diag_pid { __u64 show_flags; __u64 dump_strategy; __u32 pid; }; A respone is a set of netlink messages. Each message describes one task. All task properties are divided on groups. A message contains the TASK_DIAG_PID group, and other groups if they have been requested in show_flags. For example, if show_flags contains TASK_DIAG_SHOW_BASE, a response will contain the TASK_DIAG_CRED group which is described by the task_diag_creds structure. struct task_diag_base { __u32 tgid; __u32 pid; __u32 ppid; __u32 tpid; __u32 sid; __u32 pgid; __u8 state; char comm[TASK_DIAG_COMM_LEN]; }; The dump_strategy field will be used in following patches to request information for a group of processes. v2: A few changes from David Ahern Use a consistent name Add max attr enum task diag: Send pid as u32 Change _MSG/msg references to base Fix 8-byte alignment v3: take pid namespace from scm credentials. There is a pid of a process which sent an request. If we need to get information from another namespace, we can set pid in scm of a process from this namespaces. v4: use a transaction file instead of netlink Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for dacb1e2 - Browse repository at this point
Copy the full SHA dacb1e2View commit details -
task_diag: add a new group to get process credentials
A response is represented by the task_diag_creds structure: struct task_diag_creds { struct task_diag_caps cap_inheritable; struct task_diag_caps cap_permitted; struct task_diag_caps cap_effective; struct task_diag_caps cap_bset; __u32 uid; __u32 euid; __u32 suid; __u32 fsuid; __u32 gid; __u32 egid; __u32 sgid; __u32 fsgid; }; This group is optional and it's filled only if show_flags contains TASK_DIAG_SHOW_CRED. Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 497d76e - Browse repository at this point
Copy the full SHA 497d76eView commit details -
task_diag: add a new group to get tasks memory mappings (v2)
v2: Fixes from David Ahern * Fix 8-byte alignment * Change implementation of DIAG_VMA attribute: This patch puts the filename into the task_diag_vma struct and converts TASK_DIAG_VMA attribute into a series of task_diag_vma. Now is there is a single TASK_DIAG_VMA attribute that is parsed as: | struct task_diag_vma | filename | ... Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 0537af3 - Browse repository at this point
Copy the full SHA 0537af3View commit details -
task_diag: add ability to dump children and threads
Now we can dump all task or children, threads of a specified task. It's an example how this interface can be expanded for different use-cases. v2: Fixes from David Ahern Add missing break in iter_stop Fix 8-byte alignment issues Cc: David Ahern <dsahern@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for f397981 - Browse repository at this point
Copy the full SHA f397981View commit details -
task_diag: Only add VMAs for thread_group leader
threads of a process share the same VMAs, so when dumping all threads for all processes only push vma data for group leader. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 81f8f74 - Browse repository at this point
Copy the full SHA 81f8f74View commit details -
task_diag: add a flag to mark incomplete messages
If all information about a process don't fit in a message, it's marked by the TASK_DIAG_FLAG_CONT flag and the next message will describe the same process.
Configuration menu - View commit details
-
Copy full SHA for f5fd07a - Browse repository at this point
Copy the full SHA f5fd07aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e64ecb - Browse repository at this point
Copy the full SHA 1e64ecbView commit details -
Configuration menu - View commit details
-
Copy full SHA for f12091b - Browse repository at this point
Copy the full SHA f12091bView commit details -
Documentation: add documentation for task_diag
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 17c4ac9 - Browse repository at this point
Copy the full SHA 17c4ac9View commit details -
selftest: check the task_diag functinonality
Here are two test (example) programs. task_diag - request information for two processes. test_diag_all - request information about all processes v2: Fixes from David Ahern: * task_diag: Fix 8-byte alignment for vma and vma_stats Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for 7d43b87 - Browse repository at this point
Copy the full SHA 7d43b87View commit details -
task_diag: Enhance fork tool to spawn threads
Add option to fork threads as well as processes. Make the sleep time configurable too so that spawned tasks exit on their own. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: Andrey Vagin <avagin@openvz.org>
Configuration menu - View commit details
-
Copy full SHA for a7daa55 - Browse repository at this point
Copy the full SHA a7daa55View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd56a8d - Browse repository at this point
Copy the full SHA fd56a8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c788196 - Browse repository at this point
Copy the full SHA c788196View commit details -
Configuration menu - View commit details
-
Copy full SHA for 191db8e - Browse repository at this point
Copy the full SHA 191db8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c3b342 - Browse repository at this point
Copy the full SHA 4c3b342View commit details -
task_next_child() s/unsigned int pos/loff_t pos
pos should be loff_t type. It's might be fine to truncate it to unsigned int in this case, but it's better not to. E.g. see 9f6e963 ("proc: fix ->f_pos overflows in first_tid()") Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Configuration menu - View commit details
-
Copy full SHA for 3b61077 - Browse repository at this point
Copy the full SHA 3b61077View commit details -
task_diag: use proper loff_t type for pos.
Just to be safe. If truncation to unsigned int is fine it should be a separate patch Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Configuration menu - View commit details
-
Copy full SHA for 014f2ff - Browse repository at this point
Copy the full SHA 014f2ffView commit details -
selftest/task_diag: Add TASK_DIAG_SHOW_STAT test.
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Configuration menu - View commit details
-
Copy full SHA for 2a9e0ea - Browse repository at this point
Copy the full SHA 2a9e0eaView commit details
Commits on Jul 22, 2019
-
procfs: task_diag: remove unused computation (nice/priority) in TASK_…
…DIAG_STAT nice and priority are computed but not used. Signe-off-by: Marc Titinger <marc.titinger@magnetimarelli.com>
Configuration menu - View commit details
-
Copy full SHA for 2caa530 - Browse repository at this point
Copy the full SHA 2caa530View commit details