[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2016 16:15:42 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Eric Dumazet <eric.dumazet@...il.com>,
John Fastabend <john.fastabend@...il.com>,
Kevin Athey <kda@...gle.com>,
Xiaotian Pei <xiaotian@...gle.com>
Subject: Re: [PATCH net-next 2/2] net: sched: do not acquire qdisc spinlock in
qdisc/class stats dump
On Mon, Jun 6, 2016 at 9:37 AM, Eric Dumazet <edumazet@...gle.com> wrote:
> void
> -__gnet_stats_copy_basic(struct gnet_stats_basic_packed *bstats,
> +__gnet_stats_copy_basic(const seqcount_t *running,
> + struct gnet_stats_basic_packed *bstats,
> struct gnet_stats_basic_cpu __percpu *cpu,
> struct gnet_stats_basic_packed *b)
> {
> + unsigned int seq;
> +
> if (cpu) {
> __gnet_stats_copy_basic_cpu(bstats, cpu);
> - } else {
> + return;
> + }
> + do {
> + if (running)
> + seq = read_seqcount_begin(running);
> bstats->bytes = b->bytes;
> bstats->packets = b->packets;
> - }
> + } while (running && read_seqcount_retry(running, seq));
> }
Why only these basic stats need to get read seqlock?
Queue stats (gnet_stats_copy_queue()) too, right?
Powered by blists - more mailing lists