All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Fasheh <mark.fasheh@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] About Mark's advice on bug 48
Date: Mon Mar 29 14:28:24 2004	[thread overview]
Message-ID: <20040329202819.GV10672@ca-server1.us.oracle.com> (raw)
In-Reply-To: <4063DB4B.6060000@intel.com>

On Fri, Mar 26, 2004 at 03:27:07PM +0800, Sonic Zhang wrote:
> Hi Mark,
> 
> Finally, I found the second halt is caused by starvation when routine 
> ocfs_joutnal_set_unmounted() acquiring the lock osb->publish_lock. In 
> thread ocfs_volume_thread(), the delta jiffies to sleep between up() and 
> down() in schedule_timeout() is too short. Routine 
> ocfs_joutnal_set_unmounted() has no chance to check if lock 
> osb->publish_lock is released  between it is releases and reacquired by 
> thread ocfs_volume_thread. So routine ocfs_journal_set_unmounted() 
> always waits in loop. After I change the delta jiffies from 50 to 500, 
> kernel 2.6 won't halt when it reboots after  a OCFS volume is mounted.
*ouch* it seems that jiffies changed between 2.4 and 2.6 -- the code as is
will be heartbeating *way* to often, in fact prolly even swamping your disk!
Ok, I need to take a closer look at this (I believe we use jiffies in other
places too!), but good catch!

> I also add a line to release the lock in a branch to  symbol "finally". 
> This may remove latent dead lock. In addition, I clear the reference 
> point OcfsIpcCtxt.task before thread ocfs_recv_thread() exits. This 
> prevents invalid access to the task structure in routine 
> ocfs_dismount_volume() when rebooting.
This is good, though setting OcfsIpcCtxt.task is prolly redundant as it's
set in dismount volume, but I've always wondered why we didn't just set it
there.
	--Mark

--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh@oracle.com

  parent reply	other threads:[~2004-03-29 14:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-26  1:26 [Ocfs2-devel] About Mark's advice on bug 48 Sonic Zhang
2004-03-26  2:27 ` Sonic Zhang
2004-03-29 14:13   ` Mark Fasheh
2004-03-29 14:28 ` Mark Fasheh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-03-25  3:26 Sonic Zhang
2004-03-25 13:10 ` Mark Fasheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040329202819.GV10672@ca-server1.us.oracle.com \
    --to=mark.fasheh@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.