From: "Jan Beulich" <JBeulich@novell.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Tim Deegan <Tim.Deegan@eu.citrix.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [RFC][PATCH] walking the page lists needs the page_alloc lock
Date: Fri, 13 Aug 2010 08:20:00 +0100 [thread overview]
Message-ID: <4C650E40020000780000FAB4@vpn.id2.novell.com> (raw)
In-Reply-To: <C88AAE59.1D986%keir.fraser@eu.citrix.com>
>>> On 13.08.10 at 09:10, Keir Fraser <keir.fraser@eu.citrix.com> wrote:
> On 13/08/2010 08:06, "Jan Beulich" <JBeulich@novell.com> wrote:
>
>>>> But then, to avoid a hanging system, these should be trylock-s
>>>> rather than plain locks, shouldn't they?
>>>
>>> Why? The handler is called in softirq context. It should be safe to spin.
>>
>> Hmm, indeed. I was looking at others, and at least
>> domain_dump_evtchn_info() also uses a trylock - apparently for
>> no good reason.
>
> Well, since you wrote that function, would you like me to switch
> domain_dump_evtchn_info() to do a proper spin_lock()?
Yes. I'd want to do a little cleanup to the initial printk()-s at once,
like in the patch below.
Jan
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- 2010-08-12.orig/xen/common/event_channel.c
+++ 2010-08-12/xen/common/event_channel.c
@@ -1123,14 +1123,11 @@ static void domain_dump_evtchn_info(stru
bitmap_scnlistprintf(keyhandler_scratch, sizeof(keyhandler_scratch),
d->poll_mask, d->max_vcpus);
- printk("Domain %d polling vCPUs: {%s}\n",
- d->domain_id, keyhandler_scratch);
-
- if ( !spin_trylock(&d->event_lock) )
- return;
-
printk("Event channel information for domain %d:\n"
- " port [p/m]\n", d->domain_id);
+ "Polling vCPUs: {%s}\n"
+ " port [p/m]\n", d->domain_id, keyhandler_scratch);
+
+ spin_lock(&d->event_lock);
for ( port = 1; port < MAX_EVTCHNS(d); ++port )
{
prev parent reply other threads:[~2010-08-13 7:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 13:49 [RFC][PATCH] walking the page lists needs the page_alloc lock Tim Deegan
2010-07-23 13:55 ` Tim Deegan
2010-08-12 15:09 ` Jan Beulich
2010-08-12 16:37 ` Tim Deegan
2010-08-13 6:40 ` Jan Beulich
2010-08-13 6:46 ` Keir Fraser
2010-08-13 7:06 ` Jan Beulich
2010-08-13 7:10 ` Keir Fraser
2010-08-13 7:20 ` Jan Beulich [this message]
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=4C650E40020000780000FAB4@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=Tim.Deegan@eu.citrix.com \
--cc=keir.fraser@eu.citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).