svn commit: r364129 - head/sys/vm

Mark Johnston markj at freebsd.org
Tue Aug 11 22:31:05 UTC 2020


On Tue, Aug 11, 2020 at 03:21:31PM -0700, Conrad Meyer wrote:
> Hi Konstantin, Mark (raised the same question),
> 
> On Tue, Aug 11, 2020 at 2:32 PM Konstantin Belousov <kostikbel at gmail.com> wrote:
> >
> > On Tue, Aug 11, 2020 at 08:37:45PM +0000, Conrad Meyer wrote:
> > > Author: cem
> > > Date: Tue Aug 11 20:37:45 2020
> > > New Revision: 364129
> > > URL: https://svnweb.freebsd.org/changeset/base/364129
> > >
> > > Log:
> > >   Add support for multithreading the inactive queue pageout within a domain.
> > > ...
> > > @@ -2488,7 +2488,7 @@ vm_page_zone_import(void *arg, void **store, int cnt,
> > >        * main purpose is to replenish the store of free pages.
> > >        */
> > >       if (vmd->vmd_severeset || curproc == pageproc ||
> > > -         !_vm_domain_allocate(vmd, VM_ALLOC_NORMAL, cnt))
> > > +         !_vm_domain_allocate(vmd, VM_ALLOC_SYSTEM, cnt))
> >
> > Why this change needed ?
> 
> The change was inherited from Jeff, along with the rest of it.  I
> don't know why he changed it, but it does seem orthogonal to the rest
> of the revision.  This part is nonessential as far as I know, and
> could be backed out.

To me it doesn't make sense.  The difference between VM_ALLOC_NORMAL and
_SYSTEM is that they use different thresholds for the free page count
before deciding whether to continue the allocation.  The _NORMAL
threshold is higher than the _SYSTEM threshold, but both are smaller
than the "severe" threshold at which we set vmd_severeset.  In other
words, if the free page count is such that a _NORMAL allocation would
fail but a _SYSTEM allocation would succeed, then vmd_severeset would be
set and we'd never get to the _vmd_domain_allocate() call to begin with.

So, I think this part of the change should be reverted.  Even if the
analysis is incorrect, it's logically separate from the rest of the
diff.  Prior to r355003 it made more sense, but per that commit it can
be harmful to populate the per-CPU page caches when the system is
severely short on free pages, so I would disagree with it anyway without
more testing.


More information about the svn-src-all mailing list