aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 1cc6c23cf758..933b093721ea 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -851,14 +851,14 @@ static int rt_garbage_collect(void)
851 equilibrium = ipv4_dst_ops.gc_thresh; 851 equilibrium = ipv4_dst_ops.gc_thresh;
852 goal = atomic_read(&ipv4_dst_ops.entries) - equilibrium; 852 goal = atomic_read(&ipv4_dst_ops.entries) - equilibrium;
853 if (goal > 0) { 853 if (goal > 0) {
854 equilibrium += min_t(unsigned int, goal / 2, rt_hash_mask + 1); 854 equilibrium += min_t(unsigned int, goal >> 1, rt_hash_mask + 1);
855 goal = atomic_read(&ipv4_dst_ops.entries) - equilibrium; 855 goal = atomic_read(&ipv4_dst_ops.entries) - equilibrium;
856 } 856 }
857 } else { 857 } else {
858 /* We are in dangerous area. Try to reduce cache really 858 /* We are in dangerous area. Try to reduce cache really
859 * aggressively. 859 * aggressively.
860 */ 860 */
861 goal = max_t(unsigned int, goal / 2, rt_hash_mask + 1); 861 goal = max_t(unsigned int, goal >> 1, rt_hash_mask + 1);
862 equilibrium = atomic_read(&ipv4_dst_ops.entries) - goal; 862 equilibrium = atomic_read(&ipv4_dst_ops.entries) - goal;
863 } 863 }
864 864