From owner-svn-src-user@freebsd.org Thu Mar 22 19:49:38 2018 Return-Path: Delivered-To: svn-src-user@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 5B5AEF659D0 for ; Thu, 22 Mar 2018 19:49:38 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B69B87927; Thu, 22 Mar 2018 19:49:38 +0000 (UTC) (envelope-from jeff@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 065A415ACE; Thu, 22 Mar 2018 19:49:38 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MJnbiY072856; Thu, 22 Mar 2018 19:49:37 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MJnbOg072854; Thu, 22 Mar 2018 19:49:37 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803221949.w2MJnbOg072854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 22 Mar 2018 19:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331372 - user/jeff/numa/sys/vm X-SVN-Group: user X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: user/jeff/numa/sys/vm X-SVN-Commit-Revision: 331372 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 19:49:38 -0000 Author: jeff Date: Thu Mar 22 19:49:37 2018 New Revision: 331372 URL: https://svnweb.freebsd.org/changeset/base/331372 Log: Remove garbage diffs from merges and differences from head patches. Modified: user/jeff/numa/sys/vm/uma.h user/jeff/numa/sys/vm/vm_page.c Modified: user/jeff/numa/sys/vm/uma.h ============================================================================== --- user/jeff/numa/sys/vm/uma.h Thu Mar 22 19:38:21 2018 (r331371) +++ user/jeff/numa/sys/vm/uma.h Thu Mar 22 19:49:37 2018 (r331372) @@ -47,7 +47,6 @@ /* Types and type defs */ struct uma_zone; -struct vm_domain_iterator; /* Opaque type used as a handle to the zone */ typedef struct uma_zone * uma_zone_t; Modified: user/jeff/numa/sys/vm/vm_page.c ============================================================================== --- user/jeff/numa/sys/vm/vm_page.c Thu Mar 22 19:38:21 2018 (r331371) +++ user/jeff/numa/sys/vm/vm_page.c Thu Mar 22 19:49:37 2018 (r331372) @@ -790,7 +790,7 @@ vm_page_startup(vm_offset_t vaddr) vm_domain_freecnt_inc(vmd, pagecount); vm_cnt.v_page_count += (u_int)pagecount; - vmd = VM_DOMAIN(seg->domain);; + vmd = VM_DOMAIN(seg->domain); vmd->vmd_page_count += (u_int)pagecount; vmd->vmd_segs |= 1UL << m->segind; break; @@ -808,8 +808,13 @@ vm_page_startup(vm_offset_t vaddr) vm_page_blacklist_check(list, NULL); freeenv(list); - +#if VM_NRESERVLEVEL > 0 /* + * Initialize the reservation management system. + */ + vm_reserv_init(); +#endif + /* * Set an initial domain policy for thread0 so that allocations * can work. */ @@ -1865,9 +1870,7 @@ found: m->oflags = VPO_UNMANAGED; m->busy_lock = VPB_UNBUSIED; /* Don't change PG_ZERO. */ - vm_page_lock(m); vm_page_free_toq(m); - vm_page_unlock(m); if (req & VM_ALLOC_WAITFAIL) { VM_OBJECT_WUNLOCK(object); vm_radix_wait(); @@ -2070,9 +2073,7 @@ found: m->oflags = VPO_UNMANAGED; m->busy_lock = VPB_UNBUSIED; /* Don't change PG_ZERO. */ - vm_page_lock(m); vm_page_free_toq(m); - vm_page_unlock(m); } if (req & VM_ALLOC_WAITFAIL) { VM_OBJECT_WUNLOCK(object); @@ -2458,6 +2459,7 @@ static int vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run, vm_paddr_t high) { + struct vm_domain *vmd; struct mtx *m_mtx; struct spglist free; vm_object_t object; @@ -2587,12 +2589,7 @@ retry: if (vm_page_free_prep(m, false)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); - m->oflags = VPO_UNMANAGED; -#if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#endif - SLIST_INSERT_HEAD(&free, m, - plinks.s.ss); + /* * The new page must be deactivated * before the object is unlocked. @@ -2608,12 +2605,6 @@ retry: plinks.s.ss); KASSERT(m->dirty == 0, ("page %p is dirty", m)); - m->oflags = VPO_UNMANAGED; -#if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#endif - SLIST_INSERT_HEAD(&free, m, - plinks.s.ss); } } else error = EBUSY; @@ -2621,7 +2612,8 @@ unlock: VM_OBJECT_WUNLOCK(object); } else { MPASS(vm_phys_domain(m) == domain); - /* XXX order unsynchronized? */ + vmd = VM_DOMAIN(domain); + vm_domain_free_lock(vmd); order = m->order; if (order < VM_NFREEORDER) { /* @@ -2638,6 +2630,7 @@ unlock: else if (vm_reserv_is_page_free(m)) order = 0; #endif + vm_domain_free_unlock(vmd); if (order == VM_NFREEORDER) error = EINVAL; } @@ -2645,7 +2638,6 @@ unlock: if (m_mtx != NULL) mtx_unlock(m_mtx); if ((m = SLIST_FIRST(&free)) != NULL) { - struct vm_domain *vmd; int cnt; vmd = VM_DOMAIN(domain); @@ -3297,10 +3289,6 @@ vm_page_free_prep(vm_page_t m, bool pagequeue_locked) */ if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); -#if VM_NRESERVLEVEL > 0 - if (vm_reserv_free_page(m)) - return (false); -#endif #if VM_NRESERVLEVEL > 0 if (vm_reserv_free_page(m))