Re: user-space locks
On Sat, 10 Mar 2007, Vlad GALU wrote: On 3/10/07, Kip Macy <[EMAIL PROTECTED]> wrote: umtx Is it safe/recommended to use spinlocks, like in jemalloc, for very small portions of code? I'm particularly interested in protecting writes to a couple of word sized ints on amd64, so the critical section wouldn't be longer than two assignments. Of course, I could use a lockless queue for my purposes, but I'm asking anyway. I believe that the system malloc library is forced to use low level locking primitives because the pthread library depends on malloc. I would suggest using the pthread mutex primitives where at all possible. We might want to consider adding "adaptive" mutex support to the pthread libraries if we don't have it. Robert N M Watson Computer Laboratory University of Cambridge ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Fwd: user-space locks
On Fri, 9 Mar 2007, Kip Macy wrote: Do you think that the umtx KPI may have reached the appropriate level of maturity for writing up a man page? The KSE equivalent has had a substantive man page for quite some time. I would be more than happy to do any of the necessary technical copy-editing for the English. At this point I think you may be the only person well acquainted with the KPI. Thanks. During our threading discussion and code-reading session at the dev summit, the KSE man page was very helpful in understanding what was going on; having similar man pages for the libthr and umtx system calls would have been very helpful. The interfaces are a lot less complicated, but man pages are very useful generally. :-) Robert N M Watson Computer Laboratory University of Cambridge -Kip Kip Macy wrote: umtx [EMAIL PROTECTED]:man -k umtx umtx: nothing appropriate [EMAIL PROTECTED]: also if you use umtx I think you limit yourself to libthr. On 3/9/07, Peter Holmes <[EMAIL PROTECTED]> wrote: Does FreeBSD have anything similar to Futexes for Linux. Thanks, Peter Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: user-space locks
On 3/10/07, Kip Macy <[EMAIL PROTECTED]> wrote: umtx Is it safe/recommended to use spinlocks, like in jemalloc, for very small portions of code? I'm particularly interested in protecting writes to a couple of word sized ints on amd64, so the critical section wouldn't be longer than two assignments. Of course, I could use a lockless queue for my purposes, but I'm asking anyway. On 3/9/07, Peter Holmes <[EMAIL PROTECTED]> wrote: > Does FreeBSD have anything similar to Futexes for > Linux. > > Thanks, > Peter > > > > > Looking for earth-friendly autos? > Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. > http://autos.yahoo.com/green_center/ > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" -- If it's there, and you can see it, it's real. If it's not there, and you can see it, it's virtual. If it's there, and you can't see it, it's transparent. If it's not there, and you can't see it, you erased it. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Fwd: user-space locks
Do you think that the umtx KPI may have reached the appropriate level of maturity for writing up a man page? The KSE equivalent has had a substantive man page for quite some time. I would be more than happy to do any of the necessary technical copy-editing for the English. At this point I think you may be the only person well acquainted with the KPI. Thanks. -Kip Kip Macy wrote: umtx [EMAIL PROTECTED]:man -k umtx umtx: nothing appropriate [EMAIL PROTECTED]: also if you use umtx I think you limit yourself to libthr. On 3/9/07, Peter Holmes <[EMAIL PROTECTED]> wrote: Does FreeBSD have anything similar to Futexes for Linux. Thanks, Peter Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: user-space locks
And? With futexes you limit yourself to whatever library provides pthread wrappers around them. He asked for the FreeBSD equivalent and the answer is umtx. Can you provide us with some concrete examples where libkse is preferable? -Kip On 3/9/07, Julian Elischer <[EMAIL PROTECTED]> wrote: Kip Macy wrote: > umtx [EMAIL PROTECTED]:man -k umtx umtx: nothing appropriate [EMAIL PROTECTED]: also if you use umtx I think you limit yourself to libthr. > > On 3/9/07, Peter Holmes <[EMAIL PROTECTED]> wrote: >> Does FreeBSD have anything similar to Futexes for >> Linux. >> >> Thanks, >> Peter >> >> >> >> >> >> Looking for earth-friendly autos? >> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. >> http://autos.yahoo.com/green_center/ >> ___ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to >> "[EMAIL PROTECTED]" >> > ___ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: user-space locks
Kip Macy wrote: umtx [EMAIL PROTECTED]:man -k umtx umtx: nothing appropriate [EMAIL PROTECTED]: also if you use umtx I think you limit yourself to libthr. On 3/9/07, Peter Holmes <[EMAIL PROTECTED]> wrote: Does FreeBSD have anything similar to Futexes for Linux. Thanks, Peter Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: user-space locks
umtx On 3/9/07, Peter Holmes <[EMAIL PROTECTED]> wrote: Does FreeBSD have anything similar to Futexes for Linux. Thanks, Peter Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
user-space locks
Does FreeBSD have anything similar to Futexes for Linux. Thanks, Peter Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"