{"push_id":622848935,"size":21,"distinct_size":21,"ref":"refs/heads/lollipop","head":"73823690f84439f40a6fe171afe997c7fdadb54d","before":"b7318ab1060da82ab943e3c7c2568debb9307a9a","commits":[{"sha":"7db45335126c9ae937e56706e3b539aa3caf6cb8","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"smp: Add task_struct argument to __cpu_up()\n\nPreparatory patch to make the idle thread allocation for secondary\ncpus generic.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Matt Turner <mattst88@gmail.com>\nCc: Russell King <linux@arm.linux.org.uk>\nCc: Mike Frysinger <vapier@gentoo.org>\nCc: Jesper Nilsson <jesper.nilsson@axis.com>\nCc: Richard Kuo <rkuo@codeaurora.org>\nCc: Tony Luck <tony.luck@intel.com>\nCc: Hirokazu Takata <takata@linux-m32r.org>\nCc: Ralf Baechle <ralf@linux-mips.org>\nCc: David Howells <dhowells@redhat.com>\nCc: James E.J. Bottomley <jejb@parisc-linux.org>\nCc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCc: Martin Schwidefsky <schwidefsky@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Chris Metcalf <cmetcalf@tilera.com>\nCc: Richard Weinberger <richard@nod.at>\nCc: x86@kernel.org\nLink: http://lkml.kernel.org/r/20120420124556.964170564@linutronix.de","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/7db45335126c9ae937e56706e3b539aa3caf6cb8"},{"sha":"2d6bd53725a1b38223ef5b86722a5f7ccde746e7","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"smp: Add generic smpboot facility\n\nStart a new file, which will hold SMP and CPU hotplug related generic\ninfrastructure.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Matt Turner <mattst88@gmail.com>\nCc: Russell King <linux@arm.linux.org.uk>\nCc: Mike Frysinger <vapier@gentoo.org>\nCc: Jesper Nilsson <jesper.nilsson@axis.com>\nCc: Richard Kuo <rkuo@codeaurora.org>\nCc: Tony Luck <tony.luck@intel.com>\nCc: Hirokazu Takata <takata@linux-m32r.org>\nCc: Ralf Baechle <ralf@linux-mips.org>\nCc: David Howells <dhowells@redhat.com>\nCc: James E.J. Bottomley <jejb@parisc-linux.org>\nCc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCc: Martin Schwidefsky <schwidefsky@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Chris Metcalf <cmetcalf@tilera.com>\nCc: Richard Weinberger <richard@nod.at>\nCc: x86@kernel.org\nLink: http://lkml.kernel.org/r/20120420124557.035417523@linutronix.de","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/2d6bd53725a1b38223ef5b86722a5f7ccde746e7"},{"sha":"ffe01cecd83f75a9fa5c0b9f948133b8a844d999","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"smp: Provide generic idle thread allocation\n\nAll SMP architectures have magic to fork the idle task and to store it\nfor reusage when cpu hotplug is enabled. Provide a generic\ninfrastructure for it.\n\nCreate/reinit the idle thread for the cpu which is brought up in the\ngeneric code and hand the thread pointer to the architecture code via\n__cpu_up().\n\nNote, that fork_idle() is called via a workqueue, because this\nguarantees that the idle thread does not get a reference to a user\nspace VM. This can happen when the boot process did not bring up all\npossible cpus and a later cpu_up() is initiated via the sysfs\ninterface. In that case fork_idle() would be called in the context of\nthe user space task and take a reference on the user space VM.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Matt Turner <mattst88@gmail.com>\nCc: Russell King <linux@arm.linux.org.uk>\nCc: Mike Frysinger <vapier@gentoo.org>\nCc: Jesper Nilsson <jesper.nilsson@axis.com>\nCc: Richard Kuo <rkuo@codeaurora.org>\nCc: Tony Luck <tony.luck@intel.com>\nCc: Hirokazu Takata <takata@linux-m32r.org>\nCc: Ralf Baechle <ralf@linux-mips.org>\nCc: David Howells <dhowells@redhat.com>\nCc: James E.J. Bottomley <jejb@parisc-linux.org>\nCc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCc: Martin Schwidefsky <schwidefsky@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Chris Metcalf <cmetcalf@tilera.com>\nCc: Richard Weinberger <richard@nod.at>\nCc: x86@kernel.org\nAcked-by: Venkatesh Pallipadi <venki@google.com>\nLink: http://lkml.kernel.org/r/20120420124557.102478630@linutronix.de","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/ffe01cecd83f75a9fa5c0b9f948133b8a844d999"},{"sha":"928c8ee934dcf3148179c1a401f7e361d9250992","author":{"email":"a42fd12510d3895be740fb89f87586733ee62f57@intel.com","name":"Suresh Siddha"},"message":"smp, idle: Allocate idle thread for each possible cpu during boot\n\npercpu areas are already allocated during boot for each possible cpu.\npercpu idle threads can be considered as an extension of the percpu areas,\nand allocate them for each possible cpu during boot.\n\nThis will eliminate the need for workqueue based idle thread allocation.\nIn future we can move the idle thread area into the percpu area too.\n\n[ tglx: Moved the loop into smpboot.c and added an error check when\n  the init code failed to allocate an idle thread for a cpu which\n  should be onlined ]\n\nSigned-off-by: Suresh Siddha <suresh.b.siddha@intel.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Tejun Heo <tj@kernel.org>\nCc: David Rientjes <rientjes@google.com>\nCc: venki@google.com\nLink: http://lkml.kernel.org/r/1334966930.28674.245.camel@sbsiddha-desk.sc.intel.com\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/928c8ee934dcf3148179c1a401f7e361d9250992"},{"sha":"7306d5ef6be514dd52264ff874580c8a6d67562b","author":{"email":"5b23f8226e886b22344fc642373ea657dd596b63@linux.vnet.ibm.com","name":"Srivatsa S. Bhat"},"message":"smpboot, idle: Optimize calls to smp_processor_id() in idle_threads_init()\n\nWhile trying to initialize idle threads for all cpus, idle_threads_init()\ncalls smp_processor_id() in a loop, which is unnecessary. The intent\nis to initialize idle threads for all non-boot cpus. So just use a variable\nto note the boot cpu and use it in the loop.\n\nSigned-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: suresh.b.siddha@intel.com\nCc: venki@google.com\nCc: nikunj@linux.vnet.ibm.com\nLink: http://lkml.kernel.org/r/20120524151055.2549.64309.stgit@srivatsabhat.in.ibm.com\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/7306d5ef6be514dd52264ff874580c8a6d67562b"},{"sha":"25be194a3d81c5f4259191fceb4bd7f94d6e0f55","author":{"email":"5b23f8226e886b22344fc642373ea657dd596b63@linux.vnet.ibm.com","name":"Srivatsa S. Bhat"},"message":"smpboot, idle: Fix comment mismatch over idle_threads_init()\n\nThe comment over idle_threads_init() really talks about the functionality\nof idle_init(). Move that comment to idle_init(), and add a suitable\ncomment over idle_threads_init().\n\nSigned-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: suresh.b.siddha@intel.com\nCc: venki@google.com\nCc: nikunj@linux.vnet.ibm.com\nLink: http://lkml.kernel.org/r/20120524151100.2549.66501.stgit@srivatsabhat.in.ibm.com\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/25be194a3d81c5f4259191fceb4bd7f94d6e0f55"},{"sha":"1e28c4bb3c4760b630a85c71f158244b260b319d","author":{"email":"546b05909706652891a87f7bfe385ae147f61f91@kernel.org","name":"Tejun Heo"},"message":"kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation\n\nMake the following two non-functional changes.\n\n* Separate out insert_kthread_work() from queue_kthread_work().\n\n* Relocate struct kthread_flush_work and kthread_flush_work_fn()\n  definitions above flush_kthread_work().\n\nv2: Added lockdep_assert_held() in insert_kthread_work() as suggested\n    by Andy Walls.\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\nAcked-by: Andy Walls <awalls@md.metrocast.net>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/1e28c4bb3c4760b630a85c71f158244b260b319d"},{"sha":"0fcab88015dbaa00502e337f88cbfda5a2a46354","author":{"email":"546b05909706652891a87f7bfe385ae147f61f91@kernel.org","name":"Tejun Heo"},"message":"kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed\n\nkthread_worker provides minimalistic workqueue-like interface for\nusers which need a dedicated worker thread (e.g. for realtime\npriority).  It has basic queue, flush_work, flush_worker operations\nwhich mostly match the workqueue counterparts; however, due to the way\nflush_work() is implemented, it has a noticeable difference of not\nallowing work items to be freed while being executed.\n\nWhile the current users of kthread_worker are okay with the current\nbehavior, the restriction does impede some valid use cases.  Also,\nremoving this difference isn't difficult and actually makes the code\neasier to understand.\n\nThis patch reimplements flush_kthread_work() such that it uses a\nflush_work item instead of queue/done sequence numbers.\n\nSigned-off-by: Tejun Heo <tj@kernel.org>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/0fcab88015dbaa00502e337f88cbfda5a2a46354"},{"sha":"4c8c9b96de230c7cd3b1188692962185221e0e26","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"kthread: Implement park/unpark facility\n\nTo avoid the full teardown/setup of per cpu kthreads in the case of\ncpu hot(un)plug, provide a facility which allows to put the kthread\ninto a park position and unpark it when the cpu comes online again.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nReviewed-by: Namhyung Kim <namhyung@kernel.org>\nCc: Peter Zijlstra <peterz@infradead.org>\nReviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nReviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/20120716103948.236618824@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/4c8c9b96de230c7cd3b1188692962185221e0e26"},{"sha":"52abe7cf886fac5b2bcbc6f485b27c68b6e08beb","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"smpboot: Provide infrastructure for percpu hotplug threads\n\nProvide a generic interface for setting up and tearing down percpu\nthreads.\n\nOn registration the threads for already online cpus are created and\nstarted. On deregistration (modules) the threads are stoppped.\n\nDuring hotplug operations the threads are created, started, parked and\nunparked. The datastructure for registration provides a pointer to\npercpu storage space and optional setup, cleanup, park, unpark\nfunctions. These functions are called when the thread state changes.\n\nEach implementation has to provide a function which is queried and\nreturns whether the thread should run and the thread function itself.\n\nThe core code handles all state transitions and avoids duplicated code\nin the call sites.\n\n[ paulmck: Preemption leak fix ]\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nReviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nReviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/20120716103948.352501068@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/52abe7cf886fac5b2bcbc6f485b27c68b6e08beb"},{"sha":"72a1a8f05a091f3efb2dff9eba54de6ff57a8b0d","author":{"email":"95dea50491c620faede961f7e6190a98a6df4edf@linaro.org","name":"Paul E. McKenney"},"message":"hotplug: Fix UP bug in smpboot hotplug code\n\nBecause kernel subsystems need their per-CPU kthreads on UP systems as\nwell as on SMP systems, the smpboot hotplug kthread functions must be\nprovided in UP builds as well as in SMP builds.  This commit therefore\nadds smpboot.c to UP builds and excludes irrelevant code via #ifdef.\n\nSigned-off-by: Paul E. McKenney <paul.mckenney@linaro.org>\nSigned-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\n\nConflicts:\n\tkernel/Makefile","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/72a1a8f05a091f3efb2dff9eba54de6ff57a8b0d"},{"sha":"ff38c0e31966177515fa0276f89a9e32ccfa4c77","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"smpboot: Allow selfparking per cpu threads\n\nThe stop machine threads are still killed when a cpu goes offline. The\nreason is that the thread is used to bring the cpu down, so it can't\nbe parked along with the other per cpu threads.\n\nAllow a per cpu thread to be excluded from automatic parking, so it\ncan park itself once it's done\n\nAdd a create callback function as well.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Arjan van de Veen <arjan@infradead.org>\nCc: Paul Turner <pjt@google.com>\nCc: Richard Weinberger <rw@linutronix.de>\nCc: Magnus Damm <magnus.damm@gmail.com>\nLink: http://lkml.kernel.org/r/20130131120741.553993267@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/ff38c0e31966177515fa0276f89a9e32ccfa4c77"},{"sha":"8c6014c043d8cba2d5820133b7eb4db3da13c52e","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"kthread: Prevent unpark race which puts threads on the wrong cpu\n\nThe smpboot threads rely on the park/unpark mechanism which binds per\ncpu threads on a particular core. Though the functionality is racy:\n\nCPU0\t       \t \tCPU1  \t     \t    CPU2\nunpark(T)\t\t\t\t    wake_up_process(T)\n  clear(SHOULD_PARK)\tT runs\n\t\t\tleave parkme() due to !SHOULD_PARK\n  bind_to(CPU2)\t\tBUG_ON(wrong CPU)\n\nWe cannot let the tasks move themself to the target CPU as one of\nthose tasks is actually the migration thread itself, which requires\nthat it starts running on the target cpu right away.\n\nThe solution to this problem is to prevent wakeups in park mode which\nare not from unpark(). That way we can guarantee that the association\nof the task to the target cpu is working correctly.\n\nAdd a new task state (TASK_PARKED) which prevents other wakeups and\nuse this state explicitly for the unpark wakeup.\n\nPeter noticed: Also, since the task state is visible to userspace and\nall the parked tasks are still in the PID space, its a good hint in ps\nand friends that these tasks aren't really there for the moment.\n\nThe migration thread has another related issue.\n\nCPU0\t      \t     \t CPU1\nBring up CPU2\ncreate_thread(T)\npark(T)\n wait_for_completion()\n\t\t\t parkme()\n\t\t\t complete()\nsched_set_stop_task()\n\t\t\t schedule(TASK_PARKED)\n\nThe sched_set_stop_task() call is issued while the task is on the\nrunqueue of CPU1 and that confuses the hell out of the stop_task class\non that cpu. So we need the same synchronizaion before\nsched_set_stop_task().\n\nReported-by: Dave Jones <davej@redhat.com>\nReported-and-tested-by: Dave Hansen <dave@sr71.net>\nReported-and-tested-by: Borislav Petkov <bp@alien8.de>\nAcked-by: Peter Ziljstra <peterz@infradead.org>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: dhillf@gmail.com\nCc: Ingo Molnar <mingo@kernel.org>\nCc: stable@vger.kernel.org\nLink: http://lkml.kernel.org/r/alpine.LFD.2.02.1304091635430.21884@ionos\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/8c6014c043d8cba2d5820133b7eb4db3da13c52e"},{"sha":"e9e29b95a84de845191302933e632e3b754ec893","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"stop_machine: Store task reference in a separate per cpu variable\n\nTo allow the stopper thread being managed by the smpboot thread\ninfrastructure separate out the task storage from the stopper data\nstructure.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Arjan van de Veen <arjan@infradead.org>\nCc: Paul Turner <pjt@google.com>\nCc: Richard Weinberger <rw@linutronix.de>\nCc: Magnus Damm <magnus.damm@gmail.com>\nLink: http://lkml.kernel.org/r/20130131120741.626690384@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/e9e29b95a84de845191302933e632e3b754ec893"},{"sha":"6cb190fc918f3aefbf4b30385b6ec65fbbe27d36","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"stop_machine: Use smpboot threads\n\nUse the smpboot thread infrastructure. Mark the stopper thread\nselfparking and park it after it has finished the take_cpu_down()\nwork.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Arjan van de Veen <arjan@infradead.org>\nCc: Paul Turner <pjt@google.com>\nCc: Richard Weinberger <rw@linutronix.de>\nCc: Magnus Damm <magnus.damm@gmail.com>\nLink: http://lkml.kernel.org/r/20130131120741.686315164@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/6cb190fc918f3aefbf4b30385b6ec65fbbe27d36"},{"sha":"6e9fe939b8dc7a1adee0d183d22af4b7c793e8b2","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"stop_machine: Mark per cpu stopper enabled early\n\ncommit 14e568e78 (stop_machine: Use smpboot threads) introduced the\nfollowing regression:\n\nBefore this commit the stopper enabled bit was set in the online\nnotifier.\n\nCPU0\t\t\t\tCPU1\ncpu_up\n\t\t\t\tcpu online\nhotplug_notifier(ONLINE)\n  stopper(CPU1)->enabled = true;\n...\nstop_machine()\n\nThe conversion to smpboot threads moved the enablement to the wakeup\npath of the parked thread. The majority of users seem to have the\nfollowing working order:\n\nCPU0\t\t\t\tCPU1\ncpu_up\n\t\t\t\tcpu online\nunpark_threads()\n  wakeup(stopper[CPU1])\n....\n\t\t\t\tstopper thread runs\n\t\t\t\t  stopper(CPU1)->enabled = true;\nstop_machine()\n\nBut Konrad and Sander have observed:\n\nCPU0\t\t\t\tCPU1\ncpu_up\n\t\t\t\tcpu online\nunpark_threads()\n  wakeup(stopper[CPU1])\n....\nstop_machine()\n\t\t\t\tstopper thread runs\n\t\t\t\t  stopper(CPU1)->enabled = true;\n\nNow the stop machinery kicks CPU0 into the stop loop, where it gets\nstuck forever because the queue code saw stopper(CPU1)->enabled ==\nfalse, so CPU0 waits for CPU1 to enter stomp_machine, but the CPU1\nstopper work got discarded due to enabled == false.\n\nAdd a pre_unpark function to the smpboot thread descriptor and call it\nbefore waking the thread.\n\nThis fixes the problem at hand, but the stop_machine code should be\nmore robust. The stopper->enabled flag smells fishy at best.\n\nThanks to Konrad for going through a loop of debug patches and\nproviding the information to decode this issue.\n\nReported-and-tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>\nReported-and-tested-by: Sander Eikelenboom <linux@eikelenboom.it>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nLink: http://lkml.kernel.org/r/alpine.LFD.2.02.1302261843240.22263@ionos\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/6e9fe939b8dc7a1adee0d183d22af4b7c793e8b2"},{"sha":"4d43d075450c5ed3b868dc019891cbb4d202434d","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"arm: Use generic idle thread allocation\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Russell King <linux@arm.linux.org.uk>\nTested-by: Frank Rowand <frank.rowand@am.sony.com>\nLink: http://lkml.kernel.org/r/20120420124557.448826362@linutronix.de","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/4d43d075450c5ed3b868dc019891cbb4d202434d"},{"sha":"f0898d671b09918658e017151f905fb02ede2f00","author":{"email":"00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de","name":"Thomas Gleixner"},"message":"rcu: Yield simpler\n\nThe rcu_yield() code is amazing. It's there to avoid starvation of the\nsystem when lots of (boosting) work is to be done.\n\nNow looking at the code it's functionality is:\n\n Make the thread SCHED_OTHER and very nice, i.e. get it out of the way\n Arm a timer with 2 ticks\n schedule()\n\nNow if the system goes idle the rcu task returns, regains SCHED_FIFO\nand plugs on. If the systems stays busy the timer fires and wakes a\nper node kthread which in turn makes the per cpu thread SCHED_FIFO and\nbrings it back on the cpu. For the boosting thread the \"make it FIFO\"\nbit is missing and it just runs some magic boost checks. Now this is a\nlot of code with extra threads and complexity.\n\nIt's way simpler to let the tasks when they detect overload schedule\naway for 2 ticks and defer the normal wakeup as long as they are in\nyielded state and the cpu is not idle.\n\nThat solves the same problem and the only difference is that when the\ncpu goes idle it's not guaranteed that the thread returns right away,\nbut it won't be longer out than two ticks, so no harm is done. If\nthat's an issue than it is way simpler just to wake the task from\nidle as RCU has callbacks there anyway.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Namhyung Kim <namhyung@kernel.org>\nReviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/20120716103948.131256723@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/f0898d671b09918658e017151f905fb02ede2f00"},{"sha":"ec091dacaa1b327951b172c5ab4b8a5f43eda65e","author":{"email":"1e0ce936bb9b355d257bf5790d2513c3f28be22b@linux.vnet.ibm.com","name":"Paul E. McKenney"},"message":"rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread\n\nBring RCU into the new-age CPU-hotplug fold by modifying RCU's per-CPU\nkthread code to use the new smp_hotplug_thread facility.\n\n[ tglx: Adapted it to use callbacks and to the simplified rcu yield ]\n\nSigned-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/20120716103948.673354828@linutronix.de\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/ec091dacaa1b327951b172c5ab4b8a5f43eda65e"},{"sha":"819effa8fc57d2ec76f9f5fb12f2d09d157660ff","author":{"email":"312c7d941f03386814be517ffdb3e0eb6624e275@google.com","name":"Eric Dumazet"},"message":"softirq: reduce latencies\n\nIn various network workloads, __do_softirq() latencies can be up\nto 20 ms if HZ=1000, and 200 ms if HZ=100.\n\nThis is because we iterate 10 times in the softirq dispatcher,\nand some actions can consume a lot of cycles.\n\nThis patch changes the fallback to ksoftirqd condition to :\n\n- A time limit of 2 ms.\n- need_resched() being set on current task\n\nWhen one of this condition is met, we wakeup ksoftirqd for further\nsoftirq processing if we still have pending softirqs.\n\nUsing need_resched() as the only condition can trigger RCU stalls,\nas we can keep BH disabled for too long.\n\nI ran several benchmarks and got no significant difference in\nthroughput, but a very significant reduction of latencies (one order\nof magnitude) :\n\nIn following bench, 200 antagonist \"netperf -t TCP_RR\" are started in\nbackground, using all available cpus.\n\nThen we start one \"netperf -t TCP_RR\", bound to the cpu handling the NIC\nIRQ (hard+soft)\n\nBefore patch :\n\n# netperf -H 7.7.7.84 -t TCP_RR -T2,2 -- -k\nRT_LATENCY,MIN_LATENCY,MAX_LATENCY,P50_LATENCY,P90_LATENCY,P99_LATENCY,MEAN_LATENCY,STDDEV_LATENCY\nMIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET\nto 7.7.7.84 () port 0 AF_INET : first burst 0 : cpu bind\nRT_LATENCY=550110.424\nMIN_LATENCY=146858\nMAX_LATENCY=997109\nP50_LATENCY=305000\nP90_LATENCY=550000\nP99_LATENCY=710000\nMEAN_LATENCY=376989.12\nSTDDEV_LATENCY=184046.92\n\nAfter patch :\n\n# netperf -H 7.7.7.84 -t TCP_RR -T2,2 -- -k\nRT_LATENCY,MIN_LATENCY,MAX_LATENCY,P50_LATENCY,P90_LATENCY,P99_LATENCY,MEAN_LATENCY,STDDEV_LATENCY\nMIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET\nto 7.7.7.84 () port 0 AF_INET : first burst 0 : cpu bind\nRT_LATENCY=40545.492\nMIN_LATENCY=9834\nMAX_LATENCY=78366\nP50_LATENCY=33583\nP90_LATENCY=59000\nP99_LATENCY=69000\nMEAN_LATENCY=38364.67\nSTDDEV_LATENCY=12865.26\n\nSigned-off-by: Eric Dumazet <edumazet@google.com>\nCc: David Miller <davem@davemloft.net>\nCc: Tom Herbert <therbert@google.com>\nCc: Ben Hutchings <bhutchings@solarflare.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>","distinct":true,"url":"https://api.github.com/repos/zwliew/flo/commits/819effa8fc57d2ec76f9f5fb12f2d09d157660ff"}]}