Skip to content
Commit 66e6369e authored by Abel Wu's avatar Abel Wu Committed by Paolo Abeni
Browse files

sock: Ignore memcg pressure heuristics when raising allocated



Before sockets became aware of net-memcg's memory pressure since
commit e1aab161 ("socket: initial cgroup code."), the memory
usage would be granted to raise if below average even when under
protocol's pressure. This provides fairness among the sockets of
same protocol.

That commit changes this because the heuristic will also be
effective when only memcg is under pressure which makes no sense.
So revert that behavior.

After reverting, __sk_mem_raise_allocated() no longer considers
memcg's pressure. As memcgs are isolated from each other w.r.t.
memory accounting, consuming one's budget won't affect others.
So except the places where buffer sizes are needed to be tuned,
allow workloads to use the memory they are provisioned.

Signed-off-by: default avatarAbel Wu <wuyun.abel@bytedance.com>
Acked-by: default avatarShakeel Butt <shakeelb@google.com>
Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20231019120026.42215-3-wuyun.abel@bytedance.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 2e12072c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment