All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Paubert <paubert@iram.es>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tom Rini <trini@kernel.crashing.org>,
	"Randy.Dunlap" <rddunlap@osdl.org>,
	randy.dunlap@verizon.net,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] move SWAP option in menu
Date: Fri, 7 Mar 2003 11:03:31 +0100	[thread overview]
Message-ID: <20030307100330.GA4758@iram.es> (raw)
In-Reply-To: <1046984808.18158.115.camel@irongate.swansea.linux.org.uk>

On Thu, Mar 06, 2003 at 09:06:49PM +0000, Alan Cox wrote:
> On Thu, 2003-03-06 at 19:33, Gabriel Paubert wrote:
> > I'd be very surprised if it were possible to have swap on a MMU-less 
> > machine (no virtual memory, page faults, etc.). Except for this nitpick, 
> > the patch looks fine, but my knowledge of MM is close to zero (and 
> > also of the new config language, but I'll have to learn it soon).
> 
> You can, and people have had swapping long before virtual memory. 

Indeed, I was unclear. A long time ago some OS I used distinguished between 
swapping (getting rid of a whole process' address space) and paging. The
former one you can implement on any machine (with restrictions), the second 
one needs an MMU and that's what CONFIG_SWAP means AFAICT.

> Most ucLinux platforms can't swap because they can't dynamically relocate code.

I believe that dynamically relocating code is fairly easy (PIC may help too), 
but data is not: how do you relocate pointers of a swapped out process when
you swap it in at a different address?

I have fuzzy memories of a system in which you had a pair of
privileged registers (base and limit) which allowed you to implement
swapping and moving programs around in physical memories: all addresses
were checked against the limit and the base was added to perform
physical accesses. I might be wrong: it was about 20 years ago and I've
used so many different systems since then. But there is no such
mechanism on a 68000 for example (you could add it externally) and
it has its own problems (no easy way of sharing library code).

(Yes we're drifting way off-topic.)

> Linux 8086 can swap because it can use CS/DS updates to relocate code/data.

Unless I miss a subtle trick, that's using the segment registers as a
poor man's MMU. You can share library code with far calls but you can't 
use "far" data pointers, can you?

> The way it worked on older systems is that you never run a program which
> isnt entirely in memory. With that constraint you know it won't suddenely
> want data you don't have.

Oh yes, I've used such systems a loooong time ago. But I can't remember
the details well enough. 

	Gabriel.

  reply	other threads:[~2003-03-07  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-05  4:36 [PATCH] move SWAP option in menu Randy.Dunlap
2003-03-05 18:17 ` Gabriel Paubert
2003-03-05 21:14   ` Randy.Dunlap
2003-03-06 18:43     ` Tom Rini
2003-03-06 18:49       ` Christoph Hellwig
2003-03-06 18:54         ` Tom Rini
2003-03-06 18:56           ` Christoph Hellwig
2003-03-06 19:33       ` Gabriel Paubert
2003-03-06 21:06         ` Alan Cox
2003-03-07 10:03           ` Gabriel Paubert [this message]
2003-03-07 12:41             ` Alan Cox

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=20030307100330.GA4758@iram.es \
    --to=paubert@iram.es \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@verizon.net \
    --cc=rddunlap@osdl.org \
    --cc=trini@kernel.crashing.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.