From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin LaHaise Subject: Re: [PATCH 12/25] aio: Refcounting cleanup Date: Wed, 28 Nov 2012 19:46:31 -0500 Message-ID: <20121129004631.GE19042@kvack.org> References: <1354121029-1376-1-git-send-email-koverstreet@google.com> <1354121029-1376-13-git-send-email-koverstreet@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, zab@redhat.com, jmoyer@redhat.com, axboe@kernel.dk, viro@zeniv.linux.org.uk To: Kent Overstreet Return-path: Content-Disposition: inline In-Reply-To: <1354121029-1376-13-git-send-email-koverstreet@google.com> Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org Hi Kent, On Wed, Nov 28, 2012 at 08:43:36AM -0800, Kent Overstreet wrote: > + * now it's safe to cancel any that need to be. > + */ > +static void free_ioctx(struct kioctx *ctx) ... > + aio_nr -= ctx->max_reqs; > + spin_unlock(&aio_nr_lock); > + > + synchronize_rcu(); > + > + pr_debug("freeing %p\n", ctx); > + kmem_cache_free(kioctx_cachep, ctx); > +} As mentioned on irc, we probably want to avoid the synchronize_rcu() overhead, since delays here will impact the time it takes for a task to exit. Cheers, -ben -- "Thought is the essence of where you are now." -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org