login
Header Space

 
 

Re: thread scheduling at mutex unlock

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andriy Gapon <avg@...>
Cc: <freebsd-stable@...>, <freebsd-threads@...>
Date: Thursday, May 15, 2008 - 12:22 am

Andriy Gapon wrote:

In fact, libthr is trying to avoid this conveying, if thread #1
hands off the ownership to thread #2, it will cause lots of context
switch, in the idea world, I would let thread #1 to run until it
exhausts its time slice, and at the end of its time slices,
thread #2 will get the mutex ownership, of course it is difficult to
make this work on SMP, but on UP, I would expect the result will
be close enough if thread scheduler is sane, so we don't raise
priority in kernel umtx code if a thread is blocked, this gives
thread #1 some times to re-acquire the mutex without context switches,
increases throughput.

Regards,
David Xu

_______________________________________________
freebsd-threads@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-threads
To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
thread scheduling at mutex unlock, Andriy Gapon, (Wed May 14, 11:17 am)
Re: thread scheduling at mutex unlock, Brent Casavant, (Thu May 15, 1:16 am)
Re: thread scheduling at mutex unlock, David Xu, (Thu May 15, 12:22 am)
Re: thread scheduling at mutex unlock, Andriy Gapon, (Thu May 15, 4:35 am)
Re: thread scheduling at mutex unlock, Alfred Perlstein, (Fri May 16, 4:15 pm)
Re: thread scheduling at mutex unlock, Brent Casavant, (Fri May 16, 5:17 pm)
Re: thread scheduling at mutex unlock, Daniel Eischen, (Fri May 16, 5:55 pm)
Re: thread scheduling at mutex unlock, Alfred Perlstein, (Fri May 16, 9:50 pm)
Re: thread scheduling at mutex unlock, Daniel Eischen, (Sat May 17, 1:11 am)
RE: thread scheduling at mutex unlock, David Schwartz, (Thu May 15, 4:25 pm)
Re: thread scheduling at mutex unlock, Brent Casavant, (Thu May 15, 3:51 pm)
Re: thread scheduling at mutex unlock, Andriy Gapon, (Thu May 15, 5:02 pm)
Re: thread scheduling at mutex unlock, Brent Casavant, (Thu May 15, 6:23 pm)
Re: thread scheduling at mutex unlock, Daniel Eischen, (Thu May 15, 9:24 am)
Re: thread scheduling at mutex unlock, Daniel Eischen, (Thu May 15, 1:54 pm)
Re: thread scheduling at mutex unlock, David Xu, (Thu May 15, 5:05 am)
Re: thread scheduling at mutex unlock, Andriy Gapon, (Thu May 15, 5:27 am)
Re: thread scheduling at mutex unlock, David Xu, (Thu May 15, 8:57 am)
Re: thread scheduling at mutex unlock, Andriy Gapon, (Thu May 15, 4:48 pm)
RE: thread scheduling at mutex unlock, David Schwartz, (Wed May 14, 8:29 pm)
Re: thread scheduling at mutex unlock, Andriy Gapon, (Wed May 14, 2:50 pm)
speck-geostationary