Thread (29 messages) 29 messages, 6 authors, 2014-10-02

Re: [PATCH net-next] mlx4: optimize xmit path

From: Hannes Frederic Sowa <hidden>
Date: 2014-09-27 23:44:27

Hi Eric,

On Sun, Sep 28, 2014, at 00:56, Eric Dumazet wrote:
-       ring->cons += txbbs_skipped;
+
+       /* we want to dirty this cache line once */
+       ACCESS_ONCE(ring->last_nr_txbb) = last_nr_txbb;
+       ACCESS_ONCE(ring->cons) = ring_cons + txbbs_skipped;
+
Impressive work!

I wonder if another macro might be useful for those kind of
dereferences, because ACCESS_ONCE is associated with correctness in my
mind and those usages only try to optimize access patterns.
Does OPTIMIZER_HIDE_VAR generate the same code?

Bye,
Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help