From owner-svn-src-projects@freebsd.org Mon Feb 24 06:56:40 2020 Return-Path: Delivered-To: svn-src-projects@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 EF5A025416F for ; Mon, 24 Feb 2020 06:56:40 +0000 (UTC) (envelope-from dim@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 48QtCD1xTqz3K19; Mon, 24 Feb 2020 06:56:40 +0000 (UTC) (envelope-from dim@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 CCC00215E5; Mon, 24 Feb 2020 06:56:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01O6udKi074083; Mon, 24 Feb 2020 06:56:39 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01O6ucoW074078; Mon, 24 Feb 2020 06:56:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202002240656.01O6ucoW074078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 24 Feb 2020 06:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r358269 - in projects/clang1000-import: share/misc sys/vm usr.sbin/config X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang1000-import: share/misc sys/vm usr.sbin/config X-SVN-Commit-Revision: 358269 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Feb 2020 06:56:41 -0000 Author: dim Date: Mon Feb 24 06:56:38 2020 New Revision: 358269 URL: https://svnweb.freebsd.org/changeset/base/358269 Log: Merge ^/head r358263 through r358268. Modified: projects/clang1000-import/share/misc/bsd-family-tree projects/clang1000-import/sys/vm/swap_pager.c projects/clang1000-import/usr.sbin/config/config.5 projects/clang1000-import/usr.sbin/config/config.y projects/clang1000-import/usr.sbin/config/configvers.h Directory Properties: projects/clang1000-import/ (props changed) Modified: projects/clang1000-import/share/misc/bsd-family-tree ============================================================================== --- projects/clang1000-import/share/misc/bsd-family-tree Mon Feb 24 04:01:09 2020 (r358268) +++ projects/clang1000-import/share/misc/bsd-family-tree Mon Feb 24 06:56:38 2020 (r358269) @@ -799,7 +799,7 @@ OpenBSD 6.6 2019-10-17 [OBD] macOS 10.15 2019-10-07 [APL] macOS 10.15.1 2019-10-29 [APL] (security/critical release) FreeBSD 12.1 2019-11-04 [FBD] -NetBSD 9.0 2020-02-15 [NBD] +NetBSD 9.0 2020-02-14 [NBD] Bibliography ------------------------ Modified: projects/clang1000-import/sys/vm/swap_pager.c ============================================================================== --- projects/clang1000-import/sys/vm/swap_pager.c Mon Feb 24 04:01:09 2020 (r358268) +++ projects/clang1000-import/sys/vm/swap_pager.c Mon Feb 24 06:56:38 2020 (r358269) @@ -427,7 +427,7 @@ static int swapoff_one(struct swdevt *sp, struct ucred * Swap bitmap functions */ static void swp_pager_freeswapspace(daddr_t blk, daddr_t npages); -static daddr_t swp_pager_getswapspace(int *npages, int limit); +static daddr_t swp_pager_getswapspace(int *npages); /* * Metadata functions @@ -741,10 +741,9 @@ swap_pager_dealloc(vm_object_t object) /* * SWP_PAGER_GETSWAPSPACE() - allocate raw swap space * - * Allocate swap for up to the requested number of pages, and at - * least a minimum number of pages. The starting swap block number - * (a page index) is returned or SWAPBLK_NONE if the allocation - * failed. + * Allocate swap for up to the requested number of pages. The + * starting swap block number (a page index) is returned or + * SWAPBLK_NONE if the allocation failed. * * Also has the side effect of advising that somebody made a mistake * when they configured swap and didn't configure enough. @@ -754,12 +753,14 @@ swap_pager_dealloc(vm_object_t object) * We allocate in round-robin fashion from the configured devices. */ static daddr_t -swp_pager_getswapspace(int *io_npages, int limit) +swp_pager_getswapspace(int *io_npages) { daddr_t blk; struct swdevt *sp; int mpages, npages; + KASSERT(*io_npages >= 1, + ("%s: npages not positive", __func__)); blk = SWAPBLK_NONE; mpages = *io_npages; npages = imin(BLIST_MAX_ALLOC, mpages); @@ -774,7 +775,7 @@ swp_pager_getswapspace(int *io_npages, int limit) break; sp = TAILQ_NEXT(sp, sw_list); if (swdevhd == sp) { - if (npages <= limit) + if (npages == 1) break; mpages = npages - 1; npages >>= 1; @@ -937,7 +938,7 @@ swap_pager_reserve(vm_object_t object, vm_pindex_t sta VM_OBJECT_WLOCK(object); for (i = 0; i < size; i += n) { n = size - i; - blk = swp_pager_getswapspace(&n, 1); + blk = swp_pager_getswapspace(&n); if (blk == SWAPBLK_NONE) { swp_pager_meta_free(object, start, i); VM_OBJECT_WUNLOCK(object); @@ -1464,7 +1465,7 @@ swap_pager_putpages(vm_object_t object, vm_page_t *ma, /* Get a block of swap of size up to size n. */ VM_OBJECT_WLOCK(object); - blk = swp_pager_getswapspace(&n, 1); + blk = swp_pager_getswapspace(&n); if (blk == SWAPBLK_NONE) { VM_OBJECT_WUNLOCK(object); mtx_lock(&swbuf_mtx); Modified: projects/clang1000-import/usr.sbin/config/config.5 ============================================================================== --- projects/clang1000-import/usr.sbin/config/config.5 Mon Feb 24 04:01:09 2020 (r358268) +++ projects/clang1000-import/usr.sbin/config/config.5 Mon Feb 24 06:56:38 2020 (r358269) @@ -283,7 +283,8 @@ corresponds to MACHINE_ARCH. .Pp A kernel configuration file may have only one .Ic machine -directive. +directive, unless the second one matches the +machine argument in the first one exactly. .\" -------- MAKEOPTION -------- .Pp .It Ic makeoption Ar options Modified: projects/clang1000-import/usr.sbin/config/config.y ============================================================================== --- projects/clang1000-import/usr.sbin/config/config.y Mon Feb 24 04:01:09 2020 (r358268) +++ projects/clang1000-import/usr.sbin/config/config.y Mon Feb 24 06:56:38 2020 (r358269) @@ -155,8 +155,11 @@ Config_spec: machinearch = $2; } | ARCH Save_id Save_id { - if (machinename != NULL && - !(eq($2, machinename) && eq($3, machinearch))) + /* + * Allow the machinearch to change with a second machine directive, + * but still enforce no changes to the machinename. + */ + if (machinename != NULL && !eq($2, machinename)) errx(1, "%s:%d: only one machine directive is allowed", yyfile, yyline); machinename = $2; Modified: projects/clang1000-import/usr.sbin/config/configvers.h ============================================================================== --- projects/clang1000-import/usr.sbin/config/configvers.h Mon Feb 24 04:01:09 2020 (r358268) +++ projects/clang1000-import/usr.sbin/config/configvers.h Mon Feb 24 06:56:38 2020 (r358269) @@ -49,7 +49,7 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600016 +#define CONFIGVERS 600017 #define MAJOR_VERS(x) ((x) / 100000) /* Last config(8) version to require envmode/hintmode */