{"push_id":1083297343,"size":1,"distinct_size":1,"ref":"refs/heads/mm-mr1","head":"02de5ea79791aed21b54aab07188c001ee83fc6c","before":"d0fbd3eab60624f146f853ce1cc7e85128c51ab8","commits":[{"sha":"02de5ea79791aed21b54aab07188c001ee83fc6c","author":{"email":"c2ec5539c4473ab294a95eac689618c01a8f4c1f@codeaurora.org","name":"Joonwoo Park"},"message":"timer: make deferrable cpu unbound timers really not bound to a cpu\n\nWhen a deferrable work (INIT_DEFERRABLE_WORK, etc.) is queued via\nqueue_delayed_work() it's probably intended to run the work item on any\nCPU that isn't idle. However, we queue the work to run at a later time\nby starting a deferrable timer that binds to whatever CPU the work is\nqueued on which is same with queue_delayed_work_on(smp_processor_id())\neffectively.\n\nAs a result WORK_CPU_UNBOUND work items aren't really cpu unbound now.\nIn fact this is perfectly fine with UP kernel and also won't affect much a\nsystem without dyntick with SMP kernel too as every cpus run timers\nperiodically.  But on SMP systems with dyntick current implementation leads\ndeferrable timers not very scalable because the timer's base which has\nqueued the deferrable timer won't wake up till next non-deferrable timer\nexpires even though there are possible other non idle cpus are running\nwhich are able to run expired deferrable timers.\n\nThe deferrable work is a good example of the current implementation's\nvictim like below.\n\nINIT_DEFERRABLE_WORK(&dwork, fn);\nCPU 0                                 CPU 1\nqueue_delayed_work(wq, &dwork, HZ);\n    queue_delayed_work_on(WORK_CPU_UNBOUND);\n        ...\n\t__mod_timer() -> queues timer to the\n\t\t\t current cpu's timer\n\t\t\t base.\n\t...\ntick_nohz_idle_enter() -> cpu enters idle.\nA second later\ncpu 0 is now in idle.                 cpu 1 exits idle or wasn't in idle so\n                                      now it's in active but won't\ncpu 0 won't wake up till next         handle cpu unbound deferrable timer\nnon-deferrable timer expires.         as it's in cpu 0's timer base.\n\nTo make all cpu unbound deferrable timers are scalable, introduce a common\ntimer base which is only for cpu unbound deferrable timers to make those\nare indeed cpu unbound, so they can be scheduled by any non-idle cpu.\nThis common timer fixes the scalability issue of delayed work and all other\ncpu unbound deferrable timer using implementations.\n\nSigned-off-by: Joonwoo Park <joonwoop@codeaurora.org>\nSigned-off-by: Pranav Vashi <neobuddy89@gmail.com>","distinct":true,"url":"https://api.github.com/repos/Chairshot215/starship_kernel_moto_shamu/commits/02de5ea79791aed21b54aab07188c001ee83fc6c"}]}