lkml.org 
[lkml]   [2013]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: -27% netperf TCP_STREAM regression by "tcp_memcontrol: Kill struct tcp_memcontrol"
From
Date
On Wed, 2013-10-23 at 14:25 +0200, Christoph Paasch wrote:

> may it be the below?
>
>
> Cheers,
> Christoph
>
> ----
> From: Christoph Paasch <christoph.paasch@uclouvain.be>
> Subject: [PATCH] Fix: Dereference pointer-value of sk_prot->memory_pressure
>
> 2e685cad57 (tcp_memcontrol: Kill struct tcp_memcontrol) falsly modified
> the access to memory_pressure of sk->sk_prot->memory_pressure. The patch
> did modify the memory_pressure-field of struct cg_proto, but not the one
> of struct proto.
>
> So, the access to sk_prot->memory_pressure should not be changed.
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
> ---
> include/net/sock.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/net/sock.h b/include/net/sock.h
> index c93542f..e3a18ff 100644
> --- a/include/net/sock.h
> +++ b/include/net/sock.h
> @@ -1137,7 +1137,7 @@ static inline bool sk_under_memory_pressure(const struct sock *sk)
> if (mem_cgroup_sockets_enabled && sk->sk_cgrp)
> return !!sk->sk_cgrp->memory_pressure;
>
> - return !!sk->sk_prot->memory_pressure;
> + return !!*sk->sk_prot->memory_pressure;
> }
>
> static inline void sk_leave_memory_pressure(struct sock *sk)

Nice catch, thanks !

Acked-by: Eric Dumazet <edumazet@google.com>





\
 
 \ /
  Last update: 2013-10-23 16:01    [W:0.069 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site