{"push_id":805955070,"size":18,"distinct_size":18,"ref":"refs/heads/IvanHoe","head":"fac8214afded985d1dd65cc648dd209b386acbfd","before":"d6f5eb21ccb6758dc8e50be45c6fcddcf6f4bf36","commits":[{"sha":"28ac4bf2b925a6cf13f8b78afcfdcf1c2c98201b","author":{"email":"5dcef21195e64c9c08aa779bb62b25e9133eaa33@linux.intel.com","name":"Yuanhan Liu"},"message":"rwsem-spinlock: Implement writer lock-stealing for better scalability\n\nWe (Linux Kernel Performance project) found a regression\nintroduced by commit:\n\n  5a505085f043 mm/rmap: Convert the struct anon_vma::mutex to an rwsem\n\nwhich converted all anon_vma::mutex locks rwsem write locks.\n\nThe semantics are the same, but the behavioral difference is\nquite huge in some cases. After investigating it we found the\nroot cause: mutexes support lock stealing while rwsems don't.\n\nHere is the link for the detailed regression report:\n\n  https://lkml.org/lkml/2013/1/29/84\n\nIngo suggested adding write lock stealing to rwsems:\n\n    \"I think we should allow lock-steal between rwsem writers - that\n     will not hurt fairness as most rwsem fairness concerns relate to\n     reader vs. writer fairness\"\n\nAnd here is the rwsem-spinlock version.\n\nWith this patch, we got a double performance increase in one\ntest box with following aim7 workfile:\n\n    FILESIZE: 1M\n    POOLSIZE: 10M\n    10 fork_test\n\n /usr/bin/time output w/o patch                       /usr/bin/time_output with patch\n -- Percent of CPU this job got: 369%                 Percent of CPU this job got: 537%\n Voluntary context switches: 640595016                Voluntary context switches: 157915561\n\nWe got a 45% increase in CPU usage and saved about 3/4 voluntary context switches.\n\nReported-by: LKP project <lkp@linux.intel.com>\nSuggested-by: Ingo Molnar <mingo@kernel.org>\nSigned-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>\nCc: Alex Shi <alex.shi@intel.com>\nCc: David Howells <dhowells@redhat.com>\nCc: Michel Lespinasse <walken@google.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Andrew Morton <akpm@linux-foundation.org>\nCc: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Anton Blanchard <anton@samba.org>\nCc: Arjan van de Ven <arjan@linux.intel.com>\nCc: paul.gortmaker@windriver.com\nLink: http://lkml.kernel.org/r/1359716356-23865-1-git-send-email-yuanhan.liu@linux.intel.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/28ac4bf2b925a6cf13f8b78afcfdcf1c2c98201b"},{"sha":"f1c9a3510cf066478956a17f2a82a6222bffca03","author":{"email":"1abc5746028550adcf7742cb5d47df86766285d8@intel.com","name":"Alex Shi"},"message":"rwsem: Implement writer lock-stealing for better scalability\n\nCommit 5a505085f043 (\"mm/rmap: Convert the struct anon_vma::mutex\nto an rwsem\") changed struct anon_vma::mutex to an rwsem, which\ncaused aim7 fork_test performance to drop by 50%.\n\nYuanhan Liu did the following excellent analysis:\n\n    https://lkml.org/lkml/2013/1/29/84\n\nand found that the regression is caused by strict, serialized,\nFIFO sequential write-ownership of rwsems. Ingo suggested\nimplementing opportunistic lock-stealing for the front writer\ntask in the waitqueue.\n\nYuanhan Liu implemented lock-stealing for spinlock-rwsems,\nwhich indeed recovered much of the regression - confirming\nthe analysis that the main factor in the regression was the\nFIFO writer-fairness of rwsems.\n\nIn this patch we allow lock-stealing to happen when the first\nwaiter is also writer. With that change in place the\naim7 fork_test performance is fully recovered on my\nIntel NHM EP, NHM EX, SNB EP 2S and 4S test-machines.\n\nReported-by: lkp@linux.intel.com\nReported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>\nSigned-off-by: Alex Shi <alex.shi@intel.com>\nCc: David Howells <dhowells@redhat.com>\nCc: Michel Lespinasse <walken@google.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Andrew Morton <akpm@linux-foundation.org>\nCc: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Anton Blanchard <anton@samba.org>\nCc: Arjan van de Ven <arjan@linux.intel.com>\nCc: paul.gortmaker@windriver.com\nLink: https://lkml.org/lkml/2013/1/29/84\nLink: http://lkml.kernel.org/r/1360069915-31619-1-git-send-email-alex.shi@intel.com\n[ Small stylistic fixes, updated changelog. ]\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\n\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/f1c9a3510cf066478956a17f2a82a6222bffca03"},{"sha":"ffe00c4db7d68e0292e9673e86c43541ae2e96de","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: make the waiter type an enumeration rather than a bitmask\n\nWe are not planning to add some new waiter flags, so we can convert the\nwaiter type into an enumeration.\n\nBackground: David Howells suggested I do this back when I tried adding\na new waiter type for unfair readers. However, I believe the cleanup\napplies regardless of that use case.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/ffe00c4db7d68e0292e9673e86c43541ae2e96de"},{"sha":"5a36edd0c282d6fc7214d6603419f35ea6c65d88","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: shorter spinlocked section in rwsem_down_failed_common()\n\nThis change reduces the size of the spinlocked and TASK_UNINTERRUPTIBLE\nsections in rwsem_down_failed_common():\n\n- We only need the sem->wait_lock to insert ourselves on the wait_list;\n  the waiter node can be prepared outside of the wait_lock.\n\n- The task state only needs to be set to TASK_UNINTERRUPTIBLE immediately\n  before checking if we actually need to sleep; it doesn't need to protect\n  the entire function.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/5a36edd0c282d6fc7214d6603419f35ea6c65d88"},{"sha":"f74ac88180deefa566a3815a6360374e8a6c0e06","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: move rwsem_down_failed_common code into rwsem_down_{read,write}_failed\n\nRemove the rwsem_down_failed_common function and replace it with two\nidentical copies of its code in rwsem_down_{read,write}_failed.\n\nThis is because we want to make different optimizations in\nrwsem_down_{read,write}_failed; we are adding this pure-duplication\nstep as a separate commit in order to make it easier to check the\nfollowing steps.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/f74ac88180deefa566a3815a6360374e8a6c0e06"},{"sha":"69ce1660b7dca29d2038dbda8868ed9ccbf70594","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: simplify rwsem_down_read_failed\n\nWhen trying to acquire a read lock, the RWSEM_ACTIVE_READ_BIAS\nadjustment doesn't cause other readers to block, so we never have to\nworry about waking them back after canceling this adjustment in\nrwsem_down_read_failed().\n\nWe also never want to steal the lock in rwsem_down_read_failed(), so we\ndon't have to grab the wait_lock either.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/69ce1660b7dca29d2038dbda8868ed9ccbf70594"},{"sha":"a251e6a78a55964d4b3b511f62f3c0d68968cadf","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: simplify rwsem_down_write_failed\n\nWhen waking writers, we never grant them the lock - instead, they have\nto acquire it themselves when they run, and remove themselves from the\nwait_list when they succeed.\n\nAs a result, we can do a few simplifications in rwsem_down_write_failed():\n\n- We don't need to check for !waiter.task since __rwsem_do_wake() doesn't\n  remove writers from the wait_list\n\n- There is no point releaseing the wait_lock before entering the wait loop,\n  as we will need to reacquire it immediately. We can change the loop so\n  that the lock is always held at the start of each loop iteration.\n\n- We don't need to get a reference on the task structure, since the task\n  is responsible for removing itself from the wait_list. There is no risk,\n  like in the rwsem_down_read_failed() case, that a task would wake up and\n  exit (thus destroying its task structure) while __rwsem_do_wake() is\n  still running - wait_lock protects against that.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/a251e6a78a55964d4b3b511f62f3c0d68968cadf"},{"sha":"7150b7a5b7e4f17dec191d2c8cc20f15777a28fb","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: more agressive lock stealing in rwsem_down_write_failed\n\nSome small code simplifications can be achieved by doing more agressive\nlock stealing:\n\n- When rwsem_down_write_failed() notices that there are no active locks\n  (and thus no thread to wake us if we decided to sleep), it used to wake\n  the first queued process. However, stealing the lock is also sufficient\n  to deal with this case, so we don't need this check anymore.\n\n- In try_get_writer_sem(), we can steal the lock even when the first waiter\n  is a reader. This is correct because the code path that wakes readers is\n  protected by the wait_lock. As to the performance effects of this change,\n  they are expected to be minimal: readers are still granted the lock\n  (rather than having to acquire it themselves) when they reach the front\n  of the wait queue, so we have essentially the same behavior as in\n  rwsem-spinlock.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/7150b7a5b7e4f17dec191d2c8cc20f15777a28fb"},{"sha":"19e5acde87c9daa7a42f699190d3a8733f0a0bfd","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: use cmpxchg for trying to steal write lock\n\nUsing rwsem_atomic_update to try stealing the write lock forced us to\nundo the adjustment in the failure path.  We can have simpler and faster\ncode by using cmpxchg instead.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nAcked-by: Rik van Riel <riel@redhat.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/19e5acde87c9daa7a42f699190d3a8733f0a0bfd"},{"sha":"e0b995c19bb99223c4f908c2a77b100251248b4e","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: avoid taking wait_lock in rwsem_down_write_failed\n\nIn rwsem_down_write_failed(), if there are active locks after we wake up\n(i.e.  the lock got stolen from us), skip taking the wait_lock and go\nback to sleep immediately.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nAcked-by: Rik van Riel <riel@redhat.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/e0b995c19bb99223c4f908c2a77b100251248b4e"},{"sha":"86c185518b0346c0048b644ac877c8c63e44f529","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: skip initial trylock in rwsem_down_write_failed\n\nWe can skip the initial trylock in rwsem_down_write_failed() if there\nare known active lockers already, thus saving one likely-to-fail\ncmpxchg.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nAcked-by: Rik van Riel <riel@redhat.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/86c185518b0346c0048b644ac877c8c63e44f529"},{"sha":"d6894f791f2d01dd04d4e5219792801e9092f904","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: simplify __rwsem_do_wake\n\nThis is mostly for cleanup value:\n\n- We don't need several gotos to handle the case where the first\n  waiter is a writer. Two simple tests will do (and generate very\n  similar code).\n\n- In the remainder of the function, we know the first waiter is a reader,\n  so we don't have to double check that. We can use do..while loops\n  to iterate over the readers to wake (generates slightly better code).\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/d6894f791f2d01dd04d4e5219792801e9092f904"},{"sha":"ecf3ca18c67cccdda730eeeb8a065e3cd39994cb","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: implement support for write lock stealing on the fastpath\n\nWhen we decide to wake up readers, we must first grant them as many read\nlocks as necessary, and then actually wake up all these readers.  But in\norder to know how many read shares to grant, we must first count the\nreaders at the head of the queue.  This might take a while if there are\nmany readers, and we want to be protected against a writer stealing the\nlock while we're counting.  To that end, we grant the first reader lock\nbefore counting how many more readers are queued.\n\nWe also require some adjustments to the wake_type semantics.\n\nRWSEM_WAKE_NO_ACTIVE used to mean that we had found the count to be\nRWSEM_WAITING_BIAS, in which case the rwsem was known to be free as\nnobody could steal it while we hold the wait_lock.  This doesn't make\nsense once we implement fastpath write lock stealing, so we now use\nRWSEM_WAKE_ANY in that case.\n\nSimilarly, when rwsem_down_write_failed found that a read lock was\nactive, it would use RWSEM_WAKE_READ_OWNED which signalled that new\nreaders could be woken without checking first that the rwsem was\navailable.  We can't do that anymore since the existing readers might\nrelease their read locks, and a writer could steal the lock before we\nwake up additional readers.  So, we have to use a new RWSEM_WAKE_READERS\nvalue to indicate we only want to wake readers, but we don't currently\nhold any read lock.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/ecf3ca18c67cccdda730eeeb8a065e3cd39994cb"},{"sha":"713547990c2897fc601ab2fbd5f691b99bbe59b4","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rwsem: do not block readers at head of queue if other readers are active\n\nThis change fixes a race condition where a reader might determine it\nneeds to block, but by the time it acquires the wait_lock the rwsem has\nactive readers and no queued waiters.\n\nIn this situation the reader can run in parallel with the existing\nactive readers; it does not need to block until the active readers\ncomplete.\n\nThanks to Peter Hurley for noticing this possible race.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/713547990c2897fc601ab2fbd5f691b99bbe59b4"},{"sha":"7bd8a196b17eb039e3090e8dc0b001bd701c797a","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"x86 rwsem: avoid taking slow path when stealing write lock\n\nmodify __down_write[_nested] and __down_write_trylock to grab the write\nlock whenever the active count is 0, even if there are queued waiters\n(they must be writers pending wakeup, since the active count is 0).\n\nNote that this is an optimization only; architectures without this\noptimization will still work fine:\n\n- __down_write() would take the slow path which would take the wait_lock\n  and then try stealing the lock (as in the spinlocked rwsem implementation)\n\n- __down_write_trylock() would fail, but callers must be ready to deal\n  with that - since there are some writers pending wakeup, they could\n  have raced with us and obtained the lock before we steal it.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nReviewed-by: Peter Hurley <peter@hurleysoftware.com>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/7bd8a196b17eb039e3090e8dc0b001bd701c797a"},{"sha":"77544837f53fb5adfa079f13ba467fb9247863e9","author":{"email":"d7ca2ed3e31360a26e5e60317ed1b792bd41becb@hp.com","name":"Davidlohr Bueso"},"message":"rwsem: no need for explicit signed longs\n\nChange explicit \"signed long\" declarations into plain \"long\" as suggested\nby Peter Hurley.\n\nSigned-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nReviewed-by: Michel Lespinasse <walken@google.com>\nSigned-off-by: Michel Lespinasse <walken@google.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Blechd0se <alex.christ@hotmail.de>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/77544837f53fb5adfa079f13ba467fb9247863e9"},{"sha":"9a2591d57da988bd9b5209e2cfcc70f1e9aa9b72","author":{"email":"c0f122cd185966be6dba33f6e0bc5de2dbbd0b33@codeaurora.org","name":"Ashwin Chaugule"},"message":"rwsem: Optimized ARM RWSEM algorithm\n\nRWSEM implementation for ARM using atomic functions.\nHeavily based on arch/sh/include/asm/rwsem.h","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/9a2591d57da988bd9b5209e2cfcc70f1e9aa9b72"},{"sha":"fac8214afded985d1dd65cc648dd209b386acbfd","author":{"email":"d7ca2ed3e31360a26e5e60317ed1b792bd41becb@hp.com","name":"Davidlohr Bueso"},"message":"rwsem: check counter to avoid cmpxchg calls\n\nThis patch tries to reduce the amount of cmpxchg calls in the writer\nfailed path by checking the counter value first before issuing the\ninstruction.  If ->count is not set to RWSEM_WAITING_BIAS then there is\nno point wasting a cmpxchg call.\n\nFurthermore, Michel states \"I suppose it helps due to the case where\nsomeone else steals the lock while we're trying to acquire\nsem->wait_lock.\"\n\nTwo very different workloads and machines were used to see how this\npatch improves throughput: pgbench on a quad-core laptop and aim7 on a\nlarge 8 socket box with 80 cores.\n\nSome results comparing Michel's fast-path write lock stealing\n(tps-rwsem) on a quad-core laptop running pgbench:\n\n  | db_size | clients  |  tps-rwsem     |   tps-patch  |\n  +---------+----------+----------------+--------------+\n  | 160 MB   |       1 |           6906 |         9153 | + 32.5\n  | 160 MB   |       2 |          15931 |        22487 | + 41.1%\n  | 160 MB   |       4 |          33021 |        32503 |\n  | 160 MB   |       8 |          34626 |        34695 |\n  | 160 MB   |      16 |          33098 |        34003 |\n  | 160 MB   |      20 |          31343 |        31440 |\n  | 160 MB   |      30 |          28961 |        28987 |\n  | 160 MB   |      40 |          26902 |        26970 |\n  | 160 MB   |      50 |          25760 |        25810 |\n  ------------------------------------------------------\n  | 1.6 GB   |       1 |           7729 |         7537 |\n  | 1.6 GB   |       2 |          19009 |        23508 | + 23.7%\n  | 1.6 GB   |       4 |          33185 |        32666 |\n  | 1.6 GB   |       8 |          34550 |        34318 |\n  | 1.6 GB   |      16 |          33079 |        32689 |\n  | 1.6 GB   |      20 |          31494 |        31702 |\n  | 1.6 GB   |      30 |          28535 |        28755 |\n  | 1.6 GB   |      40 |          27054 |        27017 |\n  | 1.6 GB   |      50 |          25591 |        25560 |\n  ------------------------------------------------------\n  | 7.6 GB   |       1 |           6224 |         7469 | + 20.0%\n  | 7.6 GB   |       2 |          13611 |        12778 |\n  | 7.6 GB   |       4 |          33108 |        32927 |\n  | 7.6 GB   |       8 |          34712 |        34878 |\n  | 7.6 GB   |      16 |          32895 |        33003 |\n  | 7.6 GB   |      20 |          31689 |        31974 |\n  | 7.6 GB   |      30 |          29003 |        28806 |\n  | 7.6 GB   |      40 |          26683 |        26976 |\n  | 7.6 GB   |      50 |          25925 |        25652 |\n  ------------------------------------------------------\n\nFor the aim7 worloads, they overall improved on top of Michel's\npatchset.  For full graphs on how the rwsem series plus this patch\nbehaves on a large 8 socket machine against a vanilla kernel:\n\n  http://stgolabs.net/rwsem-aim7-results.tar.gz\n\nSigned-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/maxice8/android_kernel_motorola_msm8226/commits/fac8214afded985d1dd65cc648dd209b386acbfd"}]}