On 05/26/2017 03:59 PM, Stanislav Kinsburskiy wrote: > Memmory pressure is referenced as a pointer in socket structure. > Simple check for pointer address will always return true for each socket, > allocated with enabled mem_cg. > Memory pressure value has to checked instead. > > https://jira.sw.ru/browse/PSBM-66468 > > Signed-off-by: Stanislav Kinsburskiy <[email protected]>
Acked-by: Andrey Ryabinin <[email protected]> > --- > include/net/tcp.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/net/tcp.h b/include/net/tcp.h > index d64d30b..f2b4843 100644 > --- a/include/net/tcp.h > +++ b/include/net/tcp.h > @@ -298,7 +298,7 @@ extern int tcp_memory_pressure; > static inline bool tcp_under_memory_pressure(const struct sock *sk) > { > if (mem_cgroup_sockets_enabled && sk->sk_cgrp) > - return !!sk->sk_cgrp->memory_pressure; > + return *sk->sk_cgrp->memory_pressure; > > return tcp_memory_pressure; > } > _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
