Date: Tue, 19 Jun 2018 09:06:42 +0200 From: Stefan Esser <se@freebsd.org> To: Erich Dollansky <freebsd.ed.lists@sumeritec.com>, tech-lists <tech-lists@zyxst.net> Cc: freebsd-stable@freebsd.org, freebsd-questions@freebsd.org Subject: Re: lightly loaded system eats swap space Message-ID: <7fdc922c-ba19-c822-6f6e-d768533a2876@freebsd.org> In-Reply-To: <20180619094826.75c0c735.freebsd.ed.lists@sumeritec.com> References: <c8277497-ffcf-0503-490b-96d1b4605af7@zyxst.net> <20180618160855.44d9a0c2.freebsd.ed.lists@sumeritec.com> <ab5d0cb0-13f5-5de8-6189-c0a5c621c6e9@zyxst.net> <20180619094826.75c0c735.freebsd.ed.lists@sumeritec.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 19.06.18 um 03:48 schrieb Erich Dollansky: > A very long time ago - and not on FreeBSD but maybe on a real BSD - I > worked with a system that swapped pages out just to bring it back as > one contiguous block. This made a difference those days. I do not know > if the code made it out of the university I was working at. I just > imagine now that the code made it out and is still in use with the > opposite effect. If this was on a VAX, then it was due to a short-coming of the MMU of the VAX, which used one linear array (in system virtual memory) to hold physical addresses of user pages of all programs. Each user program had 2 slices in this array (1 growing up, 1 growing down for the stack) and whenever a program allocated a new page, this slice needed to grow. That leads to fragmentation (same a problem as with realloc() for an ever growing array), and when there was no contiguous free space in the array for a grown slice, then all process where swapped out (resulting in this whole page table array being cleared and thus without fragmentation, since swapped-out processes needed no space in this array). This was a solution that worked without the table walk used in todays VM systems. System pages were mapped by a linear page table in physical memory, while user programs used the above described linear page table in system virtual memory. Nothing of the above applies to any other architecture than the VAX and thus the swap-out of all user processes serves no purpose on any other system. It was an implementation detail of the VAX VM code, not a BSD Unix feature. Regards, STefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7fdc922c-ba19-c822-6f6e-d768533a2876>