From owner-freebsd-hackers Wed Apr 5 04:02:01 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id EAA15554 for hackers-outgoing; Wed, 5 Apr 1995 04:02:01 -0700 Received: from Root.COM (implode.Root.COM [198.145.90.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id EAA15548 for ; Wed, 5 Apr 1995 04:01:58 -0700 Received: from corbin.Root.COM (corbin.Root.COM [198.145.90.18]) by Root.COM (8.6.8/8.6.5) with ESMTP id EAA08412; Wed, 5 Apr 1995 04:01:48 -0700 Received: from localhost (localhost [127.0.0.1]) by corbin.Root.COM (8.6.11/8.6.5) with SMTP id EAA00175; Wed, 5 Apr 1995 04:01:48 -0700 Message-Id: <199504051101.EAA00175@corbin.Root.COM> X-Authentication-Warning: corbin.Root.COM: Host localhost didn't use HELO protocol To: Bruce Evans cc: hackers@FreeBSD.org Subject: Re: swap always use at least 64KB ? In-reply-to: Your message of "Wed, 05 Apr 95 20:52:05 +1000." <199504051052.UAA16461@godzilla.zeta.org.au> From: David Greenman Reply-To: davidg@Root.COM Date: Wed, 05 Apr 1995 04:01:43 -0700 Sender: hackers-owner@FreeBSD.org Precedence: bulk >>>which is kind of curious, as the machine has 16 MB ram and almost >>>no activity going on... Swap partition, when in use, are always >>>reported with at least 64 KB in use. >>> >>>Is there any explaination ? > >> The first swap block is always pre-allocated. This was done to work around >>a problem with people putting their swap partition at the beginning of their >>disk (the system would happily try to destroy the label). I suppose it would >>be better to change swapinfo/pstat to not include the first block of swap >>space in its report. > >There must be bugs in the write protection of the label for that to happen. > >The diskslice "driver" snoops on writes to label sector(s) and rejects >writing of invalid labels even when write protection is off. > >Similar snooping is required for protecting the MBR and secondary BR's. There were two manifestations. It would either destroy your label (I think this was in the SCSI case) or it would get EROFS when the swap pager tried to page something out to it. I think the 'destroy your label' problem was fixed awhile ago. Now the pager just fails with the EROFS. ...Anyway, the first chunk can't be used. -DG