From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 20 Mar 2018 16:20:22 +0100 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , viro@zeniv.linux.org.uk, Avi Kivity , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/36] aio: add delayed cancel support Message-ID: <20180320152022.GB23920@lst.de> References: <20180305212743.16664-1-hch@lst.de> <20180305212743.16664-8-hch@lst.de> <20180320031957.GJ7282@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180320031957.GJ7282@magnolia> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Mon, Mar 19, 2018 at 08:19:57PM -0700, Darrick J. Wong wrote: > On Mon, Mar 05, 2018 at 01:27:14PM -0800, Christoph Hellwig wrote: > > The upcoming aio poll support would like to be able to complete the > > iocb inline from the cancellation context, but that would cause > > a lock order reversal. Add support for optionally moving the cancelation > > outside the context lock to avoid this reversal. > > I started to wonder which lock order reversal the commit message refers > to? > > I think the reason for adding delayed cancellations is that we want to > be able to call io_cancel -> kiocb_cancel -> aio_poll_cancel -> > aio_complete without double locking ctx_lock? It is. I've updated the commit message.