)]}'
{
  "log": [
    {
      "commit": "8558f8f81680a43d383abd1b5f23d3501fedfa65",
      "tree": "209da90800fbcd6cb8a9c568c08fee30f3a1fb17",
      "parents": [
        "d7ee56059b335e27c3c6db34f7efe5a705d65b1c"
      ],
      "author": {
        "name": "Gautham R Shenoy",
        "email": "ego@in.ibm.com",
        "time": "Fri Jun 27 10:17:38 2008 +0530"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Tue Jul 01 09:27:17 2008 +0200"
      },
      "message": "rcu: fix hotplug vs rcu race\n\nDhaval Giani reported this warning during cpu hotplug stress-tests:\n\n| On running kernel compiles in parallel with cpu hotplug:\n|\n| WARNING: at arch/x86/kernel/smp.c:118\n| native_smp_send_reschedule+0x21/0x36()\n| Modules linked in:\n| Pid: 27483, comm: cc1 Not tainted 2.6.26-rc7 #1\n| [...]\n|  [\u003cc0110355\u003e] native_smp_send_reschedule+0x21/0x36\n|  [\u003cc014fe8f\u003e] force_quiescent_state+0x47/0x57\n|  [\u003cc014fef0\u003e] call_rcu+0x51/0x6d\n|  [\u003cc01713b3\u003e] __fput+0x130/0x158\n|  [\u003cc0171231\u003e] fput+0x17/0x19\n|  [\u003cc016fd99\u003e] filp_close+0x4d/0x57\n|  [\u003cc016fdff\u003e] sys_close+0x5c/0x97\n\nIMHO the warning is a spurious one.\n\ncpu_online_map is updated by the _cpu_down() using stop_machine_run().\nSince force_quiescent_state is invoked from irqs disabled section,\nstop_machine_run() won\u0027t be executing while a cpu is executing\nforce_quiescent_state(). Hence the cpu_online_map is stable while we\u0027re\nin the irq disabled section.\n\nHowever, a cpu might have been offlined _just_ before we disabled irqs\nwhile entering force_quiescent_state(). And rcu subsystem might not yet\nhave handled the CPU_DEAD notification, leading to the offlined cpu\u0027s\nbit being set in the rcp-\u003ecpumask.\n\nHence cpumask \u003d (rcp-\u003ecpumask \u0026 cpu_online_map) to prevent sending\nsmp_reschedule() to an offlined CPU.\n\nHere\u0027s the timeline:\n\nCPU_A\t\t\t\t\t\t CPU_B\n--------------------------------------------------------------\ncpu_down():\t\t\t\t\t.\n.\t\t\t\t\t   \t.\n.\t\t\t\t\t\t.\nstop_machine(): /* disables preemption,\t\t.\n\t\t * and irqs */\t\t\t.\n.\t\t\t\t\t\t.\n.\t\t\t\t\t\t.\ntake_cpu_down();\t\t\t\t.\n.\t\t\t\t\t\t.\n.\t\t\t\t\t\t.\n.\t\t\t\t\t\t.\ncpu_disable(); /*this removes cpu \t\t.\n\t\t*from cpu_online_map \t\t.\n\t\t*/\t\t\t\t.\n.\t\t\t\t\t\t.\n.\t\t\t\t\t\t.\nrestart_machine(); /* enables irqs */\t\t.\n------WINDOW DURING WHICH rcp-\u003ecpumask is stale ---------------\n.\t\t\t\t\t\tcall_rcu();\n.\t\t\t\t\t\t/* disables irqs here */\n.\t\t\t\t\t\t.force_quiescent_state();\n.CPU_DEAD:\t\t\t\t\t.for_each_cpu(rcp-\u003ecpumask)\n.\t\t\t\t\t\t.   smp_send_reschedule();\n.\t\t\t\t\t\t.\n.\t\t\t\t\t\t.   WARN_ON() for offlined CPU!\n.\n.\n.\nrcu_cpu_notify:\n.\n-------- WINDOW ENDS ------------------------------------------\nrcu_offline_cpu() /* Which calls cpu_quiet()\n\t\t   * which removes\n\t\t   * cpu from rcp-\u003ecpumask.\n\t\t   */\n\nIf a new batch was started just before calling stop_machine_run(), the\n\"tobe-offlined\" cpu is still present in rcp-cpumask.\n\nDuring a cpu-offline, from take_cpu_down(), we queue an rt-prio idle\ntask as the next task to be picked by the scheduler. We also call\ncpu_disable() which will disable any further interrupts and remove the\ncpu\u0027s bit from the cpu_online_map.\n\nOnce the stop_machine_run() successfully calls take_cpu_down(), it calls\nschedule(). That\u0027s the last time a schedule is called on the offlined\ncpu, and hence the last time when rdp-\u003epassed_quiesc will be set to 1\nthrough rcu_qsctr_inc().\n\nBut the cpu_quiet() will be on this cpu will be called only when the\nnext RCU_SOFTIRQ occurs on this CPU. So at this time, the offlined CPU\nis still set in rcp-\u003ecpumask.\n\nNow coming back to the idle_task which truely offlines the CPU, it does\ncheck for a pending RCU and raises the softirq, since it will find\nrdp-\u003epassed_quiesc to be 0 in this case. However, since the cpu is\noffline I am not sure if the softirq will trigger on the CPU.\n\nEven if it doesn\u0027t the rcu_offline_cpu() will find that rcp-\u003ecompleted\nis not the same as rcp-\u003ecur, which means that our cpu could be holding\nup the grace period progression. Hence we call cpu_quiet() and move\nahead.\n\nBut because of the window explained in the timeline, we could still have\na call_rcu() before the RCU subsystem executes it\u0027s CPU_DEAD\nnotification, and we send smp_send_reschedule() to offlined cpu while\ntrying to force the quiescent states. The appended patch adds comments\nand prevents checking for offlined cpu everytime.\n\ncpu_online_map is updated by the _cpu_down() using stop_machine_run().\nSince force_quiescent_state is invoked from irqs disabled section,\nstop_machine_run() won\u0027t be executing while a cpu is executing\nforce_quiescent_state(). Hence the cpu_online_map is stable while we\u0027re\nin the irq disabled section.\n\nReported-by: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nSigned-off-by: Gautham R Shenoy \u003cego@in.ibm.com\u003e\nAcked-by: Dhaval Giani \u003cdhaval@linux.vnet.ibm.com\u003e\nCc: Dipankar Sarma \u003cdipankar@in.ibm.com\u003e\nCc: laijs@cn.fujitsu.com\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Rusty Russel \u003crusty@rustcorp.com.au\u003e\nCc: \"Paul E. McKenney\" \u003cpaulmck@linux.vnet.ibm.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "e260be673a15b6125068270e0216a3bfbfc12f87",
      "tree": "f50760606d395bf6faa9e865f814761a3c88d32c",
      "parents": [
        "e0ecfa7917cafe72f4a75f87e8bb5d8d51dc534f"
      ],
      "author": {
        "name": "Paul E. McKenney",
        "email": "paulmck@linux.vnet.ibm.com",
        "time": "Fri Jan 25 21:08:24 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Fri Jan 25 21:08:24 2008 +0100"
      },
      "message": "Preempt-RCU: implementation\n\nThis patch implements a new version of RCU which allows its read-side\ncritical sections to be preempted. It uses a set of counter pairs\nto keep track of the read-side critical sections and flips them\nwhen all tasks exit read-side critical section. The details\nof this implementation can be found in this paper -\n\n\thttp://www.rdrop.com/users/paulmck/RCU/OLSrtRCU.2006.08.11a.pdf\n\nand the article-\n\n\thttp://lwn.net/Articles/253651/\n\nThis patch was developed as a part of the -rt kernel development and\nmeant to provide better latencies when read-side critical sections of\nRCU don\u0027t disable preemption.  As a consequence of keeping track of RCU\nreaders, the readers have a slight overhead (optimizations in the paper).\nThis implementation co-exists with the \"classic\" RCU implementations\nand can be switched to at compiler.\n\nAlso includes RCU tracing summarized in debugfs.\n\n[ akpm@linux-foundation.org: build fixes on non-preempt architectures ]\n\nSigned-off-by: Gautham R Shenoy \u003cego@in.ibm.com\u003e\nSigned-off-by: Dipankar Sarma \u003cdipankar@in.ibm.com\u003e\nSigned-off-by: Paul E. McKenney \u003cpaulmck@us.ibm.com\u003e\nReviewed-by: Steven Rostedt \u003csrostedt@redhat.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "e0ecfa7917cafe72f4a75f87e8bb5d8d51dc534f",
      "tree": "92106dbd88530d3884bc6c4d1c088cba1ad8630e",
      "parents": [
        "01c1c660f4b8086cad7a62345fd04290f3d82c8f"
      ],
      "author": {
        "name": "Paul E. McKenney",
        "email": "paulmck@linux.vnet.ibm.com",
        "time": "Fri Jan 25 21:08:24 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Fri Jan 25 21:08:24 2008 +0100"
      },
      "message": "Preempt-RCU: fix rcu_barrier for preemptive environment.\n\nFix rcu_barrier() to work properly in preemptive kernel environment.\nAlso, the ordering of callback must be preserved while moving\ncallbacks to another CPU during CPU hotplug.\n\nSigned-off-by: Gautham R Shenoy \u003cego@in.ibm.com\u003e\nSigned-off-by: Dipankar Sarma \u003cdipankar@in.ibm.com\u003e\nSigned-off-by: Paul E. McKenney \u003cpaulmck@linux.vnet.ibm.com\u003e\nReviewed-by: Steven Rostedt \u003csrostedt@redhat.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    },
    {
      "commit": "01c1c660f4b8086cad7a62345fd04290f3d82c8f",
      "tree": "bd09ab1fc3f9e267b1ea78f1a41b121175e1585a",
      "parents": [
        "c2d727aa2ff17a1c8e5ed1e5e231bb8579b27e82"
      ],
      "author": {
        "name": "Paul E. McKenney",
        "email": "paulmck@linux.vnet.ibm.com",
        "time": "Fri Jan 25 21:08:24 2008 +0100"
      },
      "committer": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Fri Jan 25 21:08:24 2008 +0100"
      },
      "message": "Preempt-RCU: reorganize RCU code into rcuclassic.c and rcupdate.c\n\nThis patch re-organizes the RCU code to enable multiple implementations\nof RCU. Users of RCU continues to include rcupdate.h and the\nRCU interfaces remain the same. This is in preparation for\nsubsequently merging the preemptible RCU implementation.\n\nSigned-off-by: Gautham R Shenoy \u003cego@in.ibm.com\u003e\nSigned-off-by: Dipankar Sarma \u003cdipankar@in.ibm.com\u003e\nSigned-off-by: Paul E. McKenney \u003cpaulmck@linux.vnet.ibm.com\u003e\nReviewed-by: Steven Rostedt \u003csrostedt@redhat.com\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\n"
    }
  ]
}
