Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Feb 2017 12:05:35 -0600
From:      "Mike Karels" <mike@karels.net>
To:        "Konstantin Belousov" <kostikbel@gmail.com>
Cc:        "Bruce Evans" <brde@optusnet.com.au>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r314087 - head/sys/x86/x86
Message-ID:  <84316203-3A73-44EC-93B0-400F0D3F335C@karels.net>
In-Reply-To: <20170226124445.GE2092@kib.kiev.ua>
References:  <201702220707.v1M7764i020598@repo.freebsd.org> <20170223053954.J1044@besplex.bde.org> <20170224125335.GV2092@kib.kiev.ua> <20170225130549.C1026@besplex.bde.org> <20170225101543.GC2092@kib.kiev.ua> <20170226013936.S856@besplex.bde.org> <20170226124445.GE2092@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Tangential, but:

On 26 Feb 2017, at 6:44, Konstantin Belousov wrote:

> On Sun, Feb 26, 2017 at 04:43:12AM +1100, Bruce Evans wrote:
> 2.9 BSD was a port to PDP-11, AFAIK, with 16bit ints.

All of the 2BSD systems ran on PDP-11 with 16-bit ints, as did Research 
versions 1 through 7th Edition.  2.9BSD just happens to be the version 
for which I was principal developer.  I spent a lot of time back-porting 
from 4BSD (for the VAX), and int vs long was the main issue.

		Mike
From owner-svn-src-all@freebsd.org  Sun Feb 26 18:17:13 2017
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CA75CEE34D;
 Sun, 26 Feb 2017 18:17:13 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 694D21AC;
 Sun, 26 Feb 2017 18:17:13 +0000 (UTC) (envelope-from alc@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1QIHCLl037745;
 Sun, 26 Feb 2017 18:17:12 GMT (envelope-from alc@FreeBSD.org)
Received: (from alc@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1QIHCkG037744;
 Sun, 26 Feb 2017 18:17:12 GMT (envelope-from alc@FreeBSD.org)
Message-Id: <201702261817.v1QIHCkG037744@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org
 using -f
From: Alan Cox <alc@FreeBSD.org>
Date: Sun, 26 Feb 2017 18:17:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject: svn commit: r314305 - stable/11/sys/amd64/amd64
X-SVN-Group: stable-11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>;
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Feb 2017 18:17:13 -0000

Author: alc
Date: Sun Feb 26 18:17:12 2017
New Revision: 314305
URL: https://svnweb.freebsd.org/changeset/base/314305

Log:
  MFC r313960
    In pmap_enter(), set the PG_MANAGED flag on the new PTE in one place,
    rather two places, and do so before the pmap lock is acquired.

Modified:
  stable/11/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/11/sys/amd64/amd64/pmap.c	Sun Feb 26 16:34:58 2017	(r314304)
+++ stable/11/sys/amd64/amd64/pmap.c	Sun Feb 26 18:17:12 2017	(r314305)
@@ -4367,7 +4367,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, 
 	if ((m->oflags & VPO_UNMANAGED) != 0) {
 		if ((newpte & PG_RW) != 0)
 			newpte |= PG_M;
-	}
+	} else
+		newpte |= PG_MANAGED;
 
 	mpte = NULL;
 
@@ -4440,11 +4441,9 @@ retry:
 			/*
 			 * No, might be a protection or wiring change.
 			 */
-			if ((origpte & PG_MANAGED) != 0) {
-				newpte |= PG_MANAGED;
-				if ((newpte & PG_RW) != 0)
-					vm_page_aflag_set(m, PGA_WRITEABLE);
-			}
+			if ((origpte & PG_MANAGED) != 0 &&
+			    (newpte & PG_RW) != 0)
+				vm_page_aflag_set(m, PGA_WRITEABLE);
 			if (((origpte ^ newpte) & ~(PG_M | PG_A)) == 0)
 				goto unchanged;
 			goto validate;
@@ -4461,8 +4460,7 @@ retry:
 	/*
 	 * Enter on the PV list if part of our managed memory.
 	 */
-	if ((m->oflags & VPO_UNMANAGED) == 0) {
-		newpte |= PG_MANAGED;
+	if ((newpte & PG_MANAGED) != 0) {
 		pv = get_pv_entry(pmap, &lock);
 		pv->pv_va = va;
 		CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, pa);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84316203-3A73-44EC-93B0-400F0D3F335C>