linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Christoph Paasch <christoph.paasch@uclouvain.be>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	David Miller <davem@davemloft.net>,
	fengguang.wu@intel.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: -27% netperf TCP_STREAM regression by "tcp_memcontrol: Kill struct tcp_memcontrol"
Date: Wed, 23 Oct 2013 06:02:44 -0700	[thread overview]
Message-ID: <1382533364.7572.15.camel@edumazet-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <20131023122543.GH5132@cpaasch-mac>

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>




  reply	other threads:[~2013-10-23 13:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 21:41 -27% netperf TCP_STREAM regression by "tcp_memcontrol: Kill struct tcp_memcontrol" fengguang.wu
2013-10-22 22:00 ` David Miller
2013-10-23  4:38   ` Eric W. Biederman
     [not found]     ` <20131023061019.GA15698@localhost>
2013-10-23  9:43       ` Eric W. Biederman
2013-10-23 11:46         ` Fengguang Wu
2013-10-23 12:25     ` Christoph Paasch
2013-10-23 13:02       ` Eric Dumazet [this message]
2013-10-23 19:55         ` [PATCH] Fix: Dereference pointer-value of sk_prot->memory_pressure Eric W. Biederman
2013-10-23 20:15           ` David Miller
2013-10-23 19:58         ` Eric W. Biederman
2013-10-23 22:07       ` -27% netperf TCP_STREAM regression by "tcp_memcontrol: Kill struct tcp_memcontrol" Fengguang Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382533364.7572.15.camel@edumazet-glaptop.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=christoph.paasch@uclouvain.be \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).