public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* lockdep annotations?
@ 2007-09-01 21:06 Christian Kujau
  2007-09-03  2:46 ` Lachlan McIlroy
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Kujau @ 2007-09-01 21:06 UTC (permalink / raw)
  To: xfs

Hi,

I try to follow -rc kernels and just upgraded to 2.6.23-rc5 and I still 
see: "INFO: possible circular locking dependency detected". Out of 
curiosity: (when) will these warnings be addressed? I mean, suits me for 
enabling CONFIG_LOCKDEP in the first place, but the only warnings I get 
is still xfs :)

FWIW, full log is here: http://nerdbynature.de/bits/2.6.23-rc5/messages_2.6.23-rc5

Thanks,
Christian.
-- 
BOFH excuse #156:

Zombie processes haunting the computer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lockdep annotations?
  2007-09-01 21:06 lockdep annotations? Christian Kujau
@ 2007-09-03  2:46 ` Lachlan McIlroy
  2007-09-03  6:33   ` Christian Kujau
  2007-09-03  9:01   ` David Chinner
  0 siblings, 2 replies; 5+ messages in thread
From: Lachlan McIlroy @ 2007-09-03  2:46 UTC (permalink / raw)
  To: Christian Kujau; +Cc: xfs

This is a locking inversion between the iolock and iprune_mutex.  I
hadn't seen this one before.  Was your system running low on memory
at the time?

We can't drop the iolock in the write path so we'll have to avoid
acquiring the iolock in xfs_ireclaim() which means we'll need another
way to synchronise with xfs_sync_inodes().

Thanks for pointing this one out.

Lachlan

Christian Kujau wrote:
> Hi,
> 
> I try to follow -rc kernels and just upgraded to 2.6.23-rc5 and I still 
> see: "INFO: possible circular locking dependency detected". Out of 
> curiosity: (when) will these warnings be addressed? I mean, suits me for 
> enabling CONFIG_LOCKDEP in the first place, but the only warnings I get 
> is still xfs :)
> 
> FWIW, full log is here: 
> http://nerdbynature.de/bits/2.6.23-rc5/messages_2.6.23-rc5
> 
> Thanks,
> Christian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lockdep annotations?
  2007-09-03  2:46 ` Lachlan McIlroy
@ 2007-09-03  6:33   ` Christian Kujau
  2007-09-03  9:01   ` David Chinner
  1 sibling, 0 replies; 5+ messages in thread
From: Christian Kujau @ 2007-09-03  6:33 UTC (permalink / raw)
  To: Lachlan McIlroy; +Cc: xfs

On Mon, 3 Sep 2007, Lachlan McIlroy wrote:
> This is a locking inversion between the iolock and iprune_mutex.  I
> hadn't seen this one before.  Was your system running low on memory
> at the time?

Usually, this might be the case, as lockdep reports only once and when 
it does it's usually the morning after the last reboot, when a script 
runs the backups (so the box is under load, probably memory pressure 
involved). However, this time I don't remember memory consuming tasks 
running. Unfortunately, I cannot reproduce this yet...

thanks for your explanations,
Christian.
-- 
BOFH excuse #321:

Scheduled global CPU outage

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lockdep annotations?
  2007-09-03  2:46 ` Lachlan McIlroy
  2007-09-03  6:33   ` Christian Kujau
@ 2007-09-03  9:01   ` David Chinner
  2007-09-04  0:51     ` Lachlan McIlroy
  1 sibling, 1 reply; 5+ messages in thread
From: David Chinner @ 2007-09-03  9:01 UTC (permalink / raw)
  To: Lachlan McIlroy; +Cc: Christian Kujau, xfs

On Mon, Sep 03, 2007 at 12:46:30PM +1000, Lachlan McIlroy wrote:
> This is a locking inversion between the iolock and iprune_mutex.  I
> hadn't seen this one before.  Was your system running low on memory
> at the time?
> 
> We can't drop the iolock in the write path so we'll have to avoid
> acquiring the iolock in xfs_ireclaim() which means we'll need another
> way to synchronise with xfs_sync_inodes().

I don't think a deadlock exists here - we have to be going through
memory reclaim to hit this inversion, so the only place that we
can deadlock is if we are holding the iprune_mutex across a memory
allocation. I don't think we do that....

Not to mention that the inode we hold the iolock on won't be on the
inode free list so we won't ever try to lock it during reclaim, either.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: lockdep annotations?
  2007-09-03  9:01   ` David Chinner
@ 2007-09-04  0:51     ` Lachlan McIlroy
  0 siblings, 0 replies; 5+ messages in thread
From: Lachlan McIlroy @ 2007-09-04  0:51 UTC (permalink / raw)
  To: David Chinner; +Cc: Christian Kujau, xfs

David Chinner wrote:
> On Mon, Sep 03, 2007 at 12:46:30PM +1000, Lachlan McIlroy wrote:
>> This is a locking inversion between the iolock and iprune_mutex.  I
>> hadn't seen this one before.  Was your system running low on memory
>> at the time?
>>
>> We can't drop the iolock in the write path so we'll have to avoid
>> acquiring the iolock in xfs_ireclaim() which means we'll need another
>> way to synchronise with xfs_sync_inodes().
> 
> I don't think a deadlock exists here - we have to be going through
> memory reclaim to hit this inversion, so the only place that we
> can deadlock is if we are holding the iprune_mutex across a memory
> allocation. I don't think we do that....
> 
> Not to mention that the inode we hold the iolock on won't be on the
> inode free list so we won't ever try to lock it during reclaim, either.
> 
Yep.  This is just another case where we've confused lockdep.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-04  0:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-01 21:06 lockdep annotations? Christian Kujau
2007-09-03  2:46 ` Lachlan McIlroy
2007-09-03  6:33   ` Christian Kujau
2007-09-03  9:01   ` David Chinner
2007-09-04  0:51     ` Lachlan McIlroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox