Do not lock vm map in swapout_procs().
ClosedPublic

Authored by kib on Fri, Dec 29, 7:14 PM.

Details

Summary

Neither swapout_procs() nor swapout() access the map.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kib created this revision.Fri, Dec 29, 7:14 PM
kib updated this revision to Diff 37191.Fri, Dec 29, 7:28 PM

Referencing vmspace is useless after vm_map is not accessed.

alc accepted this revision.Fri, Dec 29, 7:40 PM
This revision is now accepted and ready to land.Fri, Dec 29, 7:40 PM
This revision was automatically updated to reflect the committed changes.
alc added a comment.Fri, Dec 29, 10:44 PM

Hmm. Do we still need to unlock and relock the process?

_PHOLD_LITE(p);
PROC_UNLOCK(p);
sx_sunlock(&allproc_lock);

PROC_LOCK(p);
if (p->p_lock != 1 || (p->p_flag & (P_STOPPED_SINGLE |
    P_TRACED | P_SYSTEM)) != 0)
        goto nextproc;