David S. Miller a écrit :
From: Eric Dumazet <[EMAIL PROTECTED]>
Date: Thu, 09 Feb 2006 09:00:21 +0100

+#ifdef CONFIG_SMP
+       /*
+        * In order to avoid cache line ping pongs on last_rx, we check
+        * if the device is a slave,
+        * and if last_rx really has to be modified
+        */
+       if (!(dev->flags & IFF_SLAVE) || (dev->last_rx == jiffies))
+               return;
+#endif

I said it's supposed to be generally available that the dev->last_rx
value is updated and accurate for all network devices.  Bypassing the
setting by checking for IFF_SLAVE totally defeats that and makes this
check a bonding specific optimization.

I'm sorry but last_rx is not available to User Land.

You need a kernel debugger to access it, or mess with /proc/kcore

If it's really usefull, then we miss accessors to this valuable data.

Once these accessors are in, then we can delete the (dev->flags & IFF_SLAVE) 
test.

We can put a lot of metrics in kernel, for example the jiffies of last syscall, but if those metrics are not exported, it seems quite wrong to perform expensive metrics in production kernels. As I said in my patch description, we could in DEBUG mode do all the metrics you want : Jiffies of last_rx, smp_processor_id() of last rx, and all sort of things.

Eric
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to