[PATCH 2/4] aio: add a iocb refcount

2018-08-06 Thread Christoph Hellwig
This is needed to prevent races caused by the way the ->poll API works. To avoid introducing overhead for other users of the iocbs we initialize it to zero and only do refcount operations if it is non-zero in the completion path. Signed-off-by: Christoph Hellwig Tested-by: Avi Kivity ---

[PATCH 2/4] aio: add a iocb refcount

2018-08-06 Thread Christoph Hellwig
This is needed to prevent races caused by the way the ->poll API works. To avoid introducing overhead for other users of the iocbs we initialize it to zero and only do refcount operations if it is non-zero in the completion path. Signed-off-by: Christoph Hellwig Tested-by: Avi Kivity ---

Re: [PATCH 2/4] aio: add a iocb refcount

2018-08-02 Thread Christoph Hellwig
On Thu, Aug 02, 2018 at 12:19:56AM +0100, Al Viro wrote: > On Mon, Jul 30, 2018 at 09:15:42AM +0200, Christoph Hellwig wrote: > > This is needed to prevent races caused by the way the ->poll API works. > > To avoid introducing overhead for other users of the iocbs we initialize > > it to zero and

Re: [PATCH 2/4] aio: add a iocb refcount

2018-08-02 Thread Christoph Hellwig
On Thu, Aug 02, 2018 at 12:19:56AM +0100, Al Viro wrote: > On Mon, Jul 30, 2018 at 09:15:42AM +0200, Christoph Hellwig wrote: > > This is needed to prevent races caused by the way the ->poll API works. > > To avoid introducing overhead for other users of the iocbs we initialize > > it to zero and

Re: [PATCH 2/4] aio: add a iocb refcount

2018-08-01 Thread Al Viro
On Mon, Jul 30, 2018 at 09:15:42AM +0200, Christoph Hellwig wrote: > This is needed to prevent races caused by the way the ->poll API works. > To avoid introducing overhead for other users of the iocbs we initialize > it to zero and only do refcount operations if it is non-zero in the > completion

Re: [PATCH 2/4] aio: add a iocb refcount

2018-08-01 Thread Al Viro
On Mon, Jul 30, 2018 at 09:15:42AM +0200, Christoph Hellwig wrote: > This is needed to prevent races caused by the way the ->poll API works. > To avoid introducing overhead for other users of the iocbs we initialize > it to zero and only do refcount operations if it is non-zero in the > completion

[PATCH 2/4] aio: add a iocb refcount

2018-07-30 Thread Christoph Hellwig
This is needed to prevent races caused by the way the ->poll API works. To avoid introducing overhead for other users of the iocbs we initialize it to zero and only do refcount operations if it is non-zero in the completion path. Signed-off-by: Christoph Hellwig --- fs/aio.c | 17

[PATCH 2/4] aio: add a iocb refcount

2018-07-30 Thread Christoph Hellwig
This is needed to prevent races caused by the way the ->poll API works. To avoid introducing overhead for other users of the iocbs we initialize it to zero and only do refcount operations if it is non-zero in the completion path. Signed-off-by: Christoph Hellwig --- fs/aio.c | 17

Re: [PATCH 2/4] aio: add a iocb refcount

2018-07-27 Thread Christoph Hellwig
On Thu, Jul 26, 2018 at 01:57:05PM +0200, Christoph Hellwig wrote: > On Thu, Jul 26, 2018 at 04:22:27AM -0700, Matthew Wilcox wrote: > > On Thu, Jul 26, 2018 at 10:29:01AM +0200, Christoph Hellwig wrote: > > > + atomic_tki_refcnt; > > > > Should this be a refcount_t instead? At

Re: [PATCH 2/4] aio: add a iocb refcount

2018-07-27 Thread Christoph Hellwig
On Thu, Jul 26, 2018 at 01:57:05PM +0200, Christoph Hellwig wrote: > On Thu, Jul 26, 2018 at 04:22:27AM -0700, Matthew Wilcox wrote: > > On Thu, Jul 26, 2018 at 10:29:01AM +0200, Christoph Hellwig wrote: > > > + atomic_tki_refcnt; > > > > Should this be a refcount_t instead? At

Re: [PATCH 2/4] aio: add a iocb refcount

2018-07-26 Thread Christoph Hellwig
On Thu, Jul 26, 2018 at 04:22:27AM -0700, Matthew Wilcox wrote: > On Thu, Jul 26, 2018 at 10:29:01AM +0200, Christoph Hellwig wrote: > > + atomic_tki_refcnt; > > Should this be a refcount_t instead? At first glance your usage seems > compatible with refcount_t. I though the

Re: [PATCH 2/4] aio: add a iocb refcount

2018-07-26 Thread Christoph Hellwig
On Thu, Jul 26, 2018 at 04:22:27AM -0700, Matthew Wilcox wrote: > On Thu, Jul 26, 2018 at 10:29:01AM +0200, Christoph Hellwig wrote: > > + atomic_tki_refcnt; > > Should this be a refcount_t instead? At first glance your usage seems > compatible with refcount_t. I though the

Re: [PATCH 2/4] aio: add a iocb refcount

2018-07-26 Thread Matthew Wilcox
On Thu, Jul 26, 2018 at 10:29:01AM +0200, Christoph Hellwig wrote: > + atomic_tki_refcnt; Should this be a refcount_t instead? At first glance your usage seems compatible with refcount_t.

Re: [PATCH 2/4] aio: add a iocb refcount

2018-07-26 Thread Matthew Wilcox
On Thu, Jul 26, 2018 at 10:29:01AM +0200, Christoph Hellwig wrote: > + atomic_tki_refcnt; Should this be a refcount_t instead? At first glance your usage seems compatible with refcount_t.

[PATCH 2/4] aio: add a iocb refcount

2018-07-26 Thread Christoph Hellwig
This is needed to prevent races caused by the way the ->poll API works. To avoid introducing overhead for other users of the iocbs we initialize it to zero and only do refcount operations if it is non-zero in the completion path. Signed-off-by: Christoph Hellwig --- fs/aio.c | 16

[PATCH 2/4] aio: add a iocb refcount

2018-07-26 Thread Christoph Hellwig
This is needed to prevent races caused by the way the ->poll API works. To avoid introducing overhead for other users of the iocbs we initialize it to zero and only do refcount operations if it is non-zero in the completion path. Signed-off-by: Christoph Hellwig --- fs/aio.c | 16