Author: jah Date: Sat Jan 14 19:35:36 2017 New Revision: 312191 URL: https://svnweb.freebsd.org/changeset/base/312191
Log: Add comment explaining relative order of sched_unpin() and mtx_unlock(). Suggested by: alc MFC after: 1 week Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Jan 14 18:04:12 2017 (r312190) +++ head/sys/i386/i386/pmap.c Sat Jan 14 19:35:36 2017 (r312191) @@ -4216,6 +4216,12 @@ pmap_zero_page(vm_page_t m) invlcaddr(pc->pc_cmap_addr2); pagezero(pc->pc_cmap_addr2); *cmap_pte2 = 0; + + /* + * Unpin the thread before releasing the lock. Otherwise the thread + * could be rescheduled while still bound to the current CPU, only + * to unpin itself immediately upon resuming execution. + */ sched_unpin(); mtx_unlock(&pc->pc_cmap_lock); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"