From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964852AbXCNXmT (ORCPT ); Wed, 14 Mar 2007 19:42:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964853AbXCNXmT (ORCPT ); Wed, 14 Mar 2007 19:42:19 -0400 Received: from kanga.kvack.org ([66.96.29.28]:48072 "EHLO kanga.kvack.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964852AbXCNXmS (ORCPT ); Wed, 14 Mar 2007 19:42:18 -0400 Date: Wed, 14 Mar 2007 19:42:08 -0400 From: Benjamin LaHaise To: Davide Libenzi Cc: Linux Kernel Mailing List , Andrew Morton , Linus Torvalds , Ingo Molnar , Suparna Bhattacharya , Zach Brown Subject: Re: [patch 13/13] signalfd/timerfd/asyncfd v5 - KAIO asyncfd support (example/maybe-broken) ... Message-ID: <20070314234208.GC1246@kvack.org> References: <20070314231920.GB1246@kvack.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 14, 2007 at 04:24:54PM -0700, Davide Libenzi wrote: > Can you point me to a kernel path that ends up calling aio_complete() in a > do-not-sleep mode? If you remove that invariant, then it is very difficult for device drivers and other code to make use of aio_complete(). > The offender I see is drivers/usb/gadget/inode.c that calls it with a > spinlock held. Which was from irq context last time I checked. > The aio_run_iocb function seem to release/reacquire the lock before > calling aio_complete(). That implies nothing -- aio_complete() has to acquire ctx_lock and cannot be called holding the lock. Sure, it could probably be split into __aio_complete() and have aio_complete() wrap it acquiring the lock. -ben -- "Time is of no importance, Mr. President, only life is important." Don't Email: .