Lines Matching refs:sk
11 static inline bool sk_has_memory_pressure(const struct sock *sk) in sk_has_memory_pressure() argument
13 return sk->sk_prot->memory_pressure != NULL; in sk_has_memory_pressure()
24 static inline bool sk_under_global_memory_pressure(const struct sock *sk) in sk_under_global_memory_pressure() argument
26 return proto_memory_pressure(sk->sk_prot); in sk_under_global_memory_pressure()
29 static inline bool sk_under_memory_pressure(const struct sock *sk) in sk_under_memory_pressure() argument
31 if (!sk->sk_prot->memory_pressure) in sk_under_memory_pressure()
34 if (mem_cgroup_sockets_enabled && sk->sk_memcg && in sk_under_memory_pressure()
35 mem_cgroup_under_socket_pressure(sk->sk_memcg)) in sk_under_memory_pressure()
38 return !!READ_ONCE(*sk->sk_prot->memory_pressure); in sk_under_memory_pressure()
48 sk_memory_allocated(const struct sock *sk) in sk_memory_allocated() argument
50 return proto_memory_allocated(sk->sk_prot); in sk_memory_allocated()
62 sk_memory_allocated_add(const struct sock *sk, int val) in sk_memory_allocated_add() argument
64 struct proto *proto = sk->sk_prot; in sk_memory_allocated_add()
73 sk_memory_allocated_sub(const struct sock *sk, int val) in sk_memory_allocated_sub() argument
75 struct proto *proto = sk->sk_prot; in sk_memory_allocated_sub()