Date: Fri, 9 Mar 2018 11:42:30 -0500 From: Mark Johnston <markj@FreeBSD.org> To: Jeff Roberson <jeff@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r329894 - user/jeff/numa/sys/vm Message-ID: <20180309164230.GD6174@raichu> In-Reply-To: <201802240252.w1O2qeHk046648@repo.freebsd.org> References: <201802240252.w1O2qeHk046648@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 24, 2018 at 02:52:40AM +0000, Jeff Roberson wrote: > Author: jeff > Date: Sat Feb 24 02:52:39 2018 > New Revision: 329894 > URL: https://svnweb.freebsd.org/changeset/base/329894 > > Log: > Fine grain lock reservations. This permits us to free to a reservation > without the domain free lock held. It further reduces the scope of the free > lock so that it now only protects the queues and allocation from the free count. > > Modified: user/jeff/numa/sys/vm/vm_page.c > ============================================================================== > --- user/jeff/numa/sys/vm/vm_page.c Sat Feb 24 02:08:18 2018 (r329893) > +++ user/jeff/numa/sys/vm/vm_page.c Sat Feb 24 02:52:39 2018 (r329894) > [...] > @@ -2595,15 +2577,18 @@ retry: > KASSERT(m->dirty == 0, > ("page %p is dirty", m)); > } > - SLIST_INSERT_HEAD(&free, m, plinks.s.ss); > +#if VM_NRESERVLEVEL > 0 > + if (!vm_reserv_free_page(m)) > +#endif > + SLIST_INSERT_HEAD(&free, m, > + plinks.s.ss); > } else > error = EBUSY; > unlock: > VM_OBJECT_WUNLOCK(object); > } else { > MPASS(vm_phys_domain(m) == domain); > - vmd = VM_DOMAIN(domain); > - vm_domain_free_lock(vmd); > + vm_page_lock(m); > order = m->order; > if (order < VM_NFREEORDER) { > /* > @@ -2620,7 +2605,7 @@ unlock: > else if (vm_reserv_is_page_free(m)) > order = 0; > #endif > - vm_domain_free_unlock(vmd); > + vm_page_unlock(m); > if (order == VM_NFREEORDER) > error = EINVAL; > } I think this part of the change is not quite right. The free lock synchronizes access to the "order" field in addition to the reservation structures.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180309164230.GD6174>