Sleeping thread held mutex in vm_pageout_oom()
Konstantin Belousov
kostikbel at gmail.com
Fri Jan 23 08:37:01 UTC 2015
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);
> > + }
More information about the freebsd-hackers
mailing list