Re: [PATCH 3/7] time: Split timekeeper lock into separatereader/writer locks

From: Ingo Molnar
Date: Tue Feb 28 2012 - 03:09:07 EST



* John Stultz <john.stultz@xxxxxxxxxx> wrote:

> --- a/kernel/time/timekeeping.c
> +++ b/kernel/time/timekeeping.c
> @@ -71,8 +71,9 @@ struct timekeeper {
> /* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */
> struct timespec raw_time;
>
> - /* Seqlock for all timekeeper values */
> - seqlock_t lock;
> + /* locks for timekeeper structure */
> + seqcount_t rlock; /* This seqcount serializes readers from updates */
> + spinlock_t wlock; /* This spinlock serializes updaters */

Vertical spacing broken again - not just of the fields but of
the comments as well.

> @@ -576,11 +583,11 @@ u64 timekeeping_max_deferment(void)
> unsigned long seq;
> u64 ret;
> do {

sigh.

Thanks,

Ingo
--
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/