diff for duplicates of <20161010053920.GC29373@linux-80c1.suse> diff --git a/a/1.txt b/N1/1.txt index 24bd8d7..b5f847b 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -132,9 +132,9 @@ index 05a37857ab55..d3d1042a509c 100644 @@ -50,7 +61,7 @@ osq_wait_next(struct optimistic_spin_queue *lock, for (;;) { - if (atomic_read(&lock->tail) == curr && -- atomic_cmpxchg_acquire(&lock->tail, curr, old) == curr) { -+ atomic_cmpxchg_relaxed(&lock->tail, curr, old) == curr) { + if (atomic_read(&lock->tail) = curr && +- atomic_cmpxchg_acquire(&lock->tail, curr, old) = curr) { ++ atomic_cmpxchg_relaxed(&lock->tail, curr, old) = curr) { /* * We were the last queued, we moved @lock back. @prev * will now observe @lock and will complete its @@ -169,7 +169,7 @@ index 05a37857ab55..d3d1042a509c 100644 - * the lock tail. - */ - old = atomic_xchg(&lock->tail, curr); -- if (old == OSQ_UNLOCKED_VAL) +- if (old = OSQ_UNLOCKED_VAL) - return true; - - prev = decode_cpu(old); @@ -206,8 +206,8 @@ index 05a37857ab55..d3d1042a509c 100644 - */ - - for (;;) { -- if (prev->next == node && -- cmpxchg(&prev->next, node, NULL) == node) +- if (prev->next = node && +- cmpxchg(&prev->next, node, NULL) = node) - break; - - /* @@ -266,7 +266,7 @@ index 05a37857ab55..d3d1042a509c 100644 + * the node fields _before_ publishing it to the the lock tail. \ + */ \ + old = atomic_xchg_release(&lock->tail, curr); \ -+ if (old == OSQ_UNLOCKED_VAL) { \ ++ if (old = OSQ_UNLOCKED_VAL) { \ + FENCECB; \ + return true; \ + } \ @@ -310,8 +310,8 @@ index 05a37857ab55..d3d1042a509c 100644 + * ordering, thus always rely on RELAXED semantics. \ + * This also applies below, in Step - B. \ + */ \ -+ if (prev->next == node && \ -+ cmpxchg_relaxed(&prev->next, node, NULL) == node) \ ++ if (prev->next = node && \ ++ cmpxchg_relaxed(&prev->next, node, NULL) = node) \ + break; \ + \ + /* \ @@ -366,7 +366,7 @@ index 05a37857ab55..d3d1042a509c 100644 - * Fast path for the uncontended case. - */ - if (likely(atomic_cmpxchg_release(&lock->tail, curr, -- OSQ_UNLOCKED_VAL) == curr)) +- OSQ_UNLOCKED_VAL) = curr)) - return; - - /* @@ -395,7 +395,7 @@ index 05a37857ab55..d3d1042a509c 100644 + * Fast path for the uncontended case. \ + */ \ + if (likely(atomic_cmpxchg_##FENCE(&lock->tail, curr, \ -+ OSQ_UNLOCKED_VAL) == curr)) \ ++ OSQ_UNLOCKED_VAL) = curr)) \ + return; \ + \ + /* \ diff --git a/a/content_digest b/N1/content_digest index 348bbec..f221922 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -7,7 +7,7 @@ "ref\057F6A647.3010207@hpe.com\0" "From\0Davidlohr Bueso <dave@stgolabs.net>\0" "Subject\0[PATCH] locking/osq: Provide proper lock/unlock and relaxed flavors\0" - "Date\0Sun, 9 Oct 2016 22:39:20 -0700\0" + "Date\0Mon, 10 Oct 2016 05:39:20 +0000\0" "To\0Waiman Long <waiman.long@hpe.com>\0" "Cc\0Peter Zijlstra <peterz@infradead.org>" Ingo Molnar <mingo@redhat.com> @@ -159,9 +159,9 @@ "@@ -50,7 +61,7 @@ osq_wait_next(struct optimistic_spin_queue *lock,\n" " \n" " \tfor (;;) {\n" - " \t\tif (atomic_read(&lock->tail) == curr &&\n" - "-\t\t atomic_cmpxchg_acquire(&lock->tail, curr, old) == curr) {\n" - "+\t\t atomic_cmpxchg_relaxed(&lock->tail, curr, old) == curr) {\n" + " \t\tif (atomic_read(&lock->tail) = curr &&\n" + "-\t\t atomic_cmpxchg_acquire(&lock->tail, curr, old) = curr) {\n" + "+\t\t atomic_cmpxchg_relaxed(&lock->tail, curr, old) = curr) {\n" " \t\t\t/*\n" " \t\t\t * We were the last queued, we moved @lock back. @prev\n" " \t\t\t * will now observe @lock and will complete its\n" @@ -196,7 +196,7 @@ "-\t * the lock tail.\n" "-\t */\n" "-\told = atomic_xchg(&lock->tail, curr);\n" - "-\tif (old == OSQ_UNLOCKED_VAL)\n" + "-\tif (old = OSQ_UNLOCKED_VAL)\n" "-\t\treturn true;\n" "-\n" "-\tprev = decode_cpu(old);\n" @@ -233,8 +233,8 @@ "-\t */\n" "-\n" "-\tfor (;;) {\n" - "-\t\tif (prev->next == node &&\n" - "-\t\t cmpxchg(&prev->next, node, NULL) == node)\n" + "-\t\tif (prev->next = node &&\n" + "-\t\t cmpxchg(&prev->next, node, NULL) = node)\n" "-\t\t\tbreak;\n" "-\n" "-\t\t/*\n" @@ -293,7 +293,7 @@ "+\t * the node fields _before_ publishing it to the the lock tail.\t\\\n" "+\t */\t\t\t\t\t\t\t\t\\\n" "+\told = atomic_xchg_release(&lock->tail, curr);\t\t\t\\\n" - "+\tif (old == OSQ_UNLOCKED_VAL) {\t\t\t\t\t\\\n" + "+\tif (old = OSQ_UNLOCKED_VAL) {\t\t\t\t\t\\\n" "+\t\tFENCECB;\t\t\t\t\t\t\\\n" "+\t\treturn true;\t\t\t\t\t\t\\\n" "+\t}\t\t\t\t\t\t\t\t\\\n" @@ -337,8 +337,8 @@ "+\t\t * ordering, thus always rely on RELAXED semantics.\t\\\n" "+\t\t * This also applies below, in Step - B.\t\t\\\n" "+\t\t */\t\t\t\t\t\t\t\\\n" - "+\t\tif (prev->next == node &&\t\t\t\t\\\n" - "+\t\t cmpxchg_relaxed(&prev->next, node, NULL) == node)\t\\\n" + "+\t\tif (prev->next = node &&\t\t\t\t\\\n" + "+\t\t cmpxchg_relaxed(&prev->next, node, NULL) = node)\t\\\n" "+\t\t\tbreak;\t\t\t\t\t\t\\\n" "+\t\t\t\t\t\t\t\t\t\\\n" "+\t\t/*\t\t\t\t\t\t\t\\\n" @@ -393,7 +393,7 @@ "-\t * Fast path for the uncontended case.\n" "-\t */\n" "-\tif (likely(atomic_cmpxchg_release(&lock->tail, curr,\n" - "-\t\t\t\t\t OSQ_UNLOCKED_VAL) == curr))\n" + "-\t\t\t\t\t OSQ_UNLOCKED_VAL) = curr))\n" "-\t\treturn;\n" "-\n" "-\t/*\n" @@ -422,7 +422,7 @@ "+\t * Fast path for the uncontended case.\t\t\t\t\\\n" "+\t */\t\t\t\t\t\t\t\t\\\n" "+\tif (likely(atomic_cmpxchg_##FENCE(&lock->tail, curr,\t\t\\\n" - "+\t\t\t\t\t OSQ_UNLOCKED_VAL) == curr))\t\\\n" + "+\t\t\t\t\t OSQ_UNLOCKED_VAL) = curr))\t\\\n" "+\t\treturn;\t\t\t\t\t\t\t\\\n" "+\t\t\t\t\t\t\t\t\t\\\n" "+\t/*\t\t\t\t\t\t\t\t\\\n" @@ -470,4 +470,4 @@ "-- \n" 2.6.6 -430eba44bd5ee2064aaec4463fb1e15d1f8b8336c91535064489b3f720e7bb8f +06b4391f5157ee0afbec385ccc1382c2ec34acad65e8698aee6062c288edc6c4
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.