search for: confusuin

Displaying 6 results from an estimated 6 matches for "confusuin".

2015 Feb 13
0
[PATCH V4] x86 spinlock: Fix memory corruption on completing completions
.... It seems that arch_spin_is_contended() should be fixed with this change, (__ticket_t)(tmp.tail - tmp.head) > TICKET_LOCK_INC can be true because of TICKET_SLOWPATH_FLAG in .head, even if it is actually unlocked. And the "(__ticket_t)" typecast looks unnecessary, it only adds more confusuin, but this is cosmetic too. > @@ -772,7 +773,8 @@ __visible void kvm_lock_spinning(struct arch_spinlock *lock, __ticket_t want) > * check again make sure it didn't become free while > * we weren't looking. > */ > - if (ACCESS_ONCE(lock->tickets.head) == want) {...
2015 Feb 13
0
[PATCH V4] x86 spinlock: Fix memory corruption on completing completions
.... It seems that arch_spin_is_contended() should be fixed with this change, (__ticket_t)(tmp.tail - tmp.head) > TICKET_LOCK_INC can be true because of TICKET_SLOWPATH_FLAG in .head, even if it is actually unlocked. And the "(__ticket_t)" typecast looks unnecessary, it only adds more confusuin, but this is cosmetic too. > @@ -772,7 +773,8 @@ __visible void kvm_lock_spinning(struct arch_spinlock *lock, __ticket_t want) > * check again make sure it didn't become free while > * we weren't looking. > */ > - if (ACCESS_ONCE(lock->tickets.head) == want) {...
2015 Feb 15
1
[PATCH V4] x86 spinlock: Fix memory corruption on completing completions
...ead, even if it is actually > unlocked. Done. Hmm! it was because I was still under impression that slowpath bit is in tail. You are right, situation could lead to positive max and may report false contention. And the "(__ticket_t)" typecast looks unnecessary, it only adds more > confusuin, but this is cosmetic too. > Done. >> @@ -772,7 +773,8 @@ __visible void kvm_lock_spinning(struct arch_spinlock *lock, __ticket_t want) >> * check again make sure it didn't become free while >> * we weren't looking. >> */ >> - if (ACCESS_ONCE(l...
2015 Feb 15
1
[PATCH V4] x86 spinlock: Fix memory corruption on completing completions
...ead, even if it is actually > unlocked. Done. Hmm! it was because I was still under impression that slowpath bit is in tail. You are right, situation could lead to positive max and may report false contention. And the "(__ticket_t)" typecast looks unnecessary, it only adds more > confusuin, but this is cosmetic too. > Done. >> @@ -772,7 +773,8 @@ __visible void kvm_lock_spinning(struct arch_spinlock *lock, __ticket_t want) >> * check again make sure it didn't become free while >> * we weren't looking. >> */ >> - if (ACCESS_ONCE(l...
2015 Feb 13
3
[PATCH V4] x86 spinlock: Fix memory corruption on completing completions
Paravirt spinlock clears slowpath flag after doing unlock. As explained by Linus currently it does: prev = *lock; add_smp(&lock->tickets.head, TICKET_LOCK_INC); /* add_smp() is a full mb() */ if (unlikely(lock->tickets.tail & TICKET_SLOWPATH_FLAG)) __ticket_unlock_slowpath(lock, prev); which is
2015 Feb 13
3
[PATCH V4] x86 spinlock: Fix memory corruption on completing completions
Paravirt spinlock clears slowpath flag after doing unlock. As explained by Linus currently it does: prev = *lock; add_smp(&lock->tickets.head, TICKET_LOCK_INC); /* add_smp() is a full mb() */ if (unlikely(lock->tickets.tail & TICKET_SLOWPATH_FLAG)) __ticket_unlock_slowpath(lock, prev); which is