Skip to contentSkip to conversation

sys_sysinfo overhaul

PATCH In review Robert Love 2 participants 2 messages May 31, 2002 – Jun 1, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sys_sysinfo overhaul

Linus,

Looks like sys_sysinfo has not been touched in years. Among other things, it uses a global cli() for protection; I switched it to a rwlock. I also pulled it out of info.c and stuck it in timer.c.

The details:

- move sys_sysinfo to kernel/timer.c from kernel/info.c:
why one small syscall got its own file is beyond me.

- delete kernel/info.c

- stop the global cli! now grab a read_lock on xtime_lock. this is safe as we moved the write_unlock on xtime_lock up one line to cover the calculating of avenrun.

- trivial code cleanup

Patch is against 2.5.19, please apply.

Robert Love

kernel/Makefile +1 -1
diff -urN linux-2.5.19/kernel/Makefile linux/kernel/Makefile
@@ -13,7 +13,7 @@
 		printk.o platform.o suspend.o
 
 obj-y     = sched.o dma.o fork.o exec_domain.o panic.o printk.o \
-	    module.o exit.o itimer.o info.o time.o softirq.o resource.o \
+	    module.o exit.o itimer.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
 	    signal.o sys.o kmod.o context.o futex.o platform.o
 
kernel/info.c +0 -79

79 lines not on this page · raw message

kernel/timer.c +80 -2

113 lines not on this page · raw message

#1 lore raw
Quoted 2 lines · Robert Love

- move sys_sysinfo to kernel/timer.c from kernel/info.c:
why one small syscall got its own file is beyond me.

Huh ? What on earth is wrong with that ? Including a load of crap in timer.c just increases false dependencies.

On the contrary, I wish the kernel had more file-level barriers.

john