[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+09PB1=J8mXO495iOK4oe4hsnRF=YsOQQJAsnw5ydeoA@mail.gmail.com>
Date: Fri, 13 Oct 2017 17:26:28 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Martin KaFai Lau <kafai@...com>
Cc: Wei Wang <weiwan@...gle.com>, David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next] ipv6: only update __use and lastusetime once per
jiffy at most
On Fri, Oct 13, 2017 at 5:09 PM, Martin KaFai Lau <kafai@...com> wrote:
> On Fri, Oct 13, 2017 at 10:08:07PM +0000, Wei Wang wrote:
>> From: Wei Wang <weiwan@...gle.com>
>>
>> In order to not dirty the cacheline too often, we try to only update
>> dst->__use and dst->lastusetime at most once per jiffy.
>
>
>> As dst->lastusetime is only used by ipv6 garbage collector, it should
>> be good enough time resolution.
> Make sense.
>
>> And __use is only used in ipv6_route_seq_show() to show how many times a
>> dst has been used. And as __use is not atomic_t right now, it does not
>> show the precise number of usage times anyway. So we think it should be
>> OK to only update it at most once per jiffy.
> If __use is only bumped HZ number of times per second and we can do ~3Mpps now,
> would __use be way off?
It is not used in the kernel, and is not even reported by user space
(iproute2) currently.
With the percpu stuff, we never did the sum anyway.
I believe we should be fine by being very lazy on this field.
If really someones complain, we will see, but insuring ~one update per
HZ seems fine.
Powered by blists - more mailing lists