Page MenuHomeFreeBSD

Do not lock vm map in swapout_procs().
ClosedPublic

Authored by kib on Dec 29 2017, 7:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 27 2026, 3:16 PM
Unknown Object (File)
Apr 25 2026, 11:21 PM
Unknown Object (File)
Apr 24 2026, 11:41 PM
Unknown Object (File)
Apr 24 2026, 3:47 AM
Unknown Object (File)
Apr 16 2026, 8:46 AM
Unknown Object (File)
Apr 12 2026, 11:49 PM
Unknown Object (File)
Apr 10 2026, 11:43 PM
Unknown Object (File)
Apr 10 2026, 6:07 PM
Subscribers

Details

Summary

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

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Referencing vmspace is useless after vm_map is not accessed.

This revision is now accepted and ready to land.Dec 29 2017, 7:40 PM
This revision was automatically updated to reflect the committed changes.

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;