The reason to replace a syscall is to extend its functionality. So when
the kernel calls the syscall, the extended version will be called. I
think it's best suited for personal use. (Probably, if the extended
version is good enough, the new official release might include the
extended syscall.)
I need to modify the kernel's swapping behaviour. That's why I have to
over-write some internal functions related to swapping. I don't want to
modify the original kernel source code and re-compile the kernel again.
Not everything like doing mathematics, the answer you get is either
definitely right, or totally wrong. Most of the time, you have to find
the way that best suits yourself personally.
Fei