Re: [PATCH v3 2/3] aio: make aio_ring->dead boolean

From: Jeff Moyer
Date: Thu Jun 18 2015 - 14:03:17 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> "atomic_t dead" makes no sense. atomic_read() is the plain LOAD,
> it doesn't have some "additional" synchronization with xchg().
>
> And now that kill_ioctx() sets "dead" under mm->ioctx_lock we do
> not even need xchg().
>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
> Reviewed-by: Jeff Moyer <jmoyer@xxxxxxxxxx>

> @@ -765,7 +765,7 @@ static struct kioctx *ioctx_alloc(unsigned nr_events)
> err_cleanup:
> aio_nr_sub(ctx->max_reqs);
> err_ctx:
> - atomic_set(&ctx->dead, 1);
> + ctx->dead = true; /* unneeded */

I was hoping you'd remove this line entirely.

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