Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932628AbcCTB0T (ORCPT ); Sat, 19 Mar 2016 21:26:19 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:60303 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932619AbcCTB0N (ORCPT ); Sat, 19 Mar 2016 21:26:13 -0400 Date: Sun, 20 Mar 2016 01:26:10 +0000 From: Al Viro To: Linus Torvalds Cc: Benjamin LaHaise , Dave Chinner , Andrew Morton , linux-fsdevel , Linux API , Linux Kernel Mailing List , linux-aio@kvack.org, linux-mm Subject: Re: aio openat Re: [PATCH 07/13] aio: enabled thread based async fsync Message-ID: <20160320012610.GX17997@ZenIV.linux.org.uk> References: <20160115202131.GH6330@kvack.org> <20160120195957.GV6033@dastard> <20160120204449.GC12249@kvack.org> <20160120214546.GX6033@dastard> <20160123043922.GF6033@dastard> <20160314171737.GK17923@kvack.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1162 Lines: 23 On Sat, Mar 19, 2016 at 06:20:24PM -0700, Linus Torvalds wrote: > On Mon, Mar 14, 2016 at 10:17 AM, Benjamin LaHaise wrote: > > > > I had some time last week to make an aio openat do what it can in > > submit context. The results are an improvement: when openat is handled > > in submit context it completes in about half the time it takes compared > > to the round trip via the work queue, and it's not terribly much code > > either. > > This looks good to me, and I do suspect that any of these aio paths > should strive to have a synchronous vs threaded model. I think that > makes the whole thing much more interesting from a performance > standpoint. Umm... You do realize that LOOKUP_RCU in flags does *NOT* guarantee that it won't block, right? At the very least one would need to refuse to fall back on non-RCU mode without a full restart. Furthermore, vfs_open() itself can easily block. So this new LOOKUP flag makes no sense, and it's in the just about _the_ worst place possible for adding special cases with ill-defined semantics - do_last() is already far too convoluted and needs untangling, not adding half-assed kludges.