Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1652035 > unrolled thread
| Started by | Noam Camus <noamca@mellanox.com> |
|---|---|
| First post | 2017-05-28 09:00 +0200 |
| Last post | 2017-06-04 08:20 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 08/11] ARC: [plat-eznps] spinlock aware for MTM Noam Camus <noamca@mellanox.com> - 2017-05-28 09:00 +0200
Re: [PATCH v2 08/11] ARC: [plat-eznps] spinlock aware for MTM Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2017-06-02 20:40 +0200
RE: [PATCH v2 08/11] ARC: [plat-eznps] spinlock aware for MTM Noam Camus <noamca@mellanox.com> - 2017-06-04 08:20 +0200
| From | Noam Camus <noamca@mellanox.com> |
|---|---|
| Date | 2017-05-28 09:00 +0200 |
| Subject | [PATCH v2 08/11] ARC: [plat-eznps] spinlock aware for MTM |
| Message-ID | <tM0lc-6QK-7@gated-at.bofh.it> |
From: Noam Camus <noamca@mellanox.com> This way when we execute "ex" during trying to hold lock we can switch to other HW thread and utilize the core intead of just spinning on a lock. We noticed about 10% improvement of execution time with hackbench test. Signed-off-by: Noam Camus <noamca@mellanox.com> --- arch/arc/include/asm/spinlock.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/arc/include/asm/spinlock.h b/arch/arc/include/asm/spinlock.h index 233d5ff..0a54ce7 100644 --- a/arch/arc/include/asm/spinlock.h +++ b/arch/arc/include/asm/spinlock.h @@ -252,9 +252,15 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) __asm__ __volatile__( "1: ex %0, [%1] \n" +#ifdef CONFIG_EZNPS_MTM_EXT + " .word %3 \n" +#endif " breq %0, %2, 1b \n" : "+&r" (val) : "r"(&(lock->slock)), "ir"(__ARCH_SPIN_LOCK_LOCKED__) +#ifdef CONFIG_EZNPS_MTM_EXT + , "i"(CTOP_INST_SCHD_RW) +#endif : "memory"); /* -- 1.7.1
[toc] | [next] | [standalone]
| From | Vineet Gupta <Vineet.Gupta1@synopsys.com> |
|---|---|
| Date | 2017-06-02 20:40 +0200 |
| Message-ID | <tNZEm-4Mu-3@gated-at.bofh.it> |
| In reply to | #1652035 |
On 05/27/2017 11:52 PM, Noam Camus wrote: > From: Noam Camus <noamca@mellanox.com> > > This way when we execute "ex" during trying to hold lock we can switch to > other HW thread and utilize the core intead of just spinning on a lock. > > We noticed about 10% improvement of execution time with hackbench test. > > Signed-off-by: Noam Camus <noamca@mellanox.com> > --- > arch/arc/include/asm/spinlock.h | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/arch/arc/include/asm/spinlock.h b/arch/arc/include/asm/spinlock.h > index 233d5ff..0a54ce7 100644 > --- a/arch/arc/include/asm/spinlock.h > +++ b/arch/arc/include/asm/spinlock.h > @@ -252,9 +252,15 @@ static inline void arch_spin_lock(arch_spinlock_t *lock) > > __asm__ __volatile__( > "1: ex %0, [%1] \n" > +#ifdef CONFIG_EZNPS_MTM_EXT > + " .word %3 \n" > +#endif > " breq %0, %2, 1b \n" > : "+&r" (val) > : "r"(&(lock->slock)), "ir"(__ARCH_SPIN_LOCK_LOCKED__) > +#ifdef CONFIG_EZNPS_MTM_EXT > + , "i"(CTOP_INST_SCHD_RW) > +#endif > : "memory"); > > /* > This is ugly - I will fix it up here to create an NPS version of arch_spin_lock ! -Vineet
[toc] | [prev] | [next] | [standalone]
| From | Noam Camus <noamca@mellanox.com> |
|---|---|
| Date | 2017-06-04 08:20 +0200 |
| Message-ID | <tOx3k-Ty-13@gated-at.bofh.it> |
| In reply to | #1656460 |
> From: Vineet Gupta [mailto:Vineet.Gupta1@synopsys.com] > Sent: Friday, June 2, 2017 21:36 PM ... >> arch/arc/include/asm/spinlock.h | 6 ++++++ >> 1 files changed, 6 insertions(+), 0 deletions(-) >> >> diff --git a/arch/arc/include/asm/spinlock.h >> b/arch/arc/include/asm/spinlock.h index 233d5ff..0a54ce7 100644 >> --- a/arch/arc/include/asm/spinlock.h >> +++ b/arch/arc/include/asm/spinlock.h >> @@ -252,9 +252,15 @@ static inline void arch_spin_lock(arch_spinlock_t >> *lock) >> >> __asm__ __volatile__( >> "1: ex %0, [%1] \n" >> +#ifdef CONFIG_EZNPS_MTM_EXT >> + " .word %3 \n" >> +#endif >> " breq %0, %2, 1b \n" >> : "+&r" (val) >> : "r"(&(lock->slock)), "ir"(__ARCH_SPIN_LOCK_LOCKED__) >> +#ifdef CONFIG_EZNPS_MTM_EXT >> + , "i"(CTOP_INST_SCHD_RW) >> +#endif >> : "memory"); >> >> /* >> >This is ugly - I will fix it up here to create an NPS version of arch_spin_lock ! TNX -Noam
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web