Messages in this thread | | | Date | Wed, 12 Jun 2002 15:05:47 -0500 (CDT) | From | Oliver Xymoron <> | Subject | Re: [PATCH] Futex Asynchronous Interface |
| |
On Wed, 12 Jun 2002, Linus Torvalds wrote:
> Any amount of tracking would be _extremely_ expensive. Right now getting > an uncontended lock is about 15 CPU cycles in user space. > > Tryin to tell the kernel about gettign that lock takes about 1us on a P4 > (system call overhead), ie we're talking 18000 cycles. 18 THOUSAND cycles > minimum. Compared to the current 15 cycles. That's more than three orders > of magnitude slower than the current code, and you just lost the whole > point of doing this all in user space in the first place.
That doesn't rule out approaches like storing a cookie alongside the lock once it's acquired (or in a parallel space). Which can easily be done with a wrapper around lock acquisition. And stale lock detection needn't be done in kernel space either.
-- "Love the dolphins," she advised him. "Write by W.A.S.T.E.."
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |