From: Xiaofeng Ling <xiaofeng.ling@intel.com>
To: Arun Sharma <arun.sharma@intel.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Should shadow_lock be spin_lock_recursive?
Date: Thu, 12 May 2005 09:57:24 +0800 [thread overview]
Message-ID: <4282B804.5010403@intel.com> (raw)
In-Reply-To: <4282441E.6080900@intel.com>
This dead lock happened on VNIF code when enabled shadow mode.
The shadow_lock path is so complex and maybe using recurisve lock
is the easiest way to avoid dead lock currently before clearing
the path or splitting the lock .
Arun Sharma wrote:
>
> During our testing, we found this code path where xen attempts to grab
> the shadow_lock, while holding it - leading to a deadlock.
>
> >> free_dom_mem->
> >> shadow_sync_and_drop_references->
> >> shadow_lock -> ..................... first lock
> >> shadow_remove_all_access->
> >> remove_all_access_in_page->
> >> put_page->
> >> free_domheap_pages->
> >> shadow_drop_references->
> >> shadow_lock -> ..................... second lock
>
> Questions:
>
> - should shadow lock be recursive?
> - is shadow lock too coarse grained? It seems to have led to a lot of
> code refactoring (__foo without lock and foo with lock). But there may
> be more such instances we haven't found yet.
>
> -Arun
next prev parent reply other threads:[~2005-05-12 1:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-11 17:42 Should shadow_lock be spin_lock_recursive? Arun Sharma
2005-05-12 1:57 ` Xiaofeng Ling [this message]
2005-05-12 7:57 ` Keir Fraser
2005-05-12 12:59 ` Michael A Fetterman
2005-05-13 22:40 ` Arun Sharma
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=4282B804.5010403@intel.com \
--to=xiaofeng.ling@intel.com \
--cc=arun.sharma@intel.com \
--cc=xen-devel@lists.xensource.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.