From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbbGMXO5 (ORCPT ); Mon, 13 Jul 2015 19:14:57 -0400 Received: from ipmail06.adl2.internode.on.net ([150.101.137.129]:47018 "EHLO ipmail06.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbbGMXOz (ORCPT ); Mon, 13 Jul 2015 19:14:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2DYBgAXRaRV/+rV03ZbgxOBPah3AQEBAQEBBpovBAICgT9NAQEBAQEBgQuEJAEBBDocIxAIAxgJJQ8FJQMhE4gtzBEBAQgCIBmGBYUuhQYHhCsFlDGMA4FAhBiDD4UuilcmY4MqLDGCSwEBAQ Date: Tue, 14 Jul 2015 09:14:51 +1000 From: Dave Chinner To: Oleg Nesterov Cc: Al Viro , Jan Kara , Linus Torvalds , Paul McKenney , Peter Zijlstra , Daniel Wagner , Davidlohr Bueso , Ingo Molnar , Tejun Heo , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH RFC 0/4] change sb_writers to use percpu_rw_semaphore Message-ID: <20150713231451.GI7943@dastard> References: <20150713212536.GA13855@redhat.com> <20150713222309.GM3902@dastard> <20150713224237.GA17003@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150713224237.GA17003@redhat.com> 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 On Tue, Jul 14, 2015 at 12:42:37AM +0200, Oleg Nesterov wrote: > On 07/14, Dave Chinner wrote: > > > > [ Please cc linux-fsdevel@vger.kernel.org on filesystem > > infrastructure changes! ] > > OK, will do. > > > On Mon, Jul 13, 2015 at 11:25:36PM +0200, Oleg Nesterov wrote: > > > > > > - sb_lockdep_release() and sb_lockdep_acquire() play with > > > percpu_rw_semaphore's internals. > > > > > > Trivial, we need a couple of new helper in percpu-rwsem.c. > > > > - try compiling XFS, watch it break on freeze lockdep > > annotations > > Thanks a lot! I see. Still trivial, xfs can use the same helpers > rather the abuse lockdep directly. > > > > - Most probably I missed something else, and I do not need > > > how to test. > > > > xfstests has many freeze related stress tests. IIRC, generic/068 is > > the test that historically causes the most problems for freeze > > infrastructure changes. You'll also need to test at least ext4, XFS > > and btrfs, because they all stress the freeze code differently. > > Testing XFS, in particular, is a good idea because it has several > > custom freeze tests that aren't run on any other filesystem type. > > Thanks again. > > Do you see something fundamentally wrong with this change? I haven't looked particularly closely at the implementation, just enough to get an idea of the semantics of the new infrasructure (I didn't know that per-cpu rwsems existed!). The freeze code is essentially a multi-level read-optimised read/write barrier and AFAICT the per-cpu rw-sem has those semantics. From that perspective I don't see any fundamental problems, but there may be details that I've missed.... Cheers, Dave. -- Dave Chinner david@fromorbit.com