{"push_id":1393634900,"size":63,"distinct_size":63,"ref":"refs/heads/test","head":"38a0fae6a59aa4be43bfcabef907db14eed8208e","before":"e04bca9d5ec8f247b6e7e6082bcef5b01c777640","commits":[{"sha":"fd2284718e090d0208620bb232029bcc79b11c87","author":{"name":"tomascus","email":"b0cff599882a46363bdb899e3ff57539d8ae85f1@gmail.com"},"message":"ARM: dts: msm8974: Schedule mmcqd on idle CPU","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/fd2284718e090d0208620bb232029bcc79b11c87"},{"sha":"c3fe06714694aa1a2c76eee754b5b67f5f5c2f1f","author":{"name":"myfluxi","email":"95ab61bb01957fc548ef82d227666a28af3268a6@arcor.de"},"message":"arm: irq: Tone down kernel logging\n\nChange-Id: Ie31190bd65d1379de41e1ca2573aa65e785de1b6","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/c3fe06714694aa1a2c76eee754b5b67f5f5c2f1f"},{"sha":"6e0707292a791b03be323951566ed01b3401b3b0","author":{"name":"Dave Chinner","email":"6091b9ca93c3bf202a7dfb4ab952b5e043623b84@redhat.com"},"message":"sync: don't block the flusher thread waiting on IO\n\nWhen sync does it's WB_SYNC_ALL writeback, it issues data Io and\nthen immediately waits for IO completion. This is done in the\ncontext of the flusher thread, and hence completely ties up the\nflusher thread for the backing device until all the dirty inodes\nhave been synced. On filesystems that are dirtying inodes constantly\nand quickly, this means the flusher thread can be tied up for\nminutes per sync call and hence badly affect system level write IO\nperformance as the page cache cannot be cleaned quickly.\n\nWe already have a wait loop for IO completion for sync(2), so cut\nthis out of the flusher thread and delegate it to wait_sb_inodes().\nHence we can do rapid IO submission, and then wait for it all to\ncomplete.\n\nEffect of sync on fsmark before the patch:\n\nFSUse%        Count         Size    Files/sec     App Overhead\n.....\n     0       640000         4096      35154.6          1026984\n     0       720000         4096      36740.3          1023844\n     0       800000         4096      36184.6           916599\n     0       880000         4096       1282.7          1054367\n     0       960000         4096       3951.3           918773\n     0      1040000         4096      40646.2           996448\n     0      1120000         4096      43610.1           895647\n     0      1200000         4096      40333.1           921048\n\nAnd a single sync pass took:\n\n  real    0m52.407s\n  user    0m0.000s\n  sys     0m0.090s\n\nAfter the patch, there is no impact on fsmark results, and each\nindividual sync(2) operation run concurrently with the same fsmark\nworkload takes roughly 7s:\n\n  real    0m6.930s\n  user    0m0.000s\n  sys     0m0.039s\n\nIOWs, sync is 7-8x faster on a busy filesystem and does not have an\nadverse impact on ongoing async data write operations.\n\nChange-Id: I7cea5f920883fa106d6242ad2d7bba3ea820b6c9\nSigned-off-by: Dave Chinner <dchinner@redhat.com>\nReviewed-by: Jan Kara <jack@suse.cz>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/6e0707292a791b03be323951566ed01b3401b3b0"},{"sha":"37bed0acdb3be7aa6b982e8b081e7c33211414d0","author":{"name":"Jan Kara","email":"7bb7087018cc5fef3c041f6f038f586664845dbf@suse.cz"},"message":"writeback: fix occasional slow sync(1)\n\nIn case when system contains no dirty pages, wakeup_flusher_threads() will\nsubmit WB_SYNC_NONE writeback for 0 pages so wb_writeback() exits\nimmediately without doing anything, even though there are dirty inodes in\nthe system.  Thus sync(1) will write all the dirty inodes from a\nWB_SYNC_ALL writeback pass which is slow.\n\nFix the problem by using get_nr_dirty_pages() in wakeup_flusher_threads()\ninstead of calculating number of dirty pages manually.  That function also\ntakes number of dirty inodes into account.\n\nChange-Id: Ib12fed197dd6bd331332870a7ea603efb88ee61f\nSigned-off-by: Jan Kara <jack@suse.cz>\nReported-by: Paul Taysom <taysom@chromium.org>\nCc: Wu Fengguang <fengguang.wu@intel.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/37bed0acdb3be7aa6b982e8b081e7c33211414d0"},{"sha":"56640416102d3644568f9456483fe1562ce560d8","author":{"name":"Junxiao Bi","email":"0fbee7a611321671a74f8b0002ae086f6befb26d@oracle.com"},"message":"writeback: fix race that cause writeback hung\n\nThere is a race between mark inode dirty and writeback thread, see the\nfollowing scenario.  In this case, writeback thread will not run though\nthere is dirty_io.\n\n__mark_inode_dirty()                                          bdi_writeback_workfn()\n\t...                                                       \t...\n\tspin_lock(&inode->i_lock);\n\t...\n\tif (bdi_cap_writeback_dirty(bdi)) {\n\t    <<< assume wb has dirty_io, so wakeup_bdi is false.\n\t    <<< the following inode_dirty also have wakeup_bdi false.\n\t    if (!wb_has_dirty_io(&bdi->wb))\n\t\t    wakeup_bdi = true;\n\t}\n\tspin_unlock(&inode->i_lock);\n\t                                                            <<< assume last dirty_io is removed here.\n\t                                                            pages_written = wb_do_writeback(wb);\n\t                                                            ...\n\t                                                            <<< work_list empty and wb has no dirty_io,\n\t                                                            <<< delayed_work will not be queued.\n\t                                                            if (!list_empty(&bdi->work_list) ||\n\t                                                                (wb_has_dirty_io(wb) && dirty_writeback_interval))\n\t                                                                queue_delayed_work(bdi_wq, &wb->dwork,\n\t                                                                    msecs_to_jiffies(dirty_writeback_interval * 10));\n\tspin_lock(&bdi->wb.list_lock);\n\tinode->dirtied_when = jiffies;\n\t<<< new dirty_io is added.\n\tlist_move(&inode->i_wb_list, &bdi->wb.b_dirty);\n\tspin_unlock(&bdi->wb.list_lock);\n\n\t<<< though there is dirty_io, but wakeup_bdi is false,\n\t<<< so writeback thread will not be waked up and\n\t<<< the new dirty_io will not be flushed.\n\tif (wakeup_bdi)\n\t    bdi_wakeup_thread_delayed(bdi);\n\nWriteback will run until there is a new flush work queued.  This may cause\na lot of dirty pages stay in memory for a long time.\n\nChange-Id: I626328574bd06b2fdd2401834cfa7844a628504b\nSigned-off-by: Junxiao Bi <junxiao.bi@oracle.com>\nReviewed-by: Jan Kara <jack@suse.cz>\nCc: Fengguang Wu <fengguang.wu@intel.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/56640416102d3644568f9456483fe1562ce560d8"},{"sha":"1b591eb0facde4defcf5da1dbe05ac485c6d8d14","author":{"name":"Vinayak Menon","email":"c6e79b2757471d38dfbeaf17f987a81f42208aac@codeaurora.org"},"message":"lowmemorykiller: use for_each_thread instead of buggy while_each_thread\n\nCouple of cases were reported few months ago, where the cpu was blocked\non the following call stack for /seconds/ after which the watchdog fires.\n\ntest_task_flag(p = 0xE14ABF00, ?)\nlowmem_shrink(?, sc = 0xD7A03C04)\nshrink_slab(shrink = 0xD7A03C04, nr_pages_scanned = 0, lru_pages = 120)\ntry_to_free_pages(zonelist = 0xC1116440, ?, ?, ?)\n__alloc_pages_nodemask(?, order = 0, ?, nodemask = 0x0)\n__do_page_cache_readahead(mapping = 0xEB819364, filp = 0xCC16DC00, offset =\nra_submit(?, ?, ?)\nfilemap_fault(vma = 0xC105D240, vmf = 0xD7A03DC8)\n\nThere weren't any dumps to analyse the case, but this can be a possible\nreason. while_each_thread is known to be buggy and can result in the\nfunction looping forever if the task exits, even when protected with\nrcu_read_lock. Use for_each_thread instead.\n\nMore details on the problems with while_each_thread can be found\nat https://lkml.org/lkml/2013/12/2/320\n\nChange-Id: I5eb6e4b463f81142a2a7824db389201357432ec7\nSigned-off-by: Vinayak Menon <vinmenon@codeaurora.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/1b591eb0facde4defcf5da1dbe05ac485c6d8d14"},{"sha":"ba6c6de61b5255d9ed4a0757acf570aaa3d28772","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Track the runnable average on a per-task entity basis\n\nInstead of tracking averaging the load parented by a cfs_rq, we can track\nentity load directly. With the load for a given cfs_rq then being the sum\nof its children.\n\nTo do this we represent the historical contribution to runnable average\nwithin each trailing 1024us of execution as the coefficients of a\ngeometric series.\n\nWe can express this for a given task t as:\n\n  runnable_sum(t) = \\Sum u_i * y^i, runnable_avg_period(t) = \\Sum 1024 * y^i\n  load(t) = weight_t * runnable_sum(t) / runnable_avg_period(t)\n\nWhere: u_i is the usage in the last i`th 1024us period (approximately 1ms)\n~ms and y is chosen such that y^k = 1/2.  We currently choose k to be 32 which\nroughly translates to about a sched period.\n\nChange-Id: Iafc090fe18ed1835cc501949e8ba1e4ed78c5de1\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.372695337@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/ba6c6de61b5255d9ed4a0757acf570aaa3d28772"},{"sha":"aa4afcd29fb4a52373cfc5f601281949f75729c3","author":{"name":"Ben Segall","email":"99eb0c7a4f3a18874efff9726ade52c2b7beb2eb@google.com"},"message":"sched: Maintain per-rq runnable averages\n\nSince runqueues do not have a corresponding sched_entity we instead embed a\nsched_avg structure directly.\n\nChange-Id: Ib2a80c77f6b4e017eaa72b31004630c7d95e4b94\nSigned-off-by: Ben Segall <bsegall@google.com>\nReviewed-by: Paul Turner <pjt@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.442637130@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/aa4afcd29fb4a52373cfc5f601281949f75729c3"},{"sha":"7aa553619d9af5afc958b25d4c12176d816cf908","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Aggregate load contributed by task entities on parenting cfs_rq\n\nFor a given task t, we can compute its contribution to load as:\n\n  task_load(t) = runnable_avg(t) * weight(t)\n\nOn a parenting cfs_rq we can then aggregate:\n\n  runnable_load(cfs_rq) = \\Sum task_load(t), for all runnable children t\n\nMaintain this bottom up, with task entities adding their contributed load to\nthe parenting cfs_rq sum.  When a task entity's load changes we add the same\ndelta to the maintained sum.\n\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.514678907@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/7aa553619d9af5afc958b25d4c12176d816cf908"},{"sha":"a220e5e256bad676588e84c42d215055c6377420","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Maintain the load contribution of blocked entities\n\nWe are currently maintaining:\n\n  runnable_load(cfs_rq) = \\Sum task_load(t)\n\nFor all running children t of cfs_rq.  While this can be naturally updated for\ntasks in a runnable state (as they are scheduled); this does not account for\nthe load contributed by blocked task entities.\n\nThis can be solved by introducing a separate accounting for blocked load:\n\n  blocked_load(cfs_rq) = \\Sum runnable(b) * weight(b)\n\nObviously we do not want to iterate over all blocked entities to account for\ntheir decay, we instead observe that:\n\n  runnable_load(t) = \\Sum p_i*y^i\n\nand that to account for an additional idle period we only need to compute:\n\n  y*runnable_load(t).\n\nThis means that we can compute all blocked entities at once by evaluating:\n\n  blocked_load(cfs_rq)` = y * blocked_load(cfs_rq)\n\nFinally we maintain a decay counter so that when a sleeping entity re-awakens\nwe can determine how much of its load should be removed from the blocked sum.\n\nChange-Id: Ib0b29b3d1ca872a13d7236ed142156ef0a35dc9a\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.585389902@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/a220e5e256bad676588e84c42d215055c6377420"},{"sha":"8ac4670b0cfb7cd3af402c21e540eb257b1570e6","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Add an rq migration call-back to sched_class\n\nSince we are now doing bottom up load accumulation we need explicit\nnotification when a task has been re-parented so that the old hierarchy can be\nupdated.\n\nAdds: migrate_task_rq(struct task_struct *p, int next_cpu)\n\n(The alternative is to do this out of __set_task_cpu, but it was suggested that\nthis would be a cleaner encapsulation.)\n\nChange-Id: Icc4111cd4159f804186dd7c05f0c36f4e368288e\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.660023400@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/8ac4670b0cfb7cd3af402c21e540eb257b1570e6"},{"sha":"b054dde8f1dc8dfea38a901606bb0d5264ba26f3","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Account for blocked load waking back up\n\nWhen a running entity blocks we migrate its tracked load to\ncfs_rq->blocked_runnable_avg.  In the sleep case this occurs while holding\nrq->lock and so is a natural transition.  Wake-ups however, are potentially\nasynchronous in the presence of migration and so special care must be taken.\n\nWe use an atomic counter to track such migrated load, taking care to match this\nwith the previously introduced decay counters so that we don't migrate too much\nload.\n\nChange-Id: Ied949a2a42f68e4d4d16275351fd1240939dd519\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.726077467@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/b054dde8f1dc8dfea38a901606bb0d5264ba26f3"},{"sha":"98154362e1199aa7e7ad44d4dd7709ddabcfffa2","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Aggregate total task_group load\n\nMaintain a global running sum of the average load seen on each cfs_rq belonging\nto each task group so that it may be used in calculating an appropriate\nshares:weight distribution.\n\nChange-Id: If2726cb0037ddffce651ea17c46cbc4924cca7a2\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.792901086@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/98154362e1199aa7e7ad44d4dd7709ddabcfffa2"},{"sha":"1db32e0ea3eff295647c4ec33d913509ec4f50a1","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Compute load contribution by a group entity\n\nUnlike task entities who have a fixed weight, group entities instead own a\nfraction of their parenting task_group's shares as their contributed weight.\n\nCompute this fraction so that we can correctly account hierarchies and shared\nentity nodes.\n\nChange-Id: If61e926bb72f56c543b5b85841355f9f6997c51d\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.855074415@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/1db32e0ea3eff295647c4ec33d913509ec4f50a1"},{"sha":"99a3a3eaab0e1a87d0a42d646ebfc19f446a9ee8","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Normalize tg load contributions against runnable time\n\nEntities of equal weight should receive equitable distribution of cpu time.\nThis is challenging in the case of a task_group's shares as execution may be\noccurring on multiple cpus simultaneously.\n\nTo handle this we divide up the shares into weights proportionate with the load\non each cfs_rq.  This does not however, account for the fact that the sum of\nthe parts may be less than one cpu and so we need to normalize:\n  load(tg) = min(runnable_avg(tg), 1) * tg->shares\nWhere runnable_avg is the aggregate time in which the task_group had runnable\nchildren.\n\nChange-Id: I6f8d2ff1e61c1559c892ed9e2da670aed92dbbeb\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>.\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.930124292@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/99a3a3eaab0e1a87d0a42d646ebfc19f446a9ee8"},{"sha":"90b6a9fee7e231ef4cec9ccff08d7497d969d01d","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Maintain runnable averages across throttled periods\n\nWith bandwidth control tracked entities may cease execution according to user\nspecified bandwidth limits.  Charging this time as either throttled or blocked\nhowever, is incorrect and would falsely skew in either direction.\n\nWhat we actually want is for any throttled periods to be \"invisible\" to\nload-tracking as they are removed from the system for that interval and\ncontribute normally otherwise.\n\nDo this by moderating the progression of time to omit any periods in which the\nentity belonged to a throttled hierarchy.\n\nChange-Id: I9d2c2d8a0cc984064c37432ecb262178ce0b3d32\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141506.998912151@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/90b6a9fee7e231ef4cec9ccff08d7497d969d01d"},{"sha":"43df8a3cb85d67c38a71e27d1c845291361ce1fa","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Replace update_shares weight distribution with per-entity computation\n\nNow that the machinery in place is in place to compute contributed load in a\nbottom up fashion; replace the shares distribution code within update_shares()\naccordingly.\n\nChange-Id: Ib53b4ee8d1c1d3e862ce5174d3b7e6ca12276400\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141507.061208672@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/43df8a3cb85d67c38a71e27d1c845291361ce1fa"},{"sha":"6a908332e9a6d5a8f0988160b636306d67341678","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Refactor update_shares_cpu() -> update_blocked_avgs()\n\nNow that running entities maintain their own load-averages the work we must do\nin update_shares() is largely restricted to the periodic decay of blocked\nentities.  This allows us to be a little less pessimistic regarding our\noccupancy on rq->lock and the associated rq->clock updates required.\n\nChange-Id: Iecd8d3c194270fd5617c0473b257d9d6904386a5\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141507.133999170@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/6a908332e9a6d5a8f0988160b636306d67341678"},{"sha":"676e0feefac82a1bd451054dc3ec16c36c01289a","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Update_cfs_shares at period edge\n\nNow that our measurement intervals are small (~1ms) we can amortize the posting\nof update_shares() to be about each period overflow.  This is a large cost\nsaving for frequently switching tasks.\n\nChange-Id: I46f9413adf39bd2033f5b84d5134b045d0bf1d4a\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141507.200772172@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/676e0feefac82a1bd451054dc3ec16c36c01289a"},{"sha":"fbda269a8b1b89cc006d992e42395861249aece7","author":{"name":"Paul Turner","email":"65956f0277a169e2acdfe8eb55aaa1663653d482@google.com"},"message":"sched: Make __update_entity_runnable_avg() fast\n\n__update_entity_runnable_avg forms the core of maintaining an entity's runnable\nload average.  In this function we charge the accumulated run-time since last\nupdate and handle appropriate decay.  In some cases, e.g. a waking task, this\ntime interval may be much larger than our period unit.\n\nFortunately we can exploit some properties of our series to perform decay for a\nblocked update in constant time and account the contribution for a running\nupdate in essentially-constant* time.\n\n[*]: For any running entity they should be performing updates at the tick which\ngives us a soft limit of 1 jiffy between updates, and we can compute up to a\n32 jiffy update in a single pass.\n\nC program to generate the magic constants in the arrays:\n\n  #include <math.h>\n  #include <stdio.h>\n\n  #define N 32\n  #define WMULT_SHIFT 32\n\n  const long WMULT_CONST = ((1UL << N) - 1);\n  double y;\n\n  long runnable_avg_yN_inv[N];\n  void calc_mult_inv() {\n  \tint i;\n  \tdouble yn = 0;\n\n  \tprintf(\"inverses\\n\");\n  \tfor (i = 0; i < N; i++) {\n  \t\tyn = (double)WMULT_CONST * pow(y, i);\n  \t\trunnable_avg_yN_inv[i] = yn;\n  \t\tprintf(\"%2d: 0x%8lx\\n\", i, runnable_avg_yN_inv[i]);\n  \t}\n  \tprintf(\"\\n\");\n  }\n\n  long mult_inv(long c, int n) {\n  \treturn (c * runnable_avg_yN_inv[n]) >>  WMULT_SHIFT;\n  }\n\n  void calc_yn_sum(int n)\n  {\n  \tint i;\n  \tdouble sum = 0, sum_fl = 0, diff = 0;\n\n  \t/*\n  \t * We take the floored sum to ensure the sum of partial sums is never\n  \t * larger than the actual sum.\n  \t */\n  \tprintf(\"sum y^n\\n\");\n  \tprintf(\"   %8s  %8s %8s\\n\", \"exact\", \"floor\", \"error\");\n  \tfor (i = 1; i <= n; i++) {\n  \t\tsum = (y * sum + y * 1024);\n  \t\tsum_fl = floor(y * sum_fl+ y * 1024);\n  \t\tprintf(\"%2d: %8.0f  %8.0f %8.0f\\n\", i, sum, sum_fl,\n  \t\t\tsum_fl - sum);\n  \t}\n  \tprintf(\"\\n\");\n  }\n\n  void calc_conv(long n) {\n  \tlong old_n;\n  \tint i = -1;\n\n  \tprintf(\"convergence (LOAD_AVG_MAX, LOAD_AVG_MAX_N)\\n\");\n  \tdo {\n  \t\told_n = n;\n  \t\tn = mult_inv(n, 1) + 1024;\n  \t\ti++;\n  \t} while (n != old_n);\n  \tprintf(\"%d> %ld\\n\", i - 1, n);\n  \tprintf(\"\\n\");\n  }\n\n  void main() {\n  \ty = pow(0.5, 1/(double)N);\n  \tcalc_mult_inv();\n  \tcalc_conv(1024);\n  \tcalc_yn_sum(N);\n  }\n\n[ Compile with -lm ]\nSigned-off-by: Paul Turner <pjt@google.com>\nReviewed-by: Ben Segall <bsegall@google.com>\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nLink: http://lkml.kernel.org/r/20120823141507.277808946@google.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>\n\nChange-Id: Ifc6dd06f234483d376bd752e536a49d3d4ca2115","distinct":true,"url":"https://api.github.com/repos/tunturn/android_kernel_aries_concept/commits/fbda269a8b1b89cc006d992e42395861249aece7"}]}
{"actor":{"display_login":"tunturn"}}