Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jan 2015 10:36:54 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ryan Stone <rysto32@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Sleeping thread held mutex in vm_pageout_oom()
Message-ID:  <20150123083654.GB42409@kib.kiev.ua>
In-Reply-To: <CAFMmRNziuN_jWyeNjdcB8yzM6uVM8_BO_h0U1Gphn%2B13E-7JcA@mail.gmail.com>
References:  <CAFMmRNxz252HMWWBmRf=Z69zh2_w9cD5e1AZGeizyagKezm2Hw@mail.gmail.com> <20150120083212.GC42409@kib.kiev.ua> <CAFMmRNz6Dof%2B95zyekUFEbmcqeFSqXr96Y7BUZpqJ9z0XoWVOA@mail.gmail.com> <20150122083514.GU42409@kib.kiev.ua> <CAFMmRNziuN_jWyeNjdcB8yzM6uVM8_BO_h0U1Gphn%2B13E-7JcA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 22, 2015 at 07:30:19PM -0500, Ryan Stone wrote:
> Other than the redundant braces on the else below, this looks good.  I
> tested it today and saw no further problems.
The (possibly implicit) style rule is to have {} around both branches
in if () when one branch requires {}.

> 
> I do think that a WITNESS_WARN() in vmspace_free() would be
> appropriate.  I'll give that a sanity here to make sure that nothing
> explodes and if everything looks ok, I'll commit it.
Ok.

> 
> > @@ -1573,16 +1602,19 @@ vm_pageout_oom(int shortage)
> >                  */
> >                 if (size > bigsize) {
> >                         if (bigproc != NULL)
> > -                               PROC_UNLOCK(bigproc);
> > +                               PRELE(bigproc);
> >                         bigproc = p;
> >                         bigsize = size;
> > -               } else
> > -                       PROC_UNLOCK(p);
> > +               } else {
> > +                       PRELE(p);
> > +               }



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