Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751401AbcDPD1z (ORCPT ); Fri, 15 Apr 2016 23:27:55 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:40273 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbcDPD1x (ORCPT ); Fri, 15 Apr 2016 23:27:53 -0400 Date: Sat, 16 Apr 2016 04:27:51 +0100 From: Al Viro To: Andreas Dilger Cc: Linus Torvalds , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCHSET][RFC][CFT] parallel lookups Message-ID: <20160416032750.GW25498@ZenIV.linux.org.uk> References: <20160416005232.GV25498@ZenIV.linux.org.uk> <958A657E-1983-4695-8869-4E03FEBA2F90@dilger.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <958A657E-1983-4695-8869-4E03FEBA2F90@dilger.ca> 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: 1853 Lines: 30 On Fri, Apr 15, 2016 at 09:02:02PM -0600, Andreas Dilger wrote: > Looks very interesting, and long awaited. How do you see the parallel > operations moving forward? Staying as lookup only, or moving on to parallel > modifications as well? lookup + readdir. Not even atomic_open at this point, and that's the route I'd suggest for modifiers - i.e. a combined lookup + mkdir, etc. operations. But we'd really need to sort atomic_open pathway out first... Let's discuss that at LSFMM, corridor track if needed. With lookups I'd been able to keep the surgery site pretty much entirely in VFS proper - fs/dcache.c and (after earlier massage) a single function in fs/namei.c. With readdir it'll be somewhat more invasive - pre-seeding dcache is done in a bunch of filesystems right now (mostly the network ones, where readdir request is equivalent to bulk lookup, as well as synthetic-inodes ones a-la procfs) and it'll need to be regularized; ncpfs is particularly nasty, what with its case-changing crap), but at least it will be reasonably compact. For atomic_open, and worse yet - mkdir/mknod/symlink/link/unlink/rmdir/rename it will really dip into filesystem code. A lot. FWIW, I agree that relying on i_mutex^Wi_rwsem for dcache protection is something worth getting rid of in the longer term. But that protection is there right now, and getting rid of that will take quite a bit of careful massage. I don't have such a transition plotted yet; not enough information at the moment, and I seriously suspect that atomic_open would be the best place to start. If nothing else, there are reasonably few instances of that puppy. Moreover, we badly need to regularize the paths around do_last() - right now they are messy as hell. Once that is sorted out, we'll be in better position to deal with the rest of directory-modifying operations.