m...@freebsd.org wrote:
[snip]
I will test this patch out; thanks for the help!

Two questions:

1) How does a thread get moved between CPUs when it's not running?  I
see that we change the runqueue for non-running threads that are on a
runqueue.  Does the code always check for THREAD_CAN_SCHED when adding
a sleeping thread to a runqueue on wakeup?

2) I assume sched_switch() runs a lot more often than sched_pin() or
sched_affinity(), so it would make sense to add any performance
penalty of increased work in either of those places than in the
scheduler.  I suppose the two memory references for THREAD_CAN_MIGRATE
and THREAD_CAN_SCHED won't be that expensive.

sched_pin() gets used a fair amount on i386 for creating temporary mappings in order to avoid the need for system-wide TLB shootdowns. The use cases range from the fast path for pipes to page zeroing.

Alan

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to