From: Stephen Hemminger <stephen@networkplumber•org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>
Cc: David Miller <davem@davemloft•net>,
netdev@vger•kernel.org, roopa@cumulusnetworks•com
Subject: Re: [PATCH RFC net-next 4/4] bridge: add ability to turn off fdb used updates
Date: Fri, 3 Feb 2017 10:28:25 -0800 [thread overview]
Message-ID: <20170203102825.363907ae@xeon-e3> (raw)
In-Reply-To: <45f588fd-bece-647c-5b1e-2c64975e640d@cumulusnetworks.com>
On Fri, 3 Feb 2017 09:30:37 +0100
Nikolay Aleksandrov <nikolay@cumulusnetworks•com> wrote:
> On 03/02/17 03:47, David Miller wrote:
> > From: Nikolay Aleksandrov <nikolay@cumulusnetworks•com>
> > Date: Tue, 31 Jan 2017 16:31:58 +0100
> >
> >> @@ -197,7 +197,8 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
> >> if (dst->is_local)
> >> return br_pass_frame_up(skb);
> >>
> >> - dst->used = jiffies;
> >> + if (br->used_enabled)
> >> + dst->used = jiffies;
> >
> > Have you tried:
> >
> > if (dst->used != jiffies)
> > dst->used = jiffies;
> >
> > If that isn't effective, you can tweak the test to decrease the
> > granularity of the value. Basically, if dst->used is within
> > 1 HZ of jiffies, don't do the write.
> >
> > I suspect this might help a lot, and not require a new bridging
> > option.
> >
>
> Yes, I actually have a patch titled "used granularity". :-) I've tested with different
> values and it does help but it either needs to be paired with another similar test for
> the "updated" field (since they share a write-heavy cache line) or they need to be
> in separate cache lines to avoid that dst's source port from causing the load HitM for
> all who check the value.
>
> I'll run some more tests and probably go this way for now.
>
> Thanks,
> Nik
>
Since used doesn't need HZ granularity, it reports values in clock_t resolution so
storing (and doing cmp and set would mean that it would only be 100 HZ
next prev parent reply other threads:[~2017-02-03 18:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 15:31 [PATCH RFC net-next 0/4] bridge: improve cache utilization Nikolay Aleksandrov
2017-01-31 15:31 ` [PATCH RFC net-next 1/4] bridge: modify bridge and port to have often accessed fields in one cache line Nikolay Aleksandrov
2017-01-31 15:31 ` [PATCH RFC net-next 2/4] bridge: move to workqueue gc Nikolay Aleksandrov
2017-01-31 15:31 ` [PATCH RFC net-next 3/4] bridge: move write-heavy fdb members in their own cache line Nikolay Aleksandrov
2017-01-31 16:37 ` Stephen Hemminger
2017-01-31 16:39 ` Nikolay Aleksandrov
2017-01-31 15:31 ` [PATCH RFC net-next 4/4] bridge: add ability to turn off fdb used updates Nikolay Aleksandrov
2017-02-03 2:47 ` David Miller
2017-02-03 8:30 ` Nikolay Aleksandrov
2017-02-03 18:28 ` Stephen Hemminger [this message]
2017-02-03 18:34 ` Nikolay Aleksandrov
2017-02-03 22:24 ` Stephen Hemminger
2017-02-03 22:27 ` Nikolay Aleksandrov
2017-02-04 16:45 ` Nikolay Aleksandrov
2017-01-31 16:39 ` [PATCH RFC net-next 0/4] bridge: improve cache utilization Stephen Hemminger
2017-01-31 16:41 ` Nikolay Aleksandrov
2017-01-31 18:09 ` Nikolay Aleksandrov
2017-01-31 18:21 ` Stephen Hemminger
2017-01-31 18:45 ` Nikolay Aleksandrov
2017-01-31 18:51 ` Nikolay Aleksandrov
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=20170203102825.363907ae@xeon-e3 \
--to=stephen@networkplumber$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nikolay@cumulusnetworks$(echo .)com \
--cc=roopa@cumulusnetworks$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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