[Linux-users] Kernel Stat Question [OFFTOPIC]
Sundara Raman Rajagopalan
linux-users at lists.ccs.neu.edu
Tue, 2 Apr 2002 14:18:19 -0500
Hi,
I am doing a series of projects in the linux kernel as an independent
study ( Interested? please see www.geocities.com/happysundar), and I
am stuck with a problem.
The aim is to write a system call that will find the number of page faults
(major page faults, not minor); I find that the information is stored in the
kernel_stat structure in file linux/include/linux/kernel_stat.h, and the
variables are pgpgin and pgpgout ( At least, I *think* so.. if there is
any other kernel variable that keeps track of the system page faults, do
let me know).
As might be expected, the /proc vfs also uses the same data for kstat;
however, when displaying the data, the values pgpgin and pgpgout are
*divided by 2!* and I can't figure out why the heck it is done!. See the
snippet of code from file fs/proc/proc_misc.c:
kstat.pgpgin >> 1,
kstat.pgpgout >> 1
I have posted the question in comp.os.linux.development.system, but no
response so far.
It would be nice if some one could answer this question.
Thanks!
--
Sundara Raman Rajagopalan .-. .-. .-..-. .-..-. .-..-.
M.S Comp Systems Engineering | |__ | | | .` | | || | > <
Northeastern University `----' `-' `-'`-' `----' '-'`-`
Tel: +001 617 515 2092 "The only difference between
www.coe.neu.edu/~sundar Linux and *NIX is the size of
the ego of the person using it"
Quoting Marc Reichman <marcr@ccs.neu.edu>:
> david has fixed the /arch problem on the linux box (darkside for now). i
> propose
> we have a small discussion at our next crew or linux meeting to discuss how
> we're going to sort/manage the directories under arch. i'll save my ideas
> for the meeting. so as for now, please don't install any software under it.
>
> --
> -marc
>
>
> _______________________________________________
> Linux-users mailing list
> Linux-users@lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/linux-users
>