Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1268403 > unrolled thread
| Started by | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| First post | 2015-11-13 00:50 +0100 |
| Last post | 2015-11-13 17:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 04/14] net: tcp_memcontrol: remove bogus hierarchy pressure propagation Johannes Weiner <hannes@cmpxchg.org> - 2015-11-13 00:50 +0100
Re: [PATCH 04/14] net: tcp_memcontrol: remove bogus hierarchy pressure propagation David Miller <davem@davemloft.net> - 2015-11-13 17:10 +0100
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Date | 2015-11-13 00:50 +0100 |
| Subject | [PATCH 04/14] net: tcp_memcontrol: remove bogus hierarchy pressure propagation |
| Message-ID | <qu9MR-79j-17@gated-at.bofh.it> |
When a cgroup currently breaches its socket memory limit, it enters
memory pressure mode for itself and its *ancestors*. This throttles
transmission in unrelated sibling and cousin subtrees that have
nothing to do with the breached limit.
On the contrary, breaching a limit should make that group and its
*children* enter memory pressure mode. But this happens already,
albeit lazily: if an ancestor limit is breached, siblings will enter
memory pressure on their own once the next packet arrives for them.
So no additional hierarchy code is needed. Remove the bogus stuff.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
include/net/sock.h | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/include/net/sock.h b/include/net/sock.h
index c4b33c9..6fc9147 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1152,14 +1152,8 @@ static inline void sk_leave_memory_pressure(struct sock *sk)
if (*memory_pressure)
*memory_pressure = 0;
- if (mem_cgroup_sockets_enabled && sk->sk_cgrp) {
- struct cg_proto *cg_proto = sk->sk_cgrp;
- struct proto *prot = sk->sk_prot;
-
- for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto))
- cg_proto->memory_pressure = 0;
- }
-
+ if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
+ sk->sk_cgrp->memory_pressure = 0;
}
static inline void sk_enter_memory_pressure(struct sock *sk)
@@ -1167,13 +1161,8 @@ static inline void sk_enter_memory_pressure(struct sock *sk)
if (!sk->sk_prot->enter_memory_pressure)
return;
- if (mem_cgroup_sockets_enabled && sk->sk_cgrp) {
- struct cg_proto *cg_proto = sk->sk_cgrp;
- struct proto *prot = sk->sk_prot;
-
- for (; cg_proto; cg_proto = parent_cg_proto(prot, cg_proto))
- cg_proto->memory_pressure = 1;
- }
+ if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
+ sk->sk_cgrp->memory_pressure = 1;
sk->sk_prot->enter_memory_pressure(sk);
}
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-11-13 17:10 +0100 |
| Subject | Re: [PATCH 04/14] net: tcp_memcontrol: remove bogus hierarchy pressure propagation |
| Message-ID | <qup5f-by-19@gated-at.bofh.it> |
| In reply to | #1268403 |
From: Johannes Weiner <hannes@cmpxchg.org> Date: Thu, 12 Nov 2015 18:41:23 -0500 > When a cgroup currently breaches its socket memory limit, it enters > memory pressure mode for itself and its *ancestors*. This throttles > transmission in unrelated sibling and cousin subtrees that have > nothing to do with the breached limit. > > On the contrary, breaching a limit should make that group and its > *children* enter memory pressure mode. But this happens already, > albeit lazily: if an ancestor limit is breached, siblings will enter > memory pressure on their own once the next packet arrives for them. > > So no additional hierarchy code is needed. Remove the bogus stuff. > > Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: David S. Miller <davem@davemloft.net> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web