diff options
author | Kuniyuki Iwashima <[email protected]> | 2021-11-24 11:14:29 +0900 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2021-11-26 18:01:57 -0800 |
commit | e6b4b873896f0e9298f70d25726f4bb1e1b265ba (patch) | |
tree | 28cc19f5e0cb930e261ec0ab463c2232370f4dd2 /tools/perf/scripts/python/syscall-counts.py | |
parent | f452be496a5c8f58b1a67cde79e89b9f1cfde31c (diff) |
af_unix: Save hash in sk_hash.
To replace unix_table_lock with per-hash locks in the next patch, we need
to save a hash in each socket because /proc/net/unix or BPF prog iterate
sockets while holding a hash table lock and release it later in a different
function.
Currently, we store a real/pseudo hash in struct unix_address. However, we
do not allocate it to unbound sockets, nor should we do just for that. For
this purpose, we can use sk_hash. Then, we no longer use the hash field in
struct unix_address and can remove it.
Also, this patch does
- rename unix_insert_socket() to unix_insert_unbound_socket()
- remove the redundant list argument from __unix_insert_socket() and
unix_insert_unbound_socket()
- use 'unsigned int' instead of 'unsigned' in __unix_set_addr_hash()
- remove 'inline' from unix_remove_socket() and
unix_insert_unbound_socket().
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions