diff options
author | Anjali Kulkarni <anjali.k.kulkarni@oracle.com> | 2023-07-19 13:18:19 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-07-23 11:34:22 +0100 |
commit | 743acf351bae1ff7ff4aaadd6a406d4d6091d90b (patch) | |
tree | 5f25faf64e85567493ed13529c490c4253742271 /lib/test_blackhole_dev.c | |
parent | 2aa1f7a1f47ce8dac7593af605aaa859b3cf3bb1 (diff) |
connector/cn_proc: Performance improvements
This patch adds the capability to filter messages sent by the proc
connector on the event type supplied in the message from the client
to the connector. The client can register to listen for an event type
given in struct proc_input.
This event based filteting will greatly enhance performance - handling
8K exits takes about 70ms, whereas 8K-forks + 8K-exits takes about 150ms
& handling 8K-forks + 8K-exits + 8K-execs takes 200ms. There are currently
9 different types of events, and we need to listen to all of them. Also,
measuring the time using pidfds for monitoring 8K process exits took
much longer - 200ms, as compared to 70ms using only exit notifications of
proc connector.
We also add a new event type - PROC_EVENT_NONZERO_EXIT, which is
only sent by kernel to a listening application when any process exiting,
has a non-zero exit status. This will help the clients like Oracle DB,
where a monitoring process wants notfications for non-zero process exits
so it can cleanup after them.
This kind of a new event could also be useful to other applications like
Google's lmkd daemon, which needs a killed process's exit notification.
The patch takes care that existing clients using old mechanism of not
sending the event type work without any changes.
cn_filter function checks to see if the event type being notified via
proc connector matches the event type requested by client, before
sending(matches) or dropping(does not match) a packet.
Signed-off-by: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/test_blackhole_dev.c')
0 files changed, 0 insertions, 0 deletions