From owner-svn-src-all@freebsd.org Wed Jun 17 11:04:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 66BE334AE43; Wed, 17 Jun 2020 11:04:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49n2JY5TSjz4dP5; Wed, 17 Jun 2020 11:04:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 05HB4KE7031730 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 17 Jun 2020 14:04:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 05HB4KE7031730 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 05HB4KiM031729; Wed, 17 Jun 2020 14:04:20 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 17 Jun 2020 14:04:19 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362253 - head/sys/vm Message-ID: <20200617110419.GF45690@kib.kiev.ua> References: <202006162253.05GMruKi046200@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006162253.05GMruKi046200@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49n2JY5TSjz4dP5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 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: Wed, 17 Jun 2020 11:04:30 -0000 On Tue, Jun 16, 2020 at 10:53:56PM +0000, Conrad Meyer wrote: > Author: cem > Date: Tue Jun 16 22:53:56 2020 > New Revision: 362253 > URL: https://svnweb.freebsd.org/changeset/base/362253 > > Log: > vm: Drop vm_map_clip_{start,end} macro wrappers > > No functional change. > > Reviewed by: dougm, markj > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D25282 > > Modified: > head/sys/vm/vm_map.c > > Modified: head/sys/vm/vm_map.c > ============================================================================== > --- head/sys/vm/vm_map.c Tue Jun 16 21:30:30 2020 (r362252) > +++ head/sys/vm/vm_map.c Tue Jun 16 22:53:56 2020 (r362253) > @@ -2377,24 +2377,17 @@ vm_map_entry_clone(vm_map_t map, vm_map_entry_t entry) > * the specified address; if necessary, > * it splits the entry into two. > */ > -#define vm_map_clip_start(map, entry, startaddr) \ > -{ \ > - if (startaddr > entry->start) \ > - _vm_map_clip_start(map, entry, startaddr); \ > -} > - > -/* > - * This routine is called only when it is known that > - * the entry must be split. > - */ > static inline void > -_vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start) > +vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, vm_offset_t start) > { > vm_map_entry_t new_entry; > > + if (start <= entry->start) > + return; > + > VM_MAP_ASSERT_LOCKED(map); > KASSERT(entry->end > start && entry->start < start, > - ("_vm_map_clip_start: invalid clip of entry %p", entry)); > + ("%s: invalid clip of entry %p", __func__, entry)); > > new_entry = vm_map_entry_clone(map, entry); > > @@ -2435,24 +2428,17 @@ vm_map_lookup_clip_start(vm_map_t map, vm_offset_t sta > * the specified address; if necessary, > * it splits the entry into two. > */ > -#define vm_map_clip_end(map, entry, endaddr) \ > -{ \ > - if ((endaddr) < (entry->end)) \ > - _vm_map_clip_end((map), (entry), (endaddr)); \ > -} > - > -/* > - * This routine is called only when it is known that > - * the entry must be split. > - */ > static inline void > -_vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end) > +vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm_offset_t end) > { > vm_map_entry_t new_entry; > > + if (end >= entry->end) > + return; > + > VM_MAP_ASSERT_LOCKED(map); > KASSERT(entry->start < end && entry->end > end, > - ("_vm_map_clip_end: invalid clip of entry %p", entry)); > + ("%s: invalid clip of entry %p", __func__, entry)); > > new_entry = vm_map_entry_clone(map, entry); > I would highly appreciate if you revert this commit. It conflicts with https://reviews.freebsd.org/D24652, which must revert your change to remain functional. I probably should not allowed that review to rott silently.