From owner-svn-src-all@freebsd.org Mon Dec 4 10:06:00 2017 Return-Path: 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 B3EE4DF69EF; Mon, 4 Dec 2017 10:06:00 +0000 (UTC) (envelope-from kib@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 8067F1441; Mon, 4 Dec 2017 10:06:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4A5xew099093; Mon, 4 Dec 2017 10:05:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vB4A5xke099092; Mon, 4 Dec 2017 10:05:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201712041005.vB4A5xke099092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 4 Dec 2017 10:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r326523 - stable/10/sys/vm X-SVN-Group: stable-10 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/10/sys/vm X-SVN-Commit-Revision: 326523 X-SVN-Commit-Repository: base 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.25 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: Mon, 04 Dec 2017 10:06:00 -0000 Author: kib Date: Mon Dec 4 10:05:59 2017 New Revision: 326523 URL: https://svnweb.freebsd.org/changeset/base/326523 Log: MFC r326424: Add comment for vm_map_find_min(). Modified: stable/10/sys/vm/vm_map.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_map.c ============================================================================== --- stable/10/sys/vm/vm_map.c Mon Dec 4 09:58:38 2017 (r326522) +++ stable/10/sys/vm/vm_map.c Mon Dec 4 10:05:59 2017 (r326523) @@ -1509,6 +1509,18 @@ again: return (result); } +/* + * vm_map_find_min() is a variant of vm_map_find() that takes an + * additional parameter (min_addr) and treats the given address + * (*addr) differently. Specifically, it treats *addr as a hint + * and not as the minimum address where the mapping is created. + * + * This function works in two phases. First, it tries to + * allocate above the hint. If that fails and the hint is + * greater than min_addr, it performs a second pass, replacing + * the hint with min_addr as the minimum address for the + * allocation. + */ int vm_map_find_min(vm_map_t map, vm_object_t object, vm_ooffset_t offset, vm_offset_t *addr, vm_size_t length, vm_offset_t min_addr,