[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1386254734.30495.186.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 05 Dec 2013 06:45:34 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: David Miller <davem@...emloft.net>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: introduce dev_consume_skb_any()
On Thu, 2013-12-05 at 15:13 +0100, Hannes Frederic Sowa wrote:
> On Thu, Dec 05, 2013 at 04:45:08AM -0800, Eric Dumazet wrote:
> > - local_irq_save(flags);
> > - sd = &__get_cpu_var(softnet_data);
> > - skb->next = sd->completion_queue;
> > - sd->completion_queue = skb;
> > - raise_softirq_irqoff(NET_TX_SOFTIRQ);
> > - local_irq_restore(flags);
> > + if (likely(atomic_read(&skb->users) == 1)) {
> > + smp_rmb();
>
> Could you give me a hint why this barrier is needed? IMHO the volatile
> access in atomic_read should get rid of the control dependency so I
> don't see a need for this barrier. Without the volatile access a
> compiler-barrier would still suffice, I guess?
Please take a look at kfree_skb() implementation.
If you think a comment is needed there, please feel free to add it.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists