)]}'
{
  "commit": "b8f8c3cf0a4ac0632ec3f0e15e9dc0c29de917af",
  "tree": "183825db00f4e9252603a51a1be6f8874a963dbc",
  "parents": [
    "857f3fd7a496ddf4329345af65a4a2b16dd25fe8"
  ],
  "author": {
    "name": "Thomas Gleixner",
    "email": "tglx@linutronix.de",
    "time": "Fri Jul 18 17:27:28 2008 +0200"
  },
  "committer": {
    "name": "Thomas Gleixner",
    "email": "tglx@linutronix.de",
    "time": "Fri Jul 18 18:10:28 2008 +0200"
  },
  "message": "nohz: prevent tick stop outside of the idle loop\n\nJack Ren and Eric Miao tracked down the following long standing\nproblem in the NOHZ code:\n\n\tscheduler switch to idle task\n\tenable interrupts\n\nWindow starts here\n\n\t----\u003e interrupt happens (does not set NEED_RESCHED)\n\t      \tirq_exit() stops the tick\n\n\t----\u003e interrupt happens (does set NEED_RESCHED)\n\n\treturn from schedule()\n\t\n\tcpu_idle(): preempt_disable();\n\nWindow ends here\n\nThe interrupts can happen at any point inside the race window. The\nfirst interrupt stops the tick, the second one causes the scheduler to\nrerun and switch away from idle again and we end up with the tick\ndisabled.\n\nThe fact that it needs two interrupts where the first one does not set\nNEED_RESCHED and the second one does made the bug obscure and extremly\nhard to reproduce and analyse. Kudos to Jack and Eric.\n\nSolution: Limit the NOHZ functionality to the idle loop to make sure\nthat we can not run into such a situation ever again.\n\ncpu_idle()\n{\n\tpreempt_disable();\n\n\twhile(1) {\n\t\t tick_nohz_stop_sched_tick(1); \u003c- tell NOHZ code that we\n\t\t \t\t\t          are in the idle loop\n\n\t\t while (!need_resched())\n\t\t       halt();\n\n\t\t tick_nohz_restart_sched_tick(); \u003c- disables NOHZ mode\n\t\t preempt_enable_no_resched();\n\t\t schedule();\n\t\t preempt_disable();\n\t}\n}\n\nIn hindsight we should have done this forever, but ... \n\n/me grabs a large brown paperbag.\n\nDebugged-by: Jack Ren \u003cjack.ren@marvell.com\u003e, \nDebugged-by: eric miao \u003ceric.y.miao@gmail.com\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "46bf2ede612840b84eb3f7994c4cc85ae0d4c076",
      "old_mode": 33188,
      "old_path": "arch/arm/kernel/process.c",
      "new_id": "84f5a4c778fb13815303de4a8057a2ce5c779e0f",
      "new_mode": 33188,
      "new_path": "arch/arm/kernel/process.c"
    },
    {
      "type": "modify",
      "old_id": "6cf9df1762743a29813db51b5d82d5ba8f6acedf",
      "old_mode": 33188,
      "old_path": "arch/avr32/kernel/process.c",
      "new_id": "ff820a9e743a01c3d5fdd7bd61649fec474bdad3",
      "new_mode": 33188,
      "new_path": "arch/avr32/kernel/process.c"
    },
    {
      "type": "modify",
      "old_id": "53c2cd255441ff5a23a55ce9cc8e5702ef1ec966",
      "old_mode": 33188,
      "old_path": "arch/blackfin/kernel/process.c",
      "new_id": "77800dd83e578d49844edaceaec7fc4f3bcfe728",
      "new_mode": 33188,
      "new_path": "arch/blackfin/kernel/process.c"
    },
    {
      "type": "modify",
      "old_id": "2c09a442e5e5939160843570e60e829a5995fe32",
      "old_mode": 33188,
      "old_path": "arch/mips/kernel/process.c",
      "new_id": "bdead3aad2537902cb35e75675ffe66fd08d7236",
      "new_mode": 33188,
      "new_path": "arch/mips/kernel/process.c"
    },
    {
      "type": "modify",
      "old_id": "c3cf0e8f3ac173332a01148946ace8c43f45a5a5",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/idle.c",
      "new_id": "d308a9f70f1b81b970ef0f13df10454f0deee3d9",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/idle.c"
    },
    {
      "type": "modify",
      "old_id": "b72120751bbed16460b9f3c87c3e849b59228c2c",
      "old_mode": 33188,
      "old_path": "arch/powerpc/platforms/iseries/setup.c",
      "new_id": "70b688c1aefb9f7512c74d0d20d1583454328c70",
      "new_mode": 33188,
      "new_path": "arch/powerpc/platforms/iseries/setup.c"
    },
    {
      "type": "modify",
      "old_id": "b98e37a1f54c05229c18eb4d865ff0e6e0e26437",
      "old_mode": 33188,
      "old_path": "arch/sh/kernel/process_32.c",
      "new_id": "921892c351dac9884482516331b20dd1a5a068bf",
      "new_mode": 33188,
      "new_path": "arch/sh/kernel/process_32.c"
    },
    {
      "type": "modify",
      "old_id": "2084f81a76e1d49319af047470f9348977d9968e",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/process.c",
      "new_id": "0798928ba3612cdeca93cfe35c29de4b99b9ca3b",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/process.c"
    },
    {
      "type": "modify",
      "old_id": "83603cfbde819ce736a034d414361ea71c24cca7",
      "old_mode": 33188,
      "old_path": "arch/um/kernel/process.c",
      "new_id": "a1c6d07cac3e46b2f3460e04729cf6a2ca203571",
      "new_mode": 33188,
      "new_path": "arch/um/kernel/process.c"
    },
    {
      "type": "modify",
      "old_id": "f8476dfbb60d9818f5da08d3a5b95a223930964f",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/process_32.c",
      "new_id": "1f5fa1cf16ddff5a1957e649847ef7e010187fb0",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/process_32.c"
    },
    {
      "type": "modify",
      "old_id": "e2319f39988b042f364a73174a0d2ac254a5b60d",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/process_64.c",
      "new_id": "c0a5c2a687e659fa20e23f47dcd171ed76b6a2f4",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/process_64.c"
    },
    {
      "type": "modify",
      "old_id": "a881c652f7e925cb8e3d2f296c492800c3f163eb",
      "old_mode": 33188,
      "old_path": "include/linux/tick.h",
      "new_id": "d3c02695dc5d7e0826a7fa6ac4eb27bfbd937374",
      "new_mode": 33188,
      "new_path": "include/linux/tick.h"
    },
    {
      "type": "modify",
      "old_id": "36e0617400470f398700376c7fa3359d768e7e58",
      "old_mode": 33188,
      "old_path": "kernel/softirq.c",
      "new_id": "05f248039d77184527c4912ce8ab527a5689e164",
      "new_mode": 33188,
      "new_path": "kernel/softirq.c"
    },
    {
      "type": "modify",
      "old_id": "86baa4f0dfe4ba157403a614393cc5fbcc4d983f",
      "old_mode": 33188,
      "old_path": "kernel/time/tick-sched.c",
      "new_id": "ee962d11107b67c46ce097a96c576823b8190a62",
      "new_mode": 33188,
      "new_path": "kernel/time/tick-sched.c"
    }
  ]
}
