linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: Jamie Lokier <lk@tantalophile.demon.co.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>, <linux-kernel@vger.kernel.org>
Subject: Re: /proc/<n>/maps getting _VERY_ long
Date: Fri, 10 Aug 2001 14:55:11 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.33.0108101445350.7596-100000@penguin.transmeta.com> (raw)
In-Reply-To: <20010806194120.A5803@thefinal.cern.ch>


On Mon, 6 Aug 2001, Jamie Lokier wrote:
>
> There are garbage collectors that use mprotect() and SEGV trapping per
> page.  It would be nice if there was a way to change the protections per
> page without requiring a VMA for each one.

This is actually how Linux used to work a long long time ago - all
protection information was in the page tables, and you could do per-page
things without having to worry about piddling details like vma's.

It does work, but it had major downsides. Trivial things like re-creating
the permission after throwing a page out or swapping it out.

We used to have these "this is a COW page" and "this is shared writable"
bits in the page table etc - there are two sw bits on x86, and I think we
used them both.

These days, the vma's just have too much information, and the page tables
can't be counted on to have enough bits.

So on one level I basically agree with you, but at the same time it's just
not feasible any more. The VM got a lot better, and got ported to other
architectures. And it started needing more information - it used to be
enough to know whether a page was shared writable or privately writable or
not writable at all, but back then we didn't really support the full
semantics of shared memory or mprotect, so we didn't need all the
information we have to have now.

They were "the good old days", but trust me, you really don't want them
back. The vma's have some overhead, but it is not excessive, and they
really make things like a portable VM layer possible..

It's very hard to actually see any performance impact of the VMA handling.
It's a small structure, with reasonable lookup algorithms, and the common
case is still to not have all that many of them.

		Linus


  reply	other threads:[~2001-08-10 21:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-04 15:43 /proc/<n>/maps getting _VERY_ long Chris Wedgwood
2001-08-05  2:17 ` Rik van Riel
2001-08-05  5:12   ` Chris Wedgwood
2001-08-05 13:06     ` Alan Cox
2001-08-05 13:18       ` Chris Wedgwood
2001-08-05 23:07       ` Jakob Østergaard
2001-08-05 23:41       ` Linus Torvalds
2001-08-06  0:41         ` Michael H. Warfield
2001-08-06  1:01           ` Linus Torvalds
2001-08-06  1:17             ` H. Peter Anvin
2001-08-06  4:26               ` Linus Torvalds
2001-08-06  6:30                 ` H. Peter Anvin
2001-08-06 18:41                 ` Jamie Lokier
2001-08-10 21:55                   ` Linus Torvalds [this message]
2001-08-10 22:00                     ` H. Peter Anvin
2001-08-10 23:03                       ` Nicolas Pitre
2001-08-10 23:26                       ` Linus Torvalds
2001-08-10 23:55                         ` Rik van Riel
2001-08-11  1:04                     ` Pavel Machek
2001-08-06 11:52               ` Alan Cox
2001-08-06 12:23                 ` Chris Wedgwood
2001-08-06 13:17                   ` Alan Cox
2001-08-06 13:55                     ` Chris Wedgwood
2001-08-06  9:43         ` [LONGish] Brief analysis of VMAs (was: /proc/<n>/maps getting _VERY_ long) Chris Wedgwood
2001-08-05  6:44 /proc/<n>/maps getting _VERY_ long David Luyer
2001-08-05  7:21 ` Anders Eriksson

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=Pine.LNX.4.33.0108101445350.7596-100000@penguin.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lk@tantalophile.demon.co.uk \
    /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;
as well as URLs for NNTP newsgroup(s).