lkml.org 
[lkml]   [2018]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 28/32] aio: simplify cancellation
Date
Christoph Hellwig <hch@lst.de> writes:

> With the current aio code there is no need for the magic KIOCB_CANCELLED
> value, as a cancelation just kicks the driver to queue the completion
> ASAP, with all actual completion handling done in another thread. Given
> that both the completion path and cancelation take the context lock there
> is no need for magic cmpxchg loops either.

The cmpxchg was made unnecessary when the complementary xchg was removed
in commit bec68faaf ("aio: io_cancel() no longer returns the io_event").
There was no longer a need to ensure only the completion path or the
cancellation path delivered the completion event. Now, the completion
is always delivered via aio_complete.

So yeah, we can get rid of this.

Acked-by: Jeff Moyer <jmoyer@redhat.com>

\
 
 \ /
  Last update: 2018-01-14 23:22    [W:0.417 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site