{"push_id":602449137,"size":2,"distinct_size":2,"ref":"refs/heads/lollisense","head":"38f051d4f6f95015b00e1837f07a7a973ae204d1","before":"4b10e596f554ae44d38aa0b238623673f54ec1be","commits":[{"sha":"0bfbf6fc7fbfcc49cbb2859899f78f8c30e85d37","author":{"email":"3fddac958924aef220f202ca567388ddab3f14a8@infradead.org","name":"Peter Zijlstra"},"message":"arch: Introduce smp_load_acquire(), smp_store_release()\n\nA number of situations currently require the heavyweight smp_mb(),\neven though there is no need to order prior stores against later\nloads.  Many architectures have much cheaper ways to handle these\nsituations, but the Linux kernel currently has no portable way\nto make use of them.\n\nThis commit therefore supplies smp_load_acquire() and\nsmp_store_release() to remedy this situation.  The new\nsmp_load_acquire() primitive orders the specified load against\nany subsequent reads or writes, while the new smp_store_release()\nprimitive orders the specifed store against any prior reads or\nwrites.  These primitives allow array-based circular FIFOs to be\nimplemented without an smp_mb(), and also allow a theoretical\nhole in rcu_assign_pointer() to be closed at no additional\nexpense on most architectures.\n\nIn addition, the RCU experience transitioning from explicit\nsmp_read_barrier_depends() and smp_wmb() to rcu_dereference()\nand rcu_assign_pointer(), respectively resulted in substantial\nimprovements in readability.  It therefore seems likely that\nreplacing other explicit barriers with smp_load_acquire() and\nsmp_store_release() will provide similar benefits.  It appears\nthat roughly half of the explicit barriers in core kernel code\nmight be so replaced.\n\n[Changelog by PaulMck]\n(cherry picked from commit 47933ad41a86a4a9b50bed7c9b9bd2ba242aac63)\n\nReviewed-by: \"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com>\nSigned-off-by: Peter Zijlstra <peterz@infradead.org>\nAcked-by: Will Deacon <will.deacon@arm.com>\nCc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCc: Frederic Weisbecker <fweisbec@gmail.com>\nCc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>\nCc: Michael Ellerman <michael@ellerman.id.au>\nCc: Michael Neuling <mikey@neuling.org>\nCc: Russell King <linux@arm.linux.org.uk>\nCc: Geert Uytterhoeven <geert@linux-m68k.org>\nCc: Heiko Carstens <heiko.carstens@de.ibm.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Martin Schwidefsky <schwidefsky@de.ibm.com>\nCc: Victor Kaplansky <VICTORK@il.ibm.com>\nCc: Tony Luck <tony.luck@intel.com>\nCc: Oleg Nesterov <oleg@redhat.com>\nLink: http://lkml.kernel.org/r/20131213150640.908486364@infradead.org\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\n\nConflicts:\n\tarch/arm64/include/asm/barrier.h\n\tarch/metag/include/asm/barrier.h\n\tinclude/linux/compiler.h","distinct":true,"url":"https://api.github.com/repos/Buckmarble/Elite_M8/commits/0bfbf6fc7fbfcc49cbb2859899f78f8c30e85d37"},{"sha":"38f051d4f6f95015b00e1837f07a7a973ae204d1","author":{"email":"20b70f0af00562e63758b9ee42012ecc96c58590@redhat.com","name":"Oleg Nesterov"},"message":"introduce for_each_thread() to replace the buggy while_each_thread()\n\nwhile_each_thread() and next_thread() should die, almost every lockless\nusage is wrong.\n\n1. Unless g == current, the lockless while_each_thread() is not safe.\n\n   while_each_thread(g, t) can loop forever if g exits, next_thread()\n   can't reach the unhashed thread in this case. Note that this can\n   happen even if g is the group leader, it can exec.\n\n2. Even if while_each_thread() itself was correct, people often use\n   it wrongly.\n\n   It was never safe to just take rcu_read_lock() and loop unless\n   you verify that pid_alive(g) == T, even the first next_thread()\n   can point to the already freed/reused memory.\n\nThis patch adds signal_struct->thread_head and task->thread_node to\ncreate the normal rcu-safe list with the stable head.  The new\nfor_each_thread(g, t) helper is always safe under rcu_read_lock() as\nlong as this task_struct can't go away.\n\nNote: of course it is ugly to have both task_struct->thread_node and the\nold task_struct->thread_group, we will kill it later, after we change\nthe users of while_each_thread() to use for_each_thread().\n\nPerhaps we can kill it even before we convert all users, we can\nreimplement next_thread(t) using the new thread_head/thread_node.  But\nwe can't do this right now because this will lead to subtle behavioural\nchanges.  For example, do/while_each_thread() always sees at least one\ntask, while for_each_thread() can do nothing if the whole thread group\nhas died.  Or thread_group_empty(), currently its semantics is not clear\nunless thread_group_leader(p) and we need to audit the callers before we\ncan change it.\n\nSo this patch adds the new interface which has to coexist with the old\none for some time, hopefully the next changes will be more or less\nstraightforward and the old one will go away soon.\n\nBug 200004307\n\nSigned-off-by: Oleg Nesterov <oleg@redhat.com>\nReviewed-by: Sergey Dyasly <dserrg@gmail.com>\nTested-by: Sergey Dyasly <dserrg@gmail.com>\nReviewed-by: Sameer Nanda <snanda@chromium.org>\nAcked-by: David Rientjes <rientjes@google.com>\nCc: \"Eric W. Biederman\" <ebiederm@xmission.com>\nCc: Frederic Weisbecker <fweisbec@gmail.com>\nCc: Mandeep Singh Baines <msb@chromium.org>\nCc: \"Ma, Xindong\" <xindong.ma@intel.com>\nCc: Michal Hocko <mhocko@suse.cz>\nCc: \"Tu, Xiaobing\" <xiaobing.tu@intel.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n(cherry picked from commit 0c740d0afc3bff0a097ad03a1c8df92757516f5c)\nSigned-off-by: Sri Krishna chowdary <schowdary@nvidia.com>\nChange-Id: Id689cb1383ceba2561b66188d88258619b68f5c6\nReviewed-on: http://git-master/r/419041\nReviewed-by: Bharat Nihalani <bnihalani@nvidia.com>","distinct":true,"url":"https://api.github.com/repos/Buckmarble/Elite_M8/commits/38f051d4f6f95015b00e1837f07a7a973ae204d1"}]}