|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] cpuidle: add comments for hpet cpumask_lock usage
To: |
"xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx> |
Subject: |
[Xen-devel] [PATCH] cpuidle: add comments for hpet cpumask_lock usage |
From: |
"Wei, Gang" <gang.wei@xxxxxxxxx> |
Date: |
Fri, 18 Jun 2010 11:50:06 +0800 |
Accept-language: |
zh-CN, en-US |
Acceptlanguage: |
zh-CN, en-US |
Cc: |
Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>, "Wei, Gang" <gang.wei@xxxxxxxxx> |
Delivery-date: |
Thu, 17 Jun 2010 20:51:20 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
Thread-index: |
AcsOmVdFLXJbguPTQymZlMftErH3Ug== |
Thread-topic: |
[PATCH] cpuidle: add comments for hpet cpumask_lock usage |
cpuidle: add comments for hpet cpumask_lock usage
Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
diff -r 764e41b09017 xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c Thu Jun 17 08:53:12 2010 +0100
+++ b/xen/arch/x86/hpet.c Fri Jun 18 11:41:28 2010 +0800
@@ -34,6 +34,17 @@ struct hpet_event_channel
int shift;
s_time_t next_event;
cpumask_t cpumask;
+ /*
+ * cpumask_lock is used to prevent hpet intr handler from accessing other
+ * cpu's timer_deadline_start/end after the other cpu's mask was cleared --
+ * mask cleared means cpu waken up, then accessing timer_deadline_xxx from
+ * other cpu is not safe.
+ * It is not used for protecting cpumask, so set ops needn't take it.
+ * Multiple cpus clear cpumask simultaneously is ok due to the atomic
+ * feature of cpu_clear, so hpet_broadcast_exit() can take read lock for
+ * clearing cpumask, and handle_hpet_broadcast() have to take write lock
+ * for read cpumask & access timer_deadline_xxx.
+ */
rwlock_t cpumask_lock;
spinlock_t lock;
void (*event_handler)(struct hpet_event_channel *);
comment-hpet-cpumask_lock.patch
Description: comment-hpet-cpumask_lock.patch
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] cpuidle: add comments for hpet cpumask_lock usage,
Wei, Gang <=
|
|
|
|
|