Re: [RFC][PATCH 6/8] mm: handle_speculative_fault()

From: Linus Torvalds
Date: Fri Jan 08 2010 - 16:37:26 EST




On Fri, 8 Jan 2010, Christoph Lameter wrote:
>
> I'd say that the ticket lock sucks for short critical sections vs. a
> simple spinlock since it forces the cacheline into shared mode.

Btw, I do agree that it's likely made worse by the fairness of the ticket
locks and the resulting extra traffic of people waiting for their turn.
Often for absolutely no good reason, since in this case the rwlock itself
will then be granted for reading in most cases - and there are no
ordering issues on readers.

We worried about the effects of fair spinlocks when introducing the ticket
locks, but nobody ever actually had a load that seemed to indicate it made
much of a difference, and we did have a few cases where starvation was a
very noticeable problem.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/