Please consider to create a ReadyKernel patch for it.

https://readykernel.com/

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 05/26/2017 04:59 PM, Konstantin Khorenko wrote:
The commit is pushed to "branch-rh7-3.10.0-514.16.1.vz7.32.x-ovz" and will 
appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.16.1.vz7.32.4
------>
commit 4ce6f75421155583e24d9d763de8f48c2d3fec16
Author: Stanislav Kinsburskiy <[email protected]>
Date:   Fri May 26 17:59:47 2017 +0400

    net: fix silly mistake with TCP cgroup memory pressure check

    Memory 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

Reply via email to