Thanks Andrew - you're right. Drop this patch in /dev/null.
* I will look around for some way that user code can
detect that a task has provoked swapping, or propose
a small patch, perhaps to /proc, for that, if need be.
* I agree that the action, killing a task or whatever, can
and should be instigated by user level code. The kernel
provides the essential mechanisms; user code decides the
policy, and elaborates the mechanisms.
* I'm concerned that polling some /proc state will either be too
wasteful of cycles (if we poll fast) or have too much delay to
trigger (if we poll slow). Though I need some real numbers,
to see if this is a real problem. It was definitely a problem
in a past life, but that may not apply here. The Linux 2.6
swapper is much more NUMA friendly.
Note, however, that something like rlimit, used to impose
other limits on task resource consumption, depends on specific
kernel hooks to catch the violation (using too much memory,
say) rather than insisting that user space code scan /proc
information looking for violators. The former is just way
too efficient compared to the latter.
* I'm still casting about for appropriate mechanisms (if polling
some /proc data is not adequate) to:
1) enable user space code to control some kernel trigger
that fires when a task causes more swapping than the
setting allows (something like rlimit?), and
2) an economical mechanism for the kernel to deliver such
events back to user space (call_usermodehelper or
satisfying a read on a special file?).
If you, or any lurker, has further thoughts, they would be
welcome.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <[email protected]> 1.650.933.1373, 1.925.600.0401
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]