Re: [PATCH 2/9] [I/OAT] Driver for the Intel(R) I/OAT DMA engine

From: Andrew Morton
Date: Tue May 23 2006 - 20:56:06 EST


Chris Leech <christopher.leech@xxxxxxxxx> wrote:
>
> +static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *chan)
> +{
> + unsigned long phys_complete;
> + struct ioat_desc_sw *desc, *_desc;
> + dma_cookie_t cookie = 0;
> +
> + prefetch(chan->completion_virt);
> +
> + if (!spin_trylock(&chan->cleanup_lock))
> + return;
> +

spin_trylock() is a red flag. It often means that someone screwed their
locking up.

It at least needs a comment explaining its presence.
-
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/