From: Hin-Tak Leung Subject: Re: debugging hfsplus and dynamic debug Date: Mon, 8 Oct 2012 00:30:28 +0100 (BST) Message-ID: <1349652628.40691.YahooMailClassic@web29406.mail.ird.yahoo.com> References: Reply-To: htl10@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Cc: linux-fsdevel@vger.kernel.org To: Vyacheslav Dubeyko Return-path: Received: from nm21-vm3.bullet.mail.ird.yahoo.com ([212.82.108.207]:44500 "HELO nm21-vm3.bullet.mail.ird.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753908Ab2JGXgK convert rfc822-to-8bit (ORCPT ); Sun, 7 Oct 2012 19:36:10 -0400 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --- On Sun, 7/10/12, Vyacheslav Dubeyko wrote: > Hi Hin-Tak, > > On Oct 7, 2012, at 3:21 AM, Hin-Tak Leung wrote: > > > Hi all, > > > > Currently debugging statements for the HFS+ driver are > enabled/disabled at compiled time by modifying DBG_MASK > towards the top of linux/fs/hfsplus/hfsplus_fs.h. > > > > Is there a strong reason against converting that to use > the dynamic debug feature > (linux/Documentation/dynamic-debug-howto.txt) instead? I > assume there is a performance penalty for dynamic debugging > vs compile-time config, and file system is probably one area > where performance is important. So the other question is, > does anybody know what sort of performance penality it > makes? > > > > I think that it is a good idea to use dynamic debug feature. > It needs to make some modifications in HFS+ driver for > this. > > As I can understand, disabled dynamic debug hasn't any > performance penalty. But you will have a some performance > degradation in the case of enabling dynamic debug. But it > needs to take into consideration a concrete issue for making > decision about how critical may using of dynamic debug. For > example, the using of dynamic debug feature can completely > hide issue reproducibility in the case of lock issue > investigation. I think there may be a small penalty even if it is not enabled; OTOH, you are totally right that enabling dynamic debugging may slow down the driver enough that it would hide lock/synchronization/contention or other interesting issue, that such issues disappear as soon as dynamic debugging is enabled :-). But it is probably a non-problem - if such problem disappear with dynamic debugging enabled it would probably also disappear with an edited DBG_MASK under the existing set-up. I have some first hand experience with dynamic debugging in another part of the kernel (DVB-T/C/S) - it is great; so I think hfs+ should move in that direction. (and dare I say I'll be making such changes..) I'd like hear people who think it is not a good idea, if there is any reason *not* to do it. > > One small reason I am thinking of converting is every > time one adds a feature (like Vyacheslav's recent xttr patch > series), one adds a bit mask. That obviously colides with > outside-kernel patches like the journalling ones, since > everybody uses the next-available bit. > > > > The bit mask is a way of getting debug output for some HFS+ > driver's feature. But dynamic debug can be a more flexible > way of getting debug output, as I can understand. So, it > makes sense to do the HFS+ driver modification for dynamic > debug support. :-) > > With the best regards, > Vyacheslav Dubeyko. > > > Other than dynamic-debugging, is there a better way of > handling the debugging statements in the hfsplus driver, > than it is currently doing? > > > > Hin-Tak > >