Messages in this thread |  | | Date | Mon, 9 Oct 2000 23:34:36 +0200 | From | "Andi Kleen" <> | Subject | Re: [PATCH] VM fix for 2.4.0-test9 & OOM handler |
| |
On Mon, Oct 09, 2000 at 10:28:38PM +0100, Alan Cox wrote: > > Sounds like one needs in addition some mechanism for servers to "charge" clients for > > consumption. X certainly knows on behalf of which connection resources > > are created; the OS could then transfer this back to the appropriate client > > (at least when on machine). > > Definitely - and this is present in some non Unix OS's. We do pass credentials > across AF_UNIX sockets so the mechanism is notionally there to provide the > credentials to X, just not to use them
X can get the pid using SO_PEERCRED for unix connections.
When the oom killer maintains some kind of badness value in the task_struct it would be possible to add a charge() systemcall that manipulates it.
int charge(pid_t pid, int memorytobecharged)
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |