From 31ef9f5178dee18a40ce609aad406e925411eb06 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Wed, 4 Sep 2013 15:49:19 -0700 Subject: timeval: Remove CACHE_TIME scheme. This commit removes the CACHE_TIME scheme from timeval module. This is for eliminating the lock contention over the read/write lock of the cached time. To get the time, the thread now will directly do the system call 'clock_gettime()'. As a side effect, timer can only be warpped after timer is stopped by 'appctl time/stop' command. Signed-off-by: Alex Wang Signed-off-by: Ethan Jackson Acked-by: Ethan Jackson --- ofproto/ofproto-dpif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ofproto/ofproto-dpif.c') diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index c7d35736..b52d4eef 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3878,7 +3878,7 @@ subfacet_max_idle(const struct dpif_backer *backer) * pass made by update_stats(), because the former function never looks at * uninstallable subfacets. */ - enum { BUCKET_WIDTH = ROUND_UP(100, TIME_UPDATE_INTERVAL) }; + enum { BUCKET_WIDTH = 100 }; enum { N_BUCKETS = 5000 / BUCKET_WIDTH }; int buckets[N_BUCKETS] = { 0 }; int total, subtotal, bucket; -- cgit v1.2.3