Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Aug 2020 18:31:00 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Conrad Meyer <cem@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r364129 - head/sys/vm
Message-ID:  <20200811223100.GC77647@raichu>
In-Reply-To: <CAG6CVpWhW4dtv1j4ced0Me2qj6eUvY5j59%2BOcYXPTDOvMno4_Q@mail.gmail.com>
References:  <202008112037.07BKbjsL056699@repo.freebsd.org> <20200811213213.GT2551@kib.kiev.ua> <CAG6CVpWhW4dtv1j4ced0Me2qj6eUvY5j59%2BOcYXPTDOvMno4_Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200811223100.GC77647>