All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	tgraf@suug.ch, Tom Herbert <tom@herbertland.com>,
	Jiri Benc <jbenc@redhat.com>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Subject: Re: [PATCH] ip_tunnel: disable preemption when updating per-cpu tstats
Date: Thu, 12 Nov 2015 17:52:18 +0100	[thread overview]
Message-ID: <CAHmME9r5bJqX-XRK4iPkkB_bL77=kAO4askgb4DZ_cvAHfSxfA@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9qF2Xi91BTWNSXBoDmzxyPyqSPbFg8ZDN4S-0kSq-RtKA@mail.gmail.com>

By the way, in case anybody is interested, I've done a little bit of
historical digging work. The functions in question date back to
aa0010f8 from 2012. Before that commit, statistics structures would be
incremented after each tunnel's driver itself dereferenced the per-cpu
variable. When this got factored out into iptunnel_xmit_stats, the
author of aa0010f8 simply took the code from the tunnel drivers, which
included the use of "this_cpu_ptr" instead of "get_cpu_ptr", because
presumably each driver was able to ensure preemption was disabled in
its codepath. With the generalization of this functionality into the
globally useful iptunnel_xmit_stats, we'll need to be using
"get_cpu_ptr" instead.

  reply	other threads:[~2015-11-12 16:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 15:30 [PATCH] ip_tunnel: disable preemption when updating per-cpu tstats Jason A. Donenfeld
2015-11-12 16:25 ` Hannes Frederic Sowa
2015-11-12 16:36   ` Jason A. Donenfeld
2015-11-12 16:52     ` Jason A. Donenfeld [this message]
2015-11-12 16:35 ` [PATCH v2] " Jason A. Donenfeld
2015-11-16 10:04   ` Hannes Frederic Sowa
2015-11-16 19:17   ` David Miller
2015-11-16 19:33     ` Jason A. Donenfeld
2015-11-18 20:22 [PATCH] " Jason A. Donenfeld
2015-11-18 21:17 ` Greg KH

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='CAHmME9r5bJqX-XRK4iPkkB_bL77=kAO4askgb4DZ_cvAHfSxfA@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=jbenc@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tgraf@suug.ch \
    --cc=tom@herbertland.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.