Sleeping thread held mutex in vm_pageout_oom()

Ryan Stone rysto32 at gmail.com
Fri Jan 23 00:30:22 UTC 2015


Other than the redundant braces on the else below, this looks good.  I
tested it today and saw no further problems.

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.

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