From: David Miller <davem@davemloft.net>
To: ebiederm@xmission.com
Cc: netdev@vger.kernel.org, containers@lists.osdl.org
Subject: Re: [PATCH 1/4] net: Dynamically allocate the per cpu counters for the loopback device.
Date: Thu, 27 Sep 2007 13:56:16 -0700 (PDT) [thread overview]
Message-ID: <20070927.135616.37572002.davem@davemloft.net> (raw)
In-Reply-To: <m1ps03hm8a.fsf@ebiederm.dsl.xmission.com>
From: ebiederm@xmission.com (Eric W. Biederman)
Date: Thu, 27 Sep 2007 14:44:37 -0600
> David Miller <davem@davemloft.net> writes:
>
> > From: ebiederm@xmission.com (Eric W. Biederman)
> > Date: Thu, 27 Sep 2007 01:48:00 -0600
> >
> >> I'm not doing get_cpu/put_cpu so does the comment make sense
> >> in relationship to per_cpu_ptr?
> >
> > It is possible. But someone would need to go check for
> > sure.
>
> Verified.
>
> hard_start_xmit is called inside of a
> rcu_read_lock_bh(),rcu_read_unlock_bh() pair. Which means
> the code will only run on one cpu.
>
> Therefore we do not need get_cpu/put_cpu.
>
> In addition per_cpu_ptr is valid. As it is just a lookup
> into a NR_CPUS sized array by smp_processor_id() to return
> the address of the specific cpu.
>
> The only difference between per_cpu_ptr and __get_cpu_var()
> are the implementation details between statically allocated
> and dynamically allocated per cpu state.
>
> So the comment is still valid, and still interesting it just
> should say per_cpu_ptr instead of __get_cpu_var.
>
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
I've already removed the comment, so you'll have to give
me a patch that adds it back with the new content :-)
prev parent reply other threads:[~2007-09-27 20:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-26 23:53 [PATCH 1/4] net: Dynamically allocate the per cpu counters for the loopback device Eric W. Biederman
2007-09-26 23:55 ` [PATCH 2/4] net ipv4: Remove unnecessary test for the loopback device from inetdev_destroy Eric W. Biederman
2007-09-26 23:58 ` [PATCH 3/4] net ipv4: When possible test for IFF_LOOPBACK and not dev == loopback_dev Eric W. Biederman
2007-09-27 0:00 ` [PATCH 4/4] net: Make the loopback device per network namespace Eric W. Biederman
2007-09-27 5:11 ` David Miller
2007-09-27 12:14 ` [Devel] " Denis V. Lunev
2007-09-27 16:48 ` Eric W. Biederman
2007-09-27 5:10 ` [PATCH 3/4] net ipv4: When possible test for IFF_LOOPBACK and not dev == loopback_dev David Miller
2007-09-27 10:34 ` Daniel Lezcano
2007-09-27 16:10 ` Eric W. Biederman
2007-09-27 5:09 ` [PATCH 2/4] net ipv4: Remove unnecessary test for the loopback device from inetdev_destroy David Miller
2007-09-27 5:09 ` [PATCH 1/4] net: Dynamically allocate the per cpu counters for the loopback device David Miller
2007-09-27 7:48 ` Eric W. Biederman
2007-09-27 18:52 ` David Miller
2007-09-27 20:44 ` Eric W. Biederman
2007-09-27 20:56 ` David Miller [this message]
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=20070927.135616.37572002.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=containers@lists.osdl.org \
--cc=ebiederm@xmission.com \
--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 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.