Skip to contentSkip to conversation

gc_min_interval in milleseconds via /proc

PATCH In review Robert Olsson 2 participants 2 messages Jan 26, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gc_min_interval in milleseconds via /proc

Hello!
The second resolution is very inconvenient. Milleseconds would be nicer.

cat /proc/sys/net/ipv4/route/gc_min_interval
500

ipv4/route.c renamed from ipv4/route.c.orig +2 -2
@@ -2532,9 +2532,9 @@
 		.ctl_name	= NET_IPV4_ROUTE_GC_MIN_INTERVAL,
 		.procname	= "gc_min_interval",
 		.data		= &ip_rt_gc_min_interval,
-		.maxlen		= sizeof(int),
+		.maxlen		= sizeof(unsigned long),
 		.mode		= 0644,
-		.proc_handler	= &proc_dointvec_jiffies,
+		.proc_handler	= &proc_doulongvec_ms_jiffies_minmax,
 		.strategy	= &sysctl_jiffies,
 	},
 
						--ro
maintainer
#1 lore raw
Quoted 1 line · On Wed, 26 Jan 2005 16:20:42 +0100 Robert Olsson <[email protected]>…

The second resolution is very inconvenient. Milleseconds would be nicer.

It would, but since this is a user visible API we really can't change it.

We could instead make another sysctl (perhaps name it something like "gc_min_interval_ms") to do what you propose, and then we'd keep the existing one around for compatibility.