Re: [PATCH] smp/call: Detect stuck CSD locks

From: Ingo Molnar
Date: Fri Apr 03 2015 - 01:47:19 EST

* Ingo Molnar <mingo@xxxxxxxxxx> wrote:

> +static void csd_lock_wait(struct call_single_data *csd, int cpu)
> {
> - while (csd->flags & CSD_FLAG_LOCK)
> + int bug_id = 0;
> + u64 ts0, ts1, ts_delta;
> +
> + ts0 = jiffies_to_msecs(jiffies);

Note that while 'jiffies' is a global variable, it's read-mostly
accessed, so it is a pretty cheap way to acquire a timestamp in such a
simple polling context that has irqs enabled.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at