Displaying 20 results from an estimated 56 matches for "xen_clear_irq_pending".
2015 Apr 08
1
[Xen-devel] [PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen
...I wrote, except I think you
broke it.
> +static void xen_qlock_wait(u8 *byte, u8 val)
> +{
> + int irq = __this_cpu_read(lock_kicker_irq);
> +
> + /* If kicker interrupts not initialized yet, just spin */
> + if (irq == -1)
> + return;
> +
> + /* clear pending */
> + xen_clear_irq_pending(irq);
> +
> + /*
> + * We check the byte value after clearing pending IRQ to make sure
> + * that we won't miss a wakeup event because of the clearing.
My version had a barrier() here to ensure this. The documentation of
READ_ONCE() suggests that it is not sufficient to meet thi...
2015 Apr 08
1
[Xen-devel] [PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen
...I wrote, except I think you
broke it.
> +static void xen_qlock_wait(u8 *byte, u8 val)
> +{
> + int irq = __this_cpu_read(lock_kicker_irq);
> +
> + /* If kicker interrupts not initialized yet, just spin */
> + if (irq == -1)
> + return;
> +
> + /* clear pending */
> + xen_clear_irq_pending(irq);
> +
> + /*
> + * We check the byte value after clearing pending IRQ to make sure
> + * that we won't miss a wakeup event because of the clearing.
My version had a barrier() here to ensure this. The documentation of
READ_ONCE() suggests that it is not sufficient to meet thi...
2015 Apr 07
0
[PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen
...UNLOCK_VECTOR);
+}
+
+/*
+ * Halt the current CPU & release it back to the host
+ */
+static void xen_qlock_wait(u8 *byte, u8 val)
+{
+ int irq = __this_cpu_read(lock_kicker_irq);
+
+ /* If kicker interrupts not initialized yet, just spin */
+ if (irq == -1)
+ return;
+
+ /* clear pending */
+ xen_clear_irq_pending(irq);
+
+ /*
+ * We check the byte value after clearing pending IRQ to make sure
+ * that we won't miss a wakeup event because of the clearing.
+ *
+ * The sync_clear_bit() call in xen_clear_irq_pending() is atomic.
+ * So it is effectively a memory barrier for x86.
+ */
+ if (READ_ONCE(*...
2015 Mar 19
0
[Xen-devel] [PATCH 0/9] qspinlock stuff -v15
...-1;
+static DEFINE_PER_CPU(char *, irq_name);
+static bool xen_pvspin = true;
+
+#ifdef CONFIG_QUEUE_SPINLOCK
+
+#include <asm/qspinlock.h>
+
+PV_CALLEE_SAVE_REGS_THUNK(__pv_queue_spin_unlock);
+
+static void xen_qlock_wait(u8 *ptr, u8 val)
+{
+ int irq = __this_cpu_read(lock_kicker_irq);
+
+ xen_clear_irq_pending(irq);
+
+ barrier();
+
+ if (READ_ONCE(*ptr) == val)
+ xen_poll_irq(irq);
+}
+
+static void xen_qlock_kick(int cpu)
+{
+ xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
+}
+
+#else
+
struct xen_lock_waiting {
struct arch_spinlock *lock;
__ticket_t want;
};
-static DEFINE_PER_CPU(int, lock_k...
2015 Mar 19
0
[Xen-devel] [PATCH 0/9] qspinlock stuff -v15
...-1;
+static DEFINE_PER_CPU(char *, irq_name);
+static bool xen_pvspin = true;
+
+#ifdef CONFIG_QUEUE_SPINLOCK
+
+#include <asm/qspinlock.h>
+
+PV_CALLEE_SAVE_REGS_THUNK(__pv_queue_spin_unlock);
+
+static void xen_qlock_wait(u8 *ptr, u8 val)
+{
+ int irq = __this_cpu_read(lock_kicker_irq);
+
+ xen_clear_irq_pending(irq);
+
+ barrier();
+
+ if (READ_ONCE(*ptr) == val)
+ xen_poll_irq(irq);
+}
+
+static void xen_qlock_kick(int cpu)
+{
+ xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
+}
+
+#else
+
struct xen_lock_waiting {
struct arch_spinlock *lock;
__ticket_t want;
};
-static DEFINE_PER_CPU(int, lock_k...
2014 Apr 02
0
[PATCH v8 10/10] pvqspinlock, x86: Enable qspinlock PV support for XEN
..._irq);
+ unsigned long flags;
+
+ /* If kicker interrupts not initialized yet, just spin */
+ if (irq == -1)
+ return;
+
+ /*
+ * Make sure an interrupt handler can't upset things in a
+ * partially setup state.
+ */
+ local_irq_save(flags);
+
+ xen_halt_stats(type);
+ /* clear pending */
+ xen_clear_irq_pending(irq);
+
+ /* Allow interrupts while blocked */
+ local_irq_restore(flags);
+
+ /*
+ * If an interrupt happens here, it will leave the wakeup irq
+ * pending, which will cause xen_poll_irq() to return
+ * immediately.
+ */
+
+ /* Block until irq becomes pending (or perhaps a spurious wakeup) */...
2015 Jan 20
0
[PATCH v14 11/11] pvqspinlock, x86: Enable PV qspinlock for XEN
...g flags;
+ u64 start;
+
+ /* If kicker interrupts not initialized yet, just spin */
+ if (irq == -1)
+ return -1;
+
+ /*
+ * Make sure an interrupt handler can't upset things in a
+ * partially setup state.
+ */
+ local_irq_save(flags);
+ start = spin_time_start();
+
+ /* clear pending */
+ xen_clear_irq_pending(irq);
+
+ /* Allow interrupts while blocked */
+ local_irq_restore(flags);
+ /*
+ * Don't halt if the content of the given byte address differs from
+ * the expected value. A read memory barrier is added to make sure that
+ * the latest value of the byte address is fetched.
+ */
+ smp_rmb()...
2015 Jan 20
0
[PATCH v14 11/11] pvqspinlock, x86: Enable PV qspinlock for XEN
...g flags;
+ u64 start;
+
+ /* If kicker interrupts not initialized yet, just spin */
+ if (irq == -1)
+ return -1;
+
+ /*
+ * Make sure an interrupt handler can't upset things in a
+ * partially setup state.
+ */
+ local_irq_save(flags);
+ start = spin_time_start();
+
+ /* clear pending */
+ xen_clear_irq_pending(irq);
+
+ /* Allow interrupts while blocked */
+ local_irq_restore(flags);
+ /*
+ * Don't halt if the content of the given byte address differs from
+ * the expected value. A read memory barrier is added to make sure that
+ * the latest value of the byte address is fetched.
+ */
+ smp_rmb()...
2015 Jan 20
13
[PATCH v14 00/11] qspinlock: a 4-byte queue spinlock with PV support
v13->v14:
- Patches 1 & 2: Add queue_spin_unlock_wait() to accommodate commit
78bff1c86 from Oleg Nesterov.
- Fix the system hang problem when using PV qspinlock in an
over-committed guest due to a racing condition in the
pv_set_head_in_tail() function.
- Increase the MAYHALT_THRESHOLD from 10 to 1024.
- Change kick_cpu into a regular function pointer instead of a
2015 Jan 20
13
[PATCH v14 00/11] qspinlock: a 4-byte queue spinlock with PV support
v13->v14:
- Patches 1 & 2: Add queue_spin_unlock_wait() to accommodate commit
78bff1c86 from Oleg Nesterov.
- Fix the system hang problem when using PV qspinlock in an
over-committed guest due to a racing condition in the
pv_set_head_in_tail() function.
- Increase the MAYHALT_THRESHOLD from 10 to 1024.
- Change kick_cpu into a regular function pointer instead of a
2015 Apr 07
18
[PATCH v15 00/15] qspinlock: a 4-byte queue spinlock with PV support
v14->v15:
- Incorporate PeterZ's v15 qspinlock patch and improve upon the PV
qspinlock code by dynamically allocating the hash table as well
as some other performance optimization.
- Simplified the Xen PV qspinlock code as suggested by David Vrabel
<david.vrabel at citrix.com>.
- Add benchmarking data for 3.19 kernel to compare the performance
of a spinlock heavy test
2015 Apr 07
18
[PATCH v15 00/15] qspinlock: a 4-byte queue spinlock with PV support
v14->v15:
- Incorporate PeterZ's v15 qspinlock patch and improve upon the PV
qspinlock code by dynamically allocating the hash table as well
as some other performance optimization.
- Simplified the Xen PV qspinlock code as suggested by David Vrabel
<david.vrabel at citrix.com>.
- Add benchmarking data for 3.19 kernel to compare the performance
of a spinlock heavy test
2010 Nov 16
23
[PATCH 00/14] PV ticket locks without expanding spinlock
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Hi all,
This is a revised version of the pvticket lock series.
The early part of the series is mostly unchanged: it converts the bulk
of the ticket lock code into C and makes the "small" and "large"
ticket code common. The only changes are the incorporation of various
review comments.
The latter part of
2010 Nov 16
23
[PATCH 00/14] PV ticket locks without expanding spinlock
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Hi all,
This is a revised version of the pvticket lock series.
The early part of the series is mostly unchanged: it converts the bulk
of the ticket lock code into C and makes the "small" and "large"
ticket code common. The only changes are the incorporation of various
review comments.
The latter part of
2010 Nov 16
23
[PATCH 00/14] PV ticket locks without expanding spinlock
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Hi all,
This is a revised version of the pvticket lock series.
The early part of the series is mostly unchanged: it converts the bulk
of the ticket lock code into C and makes the "small" and "large"
ticket code common. The only changes are the incorporation of various
review comments.
The latter part of
2010 Nov 03
25
[PATCH 00/20] x86: ticket lock rewrite and paravirtualization
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Hi all,
This series does two major things:
1. It converts the bulk of the implementation to C, and makes the
"small ticket" and "large ticket" code common. Only the actual
size-dependent asm instructions are specific to the ticket size.
The resulting generated asm is very similar to the current
2010 Nov 03
25
[PATCH 00/20] x86: ticket lock rewrite and paravirtualization
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Hi all,
This series does two major things:
1. It converts the bulk of the implementation to C, and makes the
"small ticket" and "large ticket" code common. Only the actual
size-dependent asm instructions are specific to the ticket size.
The resulting generated asm is very similar to the current
2010 Nov 03
25
[PATCH 00/20] x86: ticket lock rewrite and paravirtualization
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Hi all,
This series does two major things:
1. It converts the bulk of the implementation to C, and makes the
"small ticket" and "large ticket" code common. Only the actual
size-dependent asm instructions are specific to the ticket size.
The resulting generated asm is very similar to the current
2012 Mar 21
15
[PATCH RFC V6 0/11] Paravirtualized ticketlocks
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Changes since last posting: (Raghavendra K T)
[
- Rebased to linux-3.3-rc6.
- used function+enum in place of macro (better type checking)
- use cmpxchg while resetting zero status for possible race
[suggested by Dave Hansen for KVM patches ]
]
This series replaces the existing paravirtualized spinlock mechanism
with a
2012 Mar 21
15
[PATCH RFC V6 0/11] Paravirtualized ticketlocks
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Changes since last posting: (Raghavendra K T)
[
- Rebased to linux-3.3-rc6.
- used function+enum in place of macro (better type checking)
- use cmpxchg while resetting zero status for possible race
[suggested by Dave Hansen for KVM patches ]
]
This series replaces the existing paravirtualized spinlock mechanism
with a