Konrad Rzeszutek Wilk
2013-Sep-07 13:46 UTC
[PATCH 2/5] xen/spinlock: We don''t need the old structure anymore
As we are piggybacking on the generic ticketlock structs
and these old structures are not needed anymore.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
arch/x86/xen/spinlock.c | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 0438b93..71db82c 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -81,7 +81,6 @@ static inline void spin_time_accum_blocked(u64 start)
spinlock_stats.time_blocked += delta;
}
#else /* !CONFIG_XEN_DEBUG_FS */
-#define TIMEOUT (1 << 10)
static inline void add_stats(enum xen_contention_stat var, u32 val)
{
}
@@ -96,23 +95,6 @@ static inline void spin_time_accum_blocked(u64 start)
}
#endif /* CONFIG_XEN_DEBUG_FS */
-/*
- * Size struct xen_spinlock so it''s the same as arch_spinlock_t.
- */
-#if NR_CPUS < 256
-typedef u8 xen_spinners_t;
-# define inc_spinners(xl) \
- asm(LOCK_PREFIX " incb %0" : "+m" ((xl)->spinners) : :
"memory");
-# define dec_spinners(xl) \
- asm(LOCK_PREFIX " decb %0" : "+m" ((xl)->spinners) : :
"memory");
-#else
-typedef u16 xen_spinners_t;
-# define inc_spinners(xl) \
- asm(LOCK_PREFIX " incw %0" : "+m" ((xl)->spinners) : :
"memory");
-# define dec_spinners(xl) \
- asm(LOCK_PREFIX " decw %0" : "+m" ((xl)->spinners) : :
"memory");
-#endif
-
struct xen_lock_waiting {
struct arch_spinlock *lock;
__ticket_t want;
--
1.7.7.6
David Vrabel
2013-Sep-09 10:18 UTC
Re: [PATCH 2/5] xen/spinlock: We don''t need the old structure anymore
On 07/09/13 14:46, Konrad Rzeszutek Wilk wrote:> As we are piggybacking on the generic ticketlock structs > and these old structures are not needed anymore."As we are using the generic ticket lock..." "piggybacking" suggests the Xen code isn''t using a standard interface for this. Otherwise, Reviewed-by: David Vrabel <david.vrabel@citrix.com> David
Ramkumar Ramachandra
2013-Sep-09 10:36 UTC
Re: [PATCH 2/5] xen/spinlock: We don''t need the old structure anymore
Konrad Rzeszutek Wilk wrote:> diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c > index 0438b93..71db82c 100644 > --- a/arch/x86/xen/spinlock.c > +++ b/arch/x86/xen/spinlock.c > @@ -81,7 +81,6 @@ static inline void spin_time_accum_blocked(u64 start) > spinlock_stats.time_blocked += delta; > } > #else /* !CONFIG_XEN_DEBUG_FS */ > -#define TIMEOUT (1 << 10)The timeout can be reduced, I think.> static inline void add_stats(enum xen_contention_stat var, u32 val) > { > } > @@ -96,23 +95,6 @@ static inline void spin_time_accum_blocked(u64 start) > } > #endif /* CONFIG_XEN_DEBUG_FS */ > > -/* > - * Size struct xen_spinlock so it''s the same as arch_spinlock_t. > - */ > -#if NR_CPUS < 256 > -typedef u8 xen_spinners_t; > -# define inc_spinners(xl) \ > - asm(LOCK_PREFIX " incb %0" : "+m" ((xl)->spinners) : : "memory"); > -# define dec_spinners(xl) \ > - asm(LOCK_PREFIX " decb %0" : "+m" ((xl)->spinners) : : "memory"); > -#else > -typedef u16 xen_spinners_t; > -# define inc_spinners(xl) \ > - asm(LOCK_PREFIX " incw %0" : "+m" ((xl)->spinners) : : "memory"); > -# define dec_spinners(xl) \ > - asm(LOCK_PREFIX " decw %0" : "+m" ((xl)->spinners) : : "memory"); > -#endif > -Spinlocks on the filesystem help ensure consistency; otherwise, there is a chance of a lot of noise coming through. Although NR_CPUS > 256, very few CPUS are doing consistency checks.
Konrad Rzeszutek Wilk
2013-Sep-09 15:11 UTC
[PATCH 2/5] xen/spinlock: We don''t need the old structure anymore
As we are using the generic ticketlock structs and these
old structures are not needed anymore.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
---
arch/x86/xen/spinlock.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 0438b93..71db82c 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -81,7 +81,6 @@ static inline void spin_time_accum_blocked(u64 start)
spinlock_stats.time_blocked += delta;
}
#else /* !CONFIG_XEN_DEBUG_FS */
-#define TIMEOUT (1 << 10)
static inline void add_stats(enum xen_contention_stat var, u32 val)
{
}
@@ -96,23 +95,6 @@ static inline void spin_time_accum_blocked(u64 start)
}
#endif /* CONFIG_XEN_DEBUG_FS */
-/*
- * Size struct xen_spinlock so it''s the same as arch_spinlock_t.
- */
-#if NR_CPUS < 256
-typedef u8 xen_spinners_t;
-# define inc_spinners(xl) \
- asm(LOCK_PREFIX " incb %0" : "+m" ((xl)->spinners) : :
"memory");
-# define dec_spinners(xl) \
- asm(LOCK_PREFIX " decb %0" : "+m" ((xl)->spinners) : :
"memory");
-#else
-typedef u16 xen_spinners_t;
-# define inc_spinners(xl) \
- asm(LOCK_PREFIX " incw %0" : "+m" ((xl)->spinners) : :
"memory");
-# define dec_spinners(xl) \
- asm(LOCK_PREFIX " decw %0" : "+m" ((xl)->spinners) : :
"memory");
-#endif
-
struct xen_lock_waiting {
struct arch_spinlock *lock;
__ticket_t want;
--
1.8.3.1