Re: lockdep and oops_in_progress

Previous thread: [RFC][PATCH 0/7] low latency synchrounous lumpy reclaim by KOSAKI Motohiro on Wednesday, August 4, 2010 - 11:11 pm. (33 messages)

Next thread: [PATCH] drm_proc: remove the unneeded _name_ variable in function drm_proc_create_files by Liu Aleaxander on Wednesday, August 4, 2010 - 11:32 pm. (1 message)
From: Dave Airlie
Date: Wednesday, August 4, 2010 - 11:21 pm

Hi guys,

I was debugging a wierd issue with suspend/resume and fbcon/X with
some recent work Jesse and myself did to try and make sure a pinned
fbcon always gets the text on it with a panic or oops occurs.

It does this by testing the oops_in_progress flag, however once any
lockdep issue occurs it looks to me that we leave this flag set
forever, in most places I can see in oops code etc they call
bust_spinlocks(1) then bust_spinlocks(0) to balance the
oops_in_progress value, but lockdep never seems to reset it.

I'm wondering if there is an inherent reason for this or if I whip up
a patch to reset once the lockdep is printed if this would cause any
issues?

Dave.
--

From: Peter Zijlstra
Date: Thursday, August 5, 2010 - 1:10 am

That's debug_locks_off(), right? I don't think there's a particular
reason we keep it set, cleaning that up might take a bit of work but
shouldn't be too hard.

Ingo, do you remember anything about that?, I think that bit comes from
before my time.
--

From: Yong Zhang
Date: Thursday, August 5, 2010 - 7:59 am

commit e0fdace10e75dac67d906213b780ff1b1a4cc360
Author: David Miller <davem@davemloft.net>
Date:   Fri Aug 1 01:11:22 2008 -0700

    debug_locks: set oops_in_progress if we will log messages.
    
    Otherwise lock debugging messages on runqueue locks can deadlock the
    system due to the wakeups performed by printk().
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

Seems we can revert that commit now because of 'robustify printk'.

Dave, what do you think about it?

Thanks,
--

From: Dave Airlie
Date: Wednesday, September 22, 2010 - 8:57 pm

DaveM ping?

I should probably just push for the revert if printk is robust enough now.

Dave.
--

From: Dave Airlie
Date: Tuesday, November 2, 2010 - 1:51 pm

Hey DaveM, as mentioned at KS,

Dave.
--

From: David Miller
Date: Tuesday, November 2, 2010 - 1:53 pm

From: Dave Airlie <airlied@gmail.com>

Thanks, will take a look.
--

From: David Miller
Date: Tuesday, November 2, 2010 - 1:54 pm

From: Dave Airlie <airlied@gmail.com>

I completely agree, this can definitely be reverted.

Thanks!
--

Previous thread: [RFC][PATCH 0/7] low latency synchrounous lumpy reclaim by KOSAKI Motohiro on Wednesday, August 4, 2010 - 11:11 pm. (33 messages)

Next thread: [PATCH] drm_proc: remove the unneeded _name_ variable in function drm_proc_create_files by Liu Aleaxander on Wednesday, August 4, 2010 -