From owner-svn-src-all@freebsd.org Sat Jun 15 04:30:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 188B615BB488; Sat, 15 Jun 2019 04:30:14 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A561E8D057; Sat, 15 Jun 2019 04:30:13 +0000 (UTC) (envelope-from dougm@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B34521F04; Sat, 15 Jun 2019 04:30:13 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5F4UDOD031216; Sat, 15 Jun 2019 04:30:13 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5F4UDVX031215; Sat, 15 Jun 2019 04:30:13 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201906150430.x5F4UDVX031215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sat, 15 Jun 2019 04:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r349046 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 349046 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: A561E8D057 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.95)[-0.946,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Jun 2019 04:30:14 -0000 Author: dougm Date: Sat Jun 15 04:30:13 2019 New Revision: 349046 URL: https://svnweb.freebsd.org/changeset/base/349046 Log: Critical comments were lost in r349203. This patch seeks to restore the lost information in new comments. Reported by: alc Reviewed by: alc Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20632 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jun 15 01:27:49 2019 (r349045) +++ head/sys/vm/vm_map.c Sat Jun 15 04:30:13 2019 (r349046) @@ -2186,17 +2186,22 @@ _vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, VM_MAP_ASSERT_LOCKED(map); KASSERT(entry->end > start && entry->start < start, ("_vm_map_clip_start: invalid clip of entry %p", entry)); + vm_map_simplify_entry(map, entry); /* - * Split off the front portion -- note that we must insert the new - * entry BEFORE this one, so that this entry has the specified - * starting address. + * Create a backing object now, if none exists, so that more individual + * objects won't be created after the map entry is split. */ - vm_map_simplify_entry(map, entry); vm_map_entry_charge_object(map, entry); + + /* Clone the entry. */ new_entry = vm_map_entry_create(map); *new_entry = *entry; + /* + * Split off the front portion. Insert the new entry BEFORE this one, + * so that this entry has the specified starting address. + */ new_entry->end = start; entry->offset += (start - entry->start); entry->start = start; @@ -2244,14 +2249,20 @@ _vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, v KASSERT(entry->start < end && entry->end > end, ("_vm_map_clip_end: invalid clip of entry %p", entry)); - /* - * Create a new entry and insert it AFTER the specified entry + * Create a backing object now, if none exists, so that more individual + * objects won't be created after the map entry is split. */ vm_map_entry_charge_object(map, entry); + + /* Clone the entry. */ new_entry = vm_map_entry_create(map); *new_entry = *entry; + /* + * Split off the back portion. Insert the new entry AFTER this one, + * so that this entry has the specified ending address. + */ new_entry->start = entry->end = end; new_entry->offset += (end - entry->start); if (new_entry->cred != NULL)