From: jg@pa.dec.com (Jim Gettys)
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Jim Gettys <jg@pa.dec.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
Andi Kleen <ak@suse.de>, Ingo Molnar <mingo@elte.hu>,
Andrea Arcangeli <andrea@suse.de>,
Rik van Riel <riel@conectiva.com.br>,
Byron Stanoszek <gandalf@winds.org>,
MM mailing list <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VM fix for 2.4.0-test9 & OOM handler
Date: Mon, 9 Oct 2000 15:07:53 -0700 (PDT) [thread overview]
Message-ID: <200010092207.PAA08714@pachyderm.pa.dec.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10010091446500.1438-100000@penguin.transmeta.com>
> From: Linus Torvalds <torvalds@transmeta.com>
> Date: Mon, 9 Oct 2000 14:50:51 -0700 (PDT)
> To: Jim Gettys <jg@pa.dec.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Andi Kleen <ak@suse.de>,
> Ingo Molnar <mingo@elte.hu>, Andrea Arcangeli <andrea@suse.de>,
> Rik van Riel <riel@conectiva.com.br>,
> Byron Stanoszek <gandalf@winds.org>,
> MM mailing list <linux-mm@kvack.org>, linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] VM fix for 2.4.0-test9 & OOM handler
> -----
> On Mon, 9 Oct 2000, Jim Gettys wrote:
> >
> >
> > On Date: Mon, 9 Oct 2000 14:38:10 -0700 (PDT), \fLinus Torvalds
> <torvalds@transmeta.com>
> > said:
> >
> > >
> > > The problem is that there is no way to keep track of them afterwards.
> > >
> > > So the process that gave X the bitmap dies. What now? Are we going to
> > > depend on X un-counting the resources?
> > >
> >
> > X has to uncount the resources already, to free the memory in the X server
> > allocated on behalf of that client. X has to get this right, to be a long
> > lived server (properly debugged X servers last many months without problems:
> > unfortunately, a fair number of DDX's are buggy).
>
> No, but my point is that it doesn't really work.
>
> One of the biggest bitmaps is the background bitmap. So you have a client
> that uploads it to X and then goes away. There's nobody to un-count to by
> the time X decides to switch to another background.
Actually, the big offenders are things other than the background bitmap:
things like E do absolutely insane things, you would not believe (or maybe
you would). The background pixmap is generally in the worst case typically
no worse than 4 megabytes (for those people who are crazy enough to put
images up as their root window on 32 bit deep displays, at 1kX1k resolution).
>
> Does that memory just disappear as far as the resource handling is
> concerned when the client that originated it dies?
No, X recovers the memory when a connection dies, unless the client has
gone out of its way to arrange to preserve things across connection
termination. Few, if any clients do this: it is primarily possible mostly
for debugging purposes, that (fortunately, or unfortunately, depending
on your opinion) what happens not just vanish before you can see what
happened.
So the X server does extensive bookkeeping of its memory usage, and retrieves
all memory used by clients when they terminate (with the above rare
exception).
>
> What happens with TCP connections? They might be local. Or they might not.
> In either case X doesn't know whom to blame.
At least on BSD kernels, it was reasonably straightforward to determine
if a TCP connection was local: in that case, the code actually did an upcall
and delivered data directly to the appropriate socket. Dunno about the
insides of Linux.
I suspect it should not be hard to find the right process for local
connections. Distant connections are, indeed, a challenge.
>
> Basically, the only thing _I_ think X can do is to really say "oh, please
> don't count my memory, because everything I do I do for my clients, not
> for myself".
>
> THAT is my argument. Basically there is nothing we can reliably account.
Your argument has alot of validity, though the X server does a better job
of accounting than you might think.
BUT, I'm actually more interested in dealing with scheduling preferences, to
get really first rate interactive feel.
>
> So we might as well fall back on just saying "X is more important than
> some random client", and have a mm niceness level. Which right now is
> obviously approximated by the IO capabilities tests etc.
>
As I say above, the principle here may be more useful than for the memory
example, but for controlling scheduling so we can get great interactive
feel. THAT is what is really worth discussing.
- Jim
--
Jim Gettys
Technology and Corporate Development
Compaq Computer Corporation
jg@pa.dec.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-10-09 22:07 UTC|newest]
Thread overview: 112+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-06 18:59 Rik van Riel
2000-10-06 20:19 ` Byron Stanoszek
2000-10-06 20:31 ` Rik van Riel
2000-10-09 10:12 ` Marco Colombo
2000-10-09 11:27 ` Byron Stanoszek
2000-10-09 16:26 ` Kurt Garloff
2000-10-09 18:29 ` Jamie Lokier
2000-10-09 17:27 ` Ingo Molnar
2000-10-09 17:25 ` Mark Hahn
2000-10-09 17:37 ` Ingo Molnar
2000-10-09 17:47 ` Ed Tomlinson
2000-10-09 18:01 ` Ingo Molnar
2000-10-09 18:14 ` Rik van Riel
2000-10-09 18:47 ` Ingo Molnar
2000-10-09 18:52 ` Rik van Riel
2000-10-09 19:27 ` Ingo Molnar
2000-10-09 19:38 ` Marco Colombo
2000-10-06 21:27 ` David Weinehall
2000-10-06 23:21 ` David Weinehall
2000-10-09 18:28 ` Andrea Arcangeli
2000-10-09 18:42 ` Ingo Molnar
2000-10-09 19:05 ` Andrea Arcangeli
2000-10-09 19:07 ` Rik van Riel
2000-10-09 19:42 ` Andrea Arcangeli
2000-10-09 20:06 ` Ingo Molnar
2000-10-09 20:06 ` Andi Kleen
2000-10-09 20:19 ` Ingo Molnar
2000-10-09 20:12 ` Rik van Riel
2000-10-09 20:24 ` Ingo Molnar
2000-10-09 20:18 ` Rik van Riel
2000-10-10 3:23 ` Philipp Rumpf
2000-10-09 20:38 ` James Sutherland
2000-10-09 20:40 ` Rik van Riel
2000-10-10 9:59 ` J.A. Sutherland
2000-10-09 20:44 ` Andrea Arcangeli
2000-10-09 21:52 ` Aaron Sethman
2000-10-09 21:54 ` Rik van Riel
2000-10-09 22:29 ` FORT David
2000-10-09 20:52 ` Linus Torvalds
2000-10-09 20:58 ` Andi Kleen
2000-10-09 21:21 ` Jim Gettys
2000-10-09 21:28 ` Alan Cox
2000-10-09 21:34 ` Andi Kleen
2000-10-09 21:38 ` Linus Torvalds
2000-10-09 21:39 ` Rik van Riel
2000-10-09 21:44 ` Linus Torvalds
2000-10-10 13:17 ` Marco Colombo
2000-10-09 21:44 ` Jim Gettys
2000-10-09 21:50 ` Linus Torvalds
2000-10-09 22:07 ` Jim Gettys [this message]
2000-10-09 23:13 ` Albert D. Cahalan
2000-10-09 23:16 ` Rik van Riel
2000-10-09 23:46 ` Jim Gettys
2000-10-10 9:46 ` Jamie Lokier
2000-10-10 14:41 ` Rogier Wolff
2000-10-10 17:28 ` Linus Torvalds
2000-10-09 21:51 ` Alan Cox
2000-10-09 21:40 ` Jim Gettys
2000-10-09 21:05 ` Rik van Riel
2000-10-09 22:08 ` Gerrit.Huizenga
2000-10-09 22:34 ` Byron Stanoszek
2000-10-09 22:57 ` Rik van Riel
2000-10-10 0:25 ` [RFC] New ideas for the " Byron Stanoszek
2000-10-09 20:11 ` [PATCH] VM fix for 2.4.0-test9 & " Andrea Arcangeli
2000-10-09 20:15 ` Rik van Riel
2000-10-09 20:40 ` Linus Torvalds
2000-10-09 20:47 ` Rik van Riel
2000-10-09 20:57 ` Ingo Molnar
2000-10-09 21:10 ` Peter Waltenberg
2000-10-09 22:25 ` Andrea Arcangeli
2000-10-09 22:59 ` Peter Waltenberg
2000-10-09 23:52 ` Andrea Arcangeli
2000-10-09 23:10 ` Rik van Riel
2000-10-09 21:10 ` Alan Cox
2000-10-09 21:25 ` Ingo Molnar
2000-10-09 21:26 ` Rik van Riel
2000-10-09 21:38 ` Ingo Molnar
2000-10-09 21:34 ` Rik van Riel
2000-10-10 9:09 ` john slee
2000-10-09 20:06 ` Rik van Riel
2000-10-09 20:18 ` Andrea Arcangeli
2000-10-10 3:29 ` Philipp Rumpf
2000-10-10 15:06 ` Rik van Riel
2000-10-10 15:24 ` Philipp Rumpf
2000-10-10 15:30 ` Rik van Riel
2000-10-10 15:37 ` Philipp Rumpf
2000-10-09 20:13 ` Ingo Molnar
2000-10-09 20:08 ` Rik van Riel
2000-10-09 20:22 ` Ingo Molnar
2000-10-09 20:28 ` David Ford
2000-10-09 20:34 ` Rik van Riel
2000-10-09 20:45 ` David Ford
2000-10-10 4:22 ` Andreas Dilger
2000-10-10 4:30 ` David Ford
2000-10-10 9:54 ` Jamie Lokier
2000-10-09 23:35 ` Ingo Oeser
2000-10-10 15:07 ` [PATCH] OOM killer API (was: [PATCH] VM fix for 2.4.0-test9 & OOM handler) Ingo Oeser
2000-10-10 15:32 ` Rik van Riel
2000-10-10 16:11 ` Ingo Oeser
2000-10-10 18:57 ` Tom Rini
2000-10-10 20:58 ` Rik van Riel
2000-10-10 22:46 ` Tom Rini
2000-10-09 19:30 ` [PATCH] VM fix for 2.4.0-test9 & OOM handler David Ford
2000-10-09 19:58 ` Andrea Arcangeli
2000-10-09 20:14 ` David Ford
2000-10-09 20:05 ` Rik van Riel
2000-10-09 21:07 ` Alan Cox
2000-10-10 3:38 ` Philipp Rumpf
2000-10-10 14:07 ` Andrea Arcangeli
2000-10-09 18:07 Wagner, Dave
2000-10-09 20:27 ` James Sutherland
2000-10-09 19:06 Hubertus Franke/Watson/IBM
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200010092207.PAA08714@pachyderm.pa.dec.com \
--to=jg@pa.dec.com \
--cc=ak@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrea@suse.de \
--cc=gandalf@winds.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=riel@conectiva.com.br \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox