| To: | "David S. Miller" <davem@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH]snmp6 64-bit counter support in proc.c |
| From: | Krishna Kumar <kumarkr@xxxxxxxxxx> |
| Date: | Thu, 22 Jan 2004 14:50:15 -0800 |
| Cc: | kuznet@xxxxxxxxxxxxx, mashirle@xxxxxxxxxx, netdev@xxxxxxxxxxx, Shirley Ma <xma@xxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
|
Dave,
The most portable and simple algorithm to solve this on the reader side is (and I recommend we don't special case this on 64-bit platforms just to get wider testing): u32 high, low1, low2; do { low1 = stat & 0xffffffff; rmb(); high = stat >> 32; rmb(); low2 = stat & 0xffffffff; } while (low2 < low1); Something like that. The idea is to sample the lower 32-bit twice and if it overflows resample both high and low halfs. |
| Previous by Date: | [update] 2.6.2-rc1 - Realtek 8169 patches, Francois Romieu |
|---|---|
| Next by Date: | Re: [PATCH] net/ipv4/tcp.c little cleanup, Willy Tarreau |
| Previous by Thread: | Re: [PATCH]snmp6 64-bit counter support in proc.c, David S. Miller |
| Next by Thread: | Re: [PATCH]snmp6 64-bit counter support in proc.c, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |