Re: [PATCH 25/26] aio: use xchg() instead of completion_lock

From: Hillf Danton
Date: Wed Dec 19 2012 - 06:59:01 EST


>@@ -686,9 +685,10 @@ void aio_complete(struct kiocb *iocb, long res, long res2)
> * ctx->ctx_lock to prevent other code from messing with the tail
> * pointer since we might be called from irq context.
> */

Well the comment is stale.

Hillf
>- spin_lock_irqsave(&ctx->completion_lock, flags);
>+ local_irq_save(flags);
>+ while ((tail = xchg(&ctx->tail, UINT_MAX)) == UINT_MAX)
>+ cpu_relax();
--
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/