Skip to contentSkip to conversation

debugging hfsplus and dynamic debug

DISCUSSION Hin-Tak Leung 2 participants 3 messages Oct 6, 2012 – Oct 7, 2012 VFS

lore
Share & tools
lore
#0 lore raw

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?

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.

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

#1 lore raw

Hi Hin-Tak,

Quoted 6 lines · Hin-Tak Leung

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.

Quoted 2 lines

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.

Quoted 3 lines

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

#2 lore raw
Quoted 24 lines · Vyacheslav Dubeyko

Hi Hin-Tak,

Quoted 3 lines · Hin-Tak Leung

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.

Quoted 2 lines

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?

Quoted 1 line

I think that it is a good idea to use dynamic debug feature. It needs to make some modifications in HFS+ driver for this.

Quoted 8 lines

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.

Quoted 23 lines
Quoted 1 line

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.

Quoted 1 line

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.

Quoted 1 line

Other than dynamic-debugging, is there a better way of

handling the debugging statements in the hfsplus driver, than it is currently doing?

Quoted 2 lines

Hin-Tak