From: David Miller <davem@davemloft.net>
To: gerlitz.or@gmail.com
Cc: kurup.manish@gmail.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us,
jakub.kicinski@netronome.com,
pieter.jansenvanvuuren@netronome.com, simon.horman@netronome.com,
john.hurley@netronome.com, oss-drivers@netronome.com,
netdev@vger.kernel.org, aring@mojatatu.com, mrv@mojatatu.com,
manish.kurup@verizon.com
Subject: Re: [PATCH net-next v10 1/3] act_vlan: Change stats update to use per-core stats
Date: Thu, 09 Nov 2017 08:42:40 +0900 (KST) [thread overview]
Message-ID: <20171109.084240.936752820428817969.davem@davemloft.net> (raw)
In-Reply-To: <CAJ3xEMieRd+4UOD1zxoiO-ovR=URBARQb--WdDxy54RuLF2Y7Q@mail.gmail.com>
From: Or Gerlitz <gerlitz.or@gmail.com>
Date: Thu, 9 Nov 2017 06:40:06 +0900
> On Thu, Nov 9, 2017 at 12:45 AM, Manish Kurup <kurup.manish@gmail.com> wrote:
>> On Wed, Nov 8, 2017 at 9:20 AM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
>>> On Wed, Nov 8, 2017 at 9:03 PM, Manish Kurup <kurup.manish@gmail.com> wrote:
>
>>>> @@ -30,9 +30,10 @@ static int tcf_vlan(struct sk_buff *skb, const struct tc_action *a,
>>>> int err;
>>>> u16 tci;
>>>>
>>>> - spin_lock(&v->tcf_lock);
>>>> tcf_lastuse_update(&v->tcf_tm);
>>>> - bstats_update(&v->tcf_bstats, skb);
>>>> + bstats_cpu_update(this_cpu_ptr(v->common.cpu_bstats), skb);
>>>> +
>>>> + spin_lock(&v->tcf_lock);
>>>> action = v->tcf_action;
>>>
>
>>> before your changes the spin lock also protected the lastuse update call but
>>> now it doesn't, why?
>
>> Phase I of my changes, was to get rid of spin_locks, and convert the
>> stats to a per-cpu stats model to get better forwarding performance.
>> While doing this, I looked at a few 'model TC actions' within
>> net/sched (tcf_mirred for example). Neither of them protected the
>> tcf_lastuse_update(). I assumed that this was the case because this
>> was a 'display-only' field, and as long as it changed to a latest
>> timestamp based on packets received, it was OK.
>
> this is really late in the review cycle so lets not stop for that but
> if for some reason there's V11 - would be good to put a comment on
> that in the change log
I think the async update of this lastuse value should be fine.
prev parent reply other threads:[~2017-11-08 23:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 12:03 [PATCH net-next v10 1/3] act_vlan: Change stats update to use per-core stats Manish Kurup
2017-11-08 14:20 ` Or Gerlitz
2017-11-08 15:45 ` Manish Kurup
2017-11-08 21:40 ` Or Gerlitz
2017-11-08 23:42 ` 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=20171109.084240.936752820428817969.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aring@mojatatu.com \
--cc=gerlitz.or@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.hurley@netronome.com \
--cc=kurup.manish@gmail.com \
--cc=manish.kurup@verizon.com \
--cc=mrv@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=pieter.jansenvanvuuren@netronome.com \
--cc=simon.horman@netronome.com \
--cc=xiyou.wangcong@gmail.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 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).