staticinlinevoid proto_memory_pcpu_drain(struct proto *proto)
{ int val = this_cpu_xchg(*proto->per_cpu_fw_alloc, 0);
if (val)
atomic_long_add(val, proto->memory_allocated);
}
staticinlinevoid
sk_memory_allocated_add(conststruct sock *sk, int val)
{ struct proto *proto = sk->sk_prot;
val = this_cpu_add_return(*proto->per_cpu_fw_alloc, val);
if (unlikely(val >= READ_ONCE(net_hotdata.sysctl_mem_pcpu_rsv)))
proto_memory_pcpu_drain(proto);
}
staticinlinevoid
sk_memory_allocated_sub(conststruct sock *sk, int val)
{ struct proto *proto = sk->sk_prot;
val = this_cpu_sub_return(*proto->per_cpu_fw_alloc, val);
if (unlikely(val <= -READ_ONCE(net_hotdata.sysctl_mem_pcpu_rsv)))
proto_memory_pcpu_drain(proto);
}
#endif/* _PROTO_MEMORY_H */
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.16Bemerkung:
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.