{"push_id":823998416,"size":35,"distinct_size":35,"ref":"refs/heads/aosp-lollipop-stable","head":"dc2e2232622d97069122ea131b17061a1c8a4199","before":"8a6aa31158735d26c6f530905eaac7dcaf6ccbee","commits":[{"sha":"2015dc0768d33944be6de43f43e04f974d5a1118","author":{"email":"c20b7eb10a8742e8800cf4ce1d02c9801be12758@gmail.com","name":"RyanG"},"message":"Update f2fs from Jaegeuk's linux-3.4 branch\n\nRecent commits:\n\nFrom cfd8e10865e66202237817e362c6ad6b475ce7c1 Mon Sep 17 00:00:00 2001\nFrom: Jaegeuk Kim <jaegeuk.kim@samsung.com>\nDate: Wed, 29 May 2013 10:15:36 +0900\nSubject: f2fs: support 3.4\n\nFrom 19b2c30d3cce928010138cae4b9e57c388aa065c Mon Sep 17 00:00:00 2001\nFrom: Chao Yu <chao2.yu@samsung.com>\nDate: Wed, 26 Aug 2015 20:34:48 +0800\nSubject: f2fs: update extent tree in batches","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/2015dc0768d33944be6de43f43e04f974d5a1118"},{"sha":"ff14f716cae2aa87f3abe047c0857132318b00e8","author":{"email":"09d47f559e0290641383a2672396688300765eb1@gmx.net","name":"Thomas Wendt"},"message":"f2fs: support for kernel 3.1\n\nChange-Id: I6c814b0aa0e02f1e69325faec7b404b82048c37b","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/ff14f716cae2aa87f3abe047c0857132318b00e8"},{"sha":"b02012aa246750732a5526ed0df2109c049917cc","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: compaction: allow compaction to isolate dirty pages\n\ncommit a77ebd333cd810d7b680d544be88c875131c2bd3 upstream.\n\nStable note: Not tracked in Bugzilla. A fix aimed at preserving page aging\n\tinformation by reducing LRU list churning had the side-effect of\n\treducing THP allocation success rates. This was part of a series\n\tto restore the success rates while preserving the reclaim fix.\n\nShort summary: There are severe stalls when a USB stick using VFAT is\nused with THP enabled that are reduced by this series.  If you are\nexperiencing this problem, please test and report back and considering I\nhave seen complaints from openSUSE and Fedora users on this as well as a\nfew private mails, I'm guessing it's a widespread issue.  This is a new\ntype of USB-related stall because it is due to synchronous compaction\nwriting where as in the past the big problem was dirty pages reaching\nthe end of the LRU and being written by reclaim.\n\nAm cc'ing Andrew this time and this series would replace\nmm-do-not-stall-in-synchronous-compaction-for-thp-allocations.patch.\nI'm also cc'ing Dave Jones as he might have merged that patch to Fedora\nfor wider testing and ideally it would be reverted and replaced by this\nseries.\n\nThat said, the later patches could really do with some review.  If this\nseries is not the answer then a new direction needs to be discussed\nbecause as it is, the stalls are unacceptable as the results in this\nleader show.\n\nFor testers that try backporting this to 3.1, it won't work because\nthere is a non-obvious dependency on not writing back pages in direct\nreclaim so you need those patches too.\n\nChangelog since V5\no Rebase to 3.2-rc5\no Tidy up the changelogs a bit\n\nChangelog since V4\no Added reviewed-bys, credited Andrea properly for sync-light\no Allow dirty pages without mappings to be considered for migration\no Bound the number of pages freed for compaction\no Isolate PageReclaim pages on their own LRU list\n\nThis is against 3.2-rc5 and follows on from discussions on \"mm: Do\nnot stall in synchronous compaction for THP allocations\" and \"[RFC\nPATCH 0/5] Reduce compaction-related stalls\". Initially, the proposed\npatch eliminated stalls due to compaction which sometimes resulted in\nuser-visible interactivity problems on browsers by simply never using\nsync compaction. The downside was that THP success allocation rates\nwere lower because dirty pages were not being migrated as reported by\nAndrea. His approach at fixing this was nacked on the grounds that\nit reverted fixes from Rik merged that reduced the amount of pages\nreclaimed as it severely impacted his workloads performance.\n\nThis series attempts to reconcile the requirements of maximising THP\nusage, without stalling in a user-visible fashion due to compaction\nor cheating by reclaiming an excessive number of pages.\n\nPatch 1 partially reverts commit 39deaf85 to allow migration to isolate\n\tdirty pages. This is because migration can move some dirty\n\tpages without blocking.\n\nPatch 2 notes that the /proc/sys/vm/compact_memory handler is not using\n\tsynchronous compaction when it should be. This is unrelated\n\tto the reported stalls but is worth fixing.\n\nPatch 3 checks if we isolated a compound page during lumpy scan and\n\taccount for it properly. For the most part, this affects\n\ttracing so it's unrelated to the stalls but worth fixing.\n\nPatch 4 notes that it is possible to abort reclaim early for compaction\n\tand return 0 to the page allocator potentially entering the\n\t\"may oom\" path. This has not been observed in practice but\n\tthe rest of the series potentially makes it easier to happen.\n\nPatch 5 adds a sync parameter to the migratepage callback and gives\n\tthe callback responsibility for migrating the page without\n\tblocking if sync==false. For example, fallback_migrate_page\n\twill not call writepage if sync==false. This increases the\n\tnumber of pages that can be handled by asynchronous compaction\n\tthereby reducing stalls.\n\nPatch 6 restores filter-awareness to isolate_lru_page for migration.\n\tIn practice, it means that pages under writeback and pages\n\twithout a ->migratepage callback will not be isolated\n\tfor migration.\n\nPatch 7 avoids calling direct reclaim if compaction is deferred but\n\tmakes sure that compaction is only deferred if sync\n\tcompaction was used.\n\nPatch 8 introduces a sync-light migration mechanism that sync compaction\n\tuses. The objective is to allow some stalls but to not call\n\t->writepage which can lead to significant user-visible stalls.\n\nPatch 9 notes that while we want to abort reclaim ASAP to allow\n\tcompation to go ahead that we leave a very small window of\n\topportunity for compaction to run. This patch allows more pages\n\tto be freed by reclaim but bounds the number to a reasonable\n\tlevel based on the high watermark on each zone.\n\nPatch 10 allows slabs to be shrunk even after compaction_ready() is\n\ttrue for one zone. This is to avoid a problem whereby a single\n\tsmall zone can abort reclaim even though no pages have been\n\treclaimed and no suitably large zone is in a usable state.\n\nPatch 11 fixes a problem with the rate of page scanning. As reclaim is\n\trarely stalling on pages under writeback it means that scan\n\trates are very high. This is particularly true for direct\n\treclaim which is not calling writepage. The vmstat figures\n\timplied that much of this was busy work with PageReclaim pages\n\tmarked for immediate reclaim. This patch is a prototype that\n\tmoves these pages to their own LRU list.\n\nThis has been tested and other than 2 USB keys getting trashed,\nnothing horrible fell out. That said, I am a bit unhappy with the\nrescue logic in patch 11 but did not find a better way around it. It\ndoes significantly reduce scan rates and System CPU time indicating\nit is the right direction to take.\n\nWhat is of critical importance is that stalls due to compaction\nare massively reduced even though sync compaction was still\nallowed. Testing from people complaining about stalls copying to USBs\nwith THP enabled are particularly welcome.\n\nThe following tests all involve THP usage and USB keys in some\nway. Each test follows this type of pattern\n\n1. Read from some fast fast storage, be it raw device or file. Each time\n   the copy finishes, start again until the test ends\n2. Write a large file to a filesystem on a USB stick. Each time the copy\n   finishes, start again until the test ends\n3. When memory is low, start an alloc process that creates a mapping\n   the size of physical memory to stress THP allocation. This is the\n   \"real\" part of the test and the part that is meant to trigger\n   stalls when THP is enabled. Copying continues in the background.\n4. Record the CPU usage and time to execute of the alloc process\n5. Record the number of THP allocs and fallbacks as well as the number of THP\n   pages in use a the end of the test just before alloc exited\n6. Run the test 5 times to get an idea of variability\n7. Between each run, sync is run and caches dropped and the test\n   waits until nr_dirty is a small number to avoid interference\n   or caching between iterations that would skew the figures.\n\nThe individual tests were then\n\nwritebackCPDeviceBasevfat\n\tDisable THP, read from a raw device (sda), vfat on USB stick\nwritebackCPDeviceBaseext4\n\tDisable THP, read from a raw device (sda), ext4 on USB stick\nwritebackCPDevicevfat\n\tTHP enabled, read from a raw device (sda), vfat on USB stick\nwritebackCPDeviceext4\n\tTHP enabled, read from a raw device (sda), ext4 on USB stick\nwritebackCPFilevfat\n\tTHP enabled, read from a file on fast storage and USB, both vfat\nwritebackCPFileext4\n\tTHP enabled, read from a file on fast storage and USB, both ext4\n\nThe kernels tested were\n\n3.1\t\t3.1\nvanilla\t\t3.2-rc5\nfreemore\tPatches 1-10\nimmediate\tPatches 1-11\nandrea\t\tThe 8 patches Andrea posted as a basis of comparison\n\nThe results are very long unfortunately. I'll start with the case\nwhere we are not using THP at all\n\nwritebackCPDeviceBasevfat\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.28 (    0.00%)   54.49 (-4143.46%)   48.63 (-3687.69%)    4.69 ( -265.11%)   51.88 (-3940.81%)\n+/-                 0.06 (    0.00%)    2.45 (-4305.55%)    4.75 (-8430.57%)    7.46 (-13282.76%)    4.76 (-8440.70%)\nUser Time           0.09 (    0.00%)    0.05 (   40.91%)    0.06 (   29.55%)    0.07 (   15.91%)    0.06 (   27.27%)\n+/-                 0.02 (    0.00%)    0.01 (   45.39%)    0.02 (   25.07%)    0.00 (   77.06%)    0.01 (   52.24%)\nElapsed Time      110.27 (    0.00%)   56.38 (   48.87%)   49.95 (   54.70%)   11.77 (   89.33%)   53.43 (   51.54%)\n+/-                 7.33 (    0.00%)    3.77 (   48.61%)    4.94 (   32.63%)    6.71 (    8.50%)    4.76 (   35.03%)\nTHP Active          0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n+/-                 0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\nFault Alloc         0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n+/-                 0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\nFault Fallback      0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n+/-                 0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)    0.00 (    0.00%)\n\nThe THP figures are obviously all 0 because THP was enabled. The\nmain thing to watch is the elapsed times and how they compare to\ntimes when THP is enabled later. It's also important to note that\nelapsed time is improved by this series as System CPu time is much\nreduced.\n\nwritebackCPDevicevfat\n\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.22 (    0.00%)   13.89 (-1040.72%)   46.40 (-3709.20%)    4.44 ( -264.37%)   47.37 (-3789.33%)\n+/-                 0.06 (    0.00%)   22.82 (-37635.56%)    3.84 (-6249.44%)    6.48 (-10618.92%)    6.60\n(-10818.53%)\nUser Time           0.06 (    0.00%)    0.06 (   -6.90%)    0.05 (   17.24%)    0.05 (   13.79%)    0.04 (   31.03%)\n+/-                 0.01 (    0.00%)    0.01 (   33.33%)    0.01 (   33.33%)    0.01 (   39.14%)    0.01 (   25.46%)\nElapsed Time     10445.54 (    0.00%) 2249.92 (   78.46%)   70.06 (   99.33%)   16.59 (   99.84%)  472.43 (\n95.48%)\n+/-               643.98 (    0.00%)  811.62 (  -26.03%)   10.02 (   98.44%)    7.03 (   98.91%)   59.99 (   90.68%)\nTHP Active         15.60 (    0.00%)   35.20 (  225.64%)   65.00 (  416.67%)   70.80 (  453.85%)   62.20 (  398.72%)\n+/-                18.48 (    0.00%)   51.29 (  277.59%)   15.99 (   86.52%)   37.91 (  205.18%)   22.02 (  119.18%)\nFault Alloc       121.80 (    0.00%)   76.60 (   62.89%)  155.40 (  127.59%)  181.20 (  148.77%)  286.60 (  235.30%)\n+/-                73.51 (    0.00%)   61.11 (   83.12%)   34.89 (   47.46%)   31.88 (   43.36%)   68.13 (   92.68%)\nFault Fallback    881.20 (    0.00%)  926.60 (   -5.15%)  847.60 (    3.81%)  822.00 (    6.72%)  716.60 (   18.68%)\n+/-                73.51 (    0.00%)   61.26 (   16.67%)   34.89 (   52.54%)   31.65 (   56.94%)   67.75 (    7.84%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)       3540.88   1945.37    716.04     64.97   1937.03\nTotal Elapsed Time (seconds)              52417.33  11425.90    501.02    230.95   2520.28\n\nThe first thing to note is the \"Elapsed Time\" for the vanilla kernels\nof 2249 seconds versus 56 with THP disabled which might explain the\nreports of USB stalls with THP enabled. Applying the patches brings\nperformance in line with THP-disabled performance while isolating\npages for immediate reclaim from the LRU cuts down System CPU time.\n\nThe \"Fault Alloc\" success rate figures are also improved. The vanilla\nkernel only managed to allocate 76.6 pages on average over the course\nof 5 iterations where as applying the series allocated 181.20 on\naverage albeit it is well within variance. It's worth noting that\napplies the series at least descreases the amount of variance which\nimplies an improvement.\n\nAndrea's series had a higher success rate for THP allocations but\nat a severe cost to elapsed time which is still better than vanilla\nbut still much worse than disabling THP altogether. One can bring my\nseries close to Andrea's by removing this check\n\n        /*\n         * If compaction is deferred for high-order allocations, it is because\n         * sync compaction recently failed. In this is the case and the caller\n         * has requested the system not be heavily disrupted, fail the\n         * allocation now instead of entering direct reclaim\n         */\n        if (deferred_compaction && (gfp_mask & __GFP_NO_KSWAPD))\n                goto nopage;\n\nI didn't include a patch that removed the above check because hurting\noverall performance to improve the THP figure is not what the average\nuser wants. It's something to consider though if someone really wants\nto maximise THP usage no matter what it does to the workload initially.\n\nThis is summary of vmstat figures from the same test.\n\n                                       3.1.0-vanilla rc5-vanilla freemore-v6r1 isolate-v6r1 andrea-v2r1\nPage Ins                                  3257266139  1111844061    17263623    10901575   161423219\nPage Outs                                   81054922    30364312     3626530     3657687     8753730\nSwap Ins                                        3294        2851        6560        4964        4592\nSwap Outs                                     390073      528094      620197      790912      698285\nDirect pages scanned                      1077581700  3024951463  1764930052   115140570  5901188831\nKswapd pages scanned                        34826043     7112868     2131265     1686942     1893966\nKswapd pages reclaimed                      28950067     4911036     1246044      966475     1497726\nDirect pages reclaimed                     805148398   280167837     3623473     2215044    40809360\nKswapd efficiency                                83%         69%         58%         57%         79%\nKswapd velocity                              664.399     622.521    4253.852    7304.360     751.490\nDirect efficiency                                74%          9%          0%          1%          0%\nDirect velocity                            20557.737  264745.137 3522673.849  498551.938 2341481.435\nPercentage direct scans                          96%         99%         99%         98%         99%\nPage writes by reclaim                        722646      529174      620319      791018      699198\nPage writes file                              332573        1080         122         106         913\nPage writes anon                              390073      528094      620197      790912      698285\nPage reclaim immediate                             0  2552514720  1635858848   111281140  5478375032\nPage rescued immediate                             0           0           0       87848           0\nSlabs scanned                                  23552       23552        9216        8192        9216\nDirect inode steals                              231           0           0           0           0\nKswapd inode steals                                0           0           0           0           0\nKswapd skipped wait                            28076         786           0          61           6\nTHP fault alloc                                  609         383         753         906        1433\nTHP collapse alloc                                12           6           0           0           6\nTHP splits                                       536         211         456         593        1136\nTHP fault fallback                              4406        4633        4263        4110        3583\nTHP collapse fail                                120         127           0           0           4\nCompaction stalls                               1810         728         623         779        3200\nCompaction success                               196          53          60          80         123\nCompaction failures                             1614         675         563         699        3077\nCompaction pages moved                        193158       53545      243185      333457      226688\nCompaction move failure                         9952        9396       16424       23676       45070\n\nThe main things to look at are\n\n1. Page In/out figures are much reduced by the series.\n\n2. Direct page scanning is incredibly high (264745.137 pages scanned\n   per second on the vanilla kernel) but isolating PageReclaim pages\n   on their own list reduces the number of pages scanned significantly.\n\n3. The fact that \"Page rescued immediate\" is a positive number implies\n   that we sometimes race removing pages from the LRU_IMMEDIATE list\n   that need to be put back on a normal LRU but it happens only for\n   0.07% of the pages marked for immediate reclaim.\n\nwritebackCPDeviceext4\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.51 (    0.00%)    1.77 (  -17.66%)    1.46 (    2.92%)    1.15 (   23.77%)    1.89 (  -25.63%)\n+/-                 0.27 (    0.00%)    0.67 ( -148.52%)    0.33 (  -22.76%)    0.30 (  -11.15%)    0.19 (   30.16%)\nUser Time           0.03 (    0.00%)    0.04 (  -37.50%)    0.05 (  -62.50%)    0.07 ( -112.50%)    0.04 (  -18.75%)\n+/-                 0.01 (    0.00%)    0.02 ( -146.64%)    0.02 (  -97.91%)    0.02 (  -75.59%)    0.02 (  -63.30%)\nElapsed Time      124.93 (    0.00%)  114.49 (    8.36%)   96.77 (   22.55%)   27.48 (   78.00%)  205.70 (  -64.65%)\n+/-                20.20 (    0.00%)   74.39 ( -268.34%)   59.88 ( -196.48%)    7.72 (   61.79%)   25.03 (  -23.95%)\nTHP Active        161.80 (    0.00%)   83.60 (   51.67%)  141.20 (   87.27%)   84.60 (   52.29%)   82.60 (   51.05%)\n+/-                71.95 (    0.00%)   43.80 (   60.88%)   26.91 (   37.40%)   59.02 (   82.03%)   52.13 (   72.45%)\nFault Alloc       471.40 (    0.00%)  228.60 (   48.49%)  282.20 (   59.86%)  225.20 (   47.77%)  388.40 (   82.39%)\n+/-                88.07 (    0.00%)   87.42 (   99.26%)   73.79 (   83.78%)  109.62 (  124.47%)   82.62 (   93.81%)\nFault Fallback    531.60 (    0.00%)  774.60 (  -45.71%)  720.80 (  -35.59%)  777.80 (  -46.31%)  614.80 (  -15.65%)\n+/-                88.07 (    0.00%)   87.26 (    0.92%)   73.79 (   16.22%)  109.62 (  -24.47%)   82.29 (    6.56%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)         50.22     33.76     30.65     24.14    128.45\nTotal Elapsed Time (seconds)               1113.73   1132.19   1029.45    759.49   1707.26\n\nSimilar test but the USB stick is using ext4 instead of vfat. As\next4 does not use writepage for migration, the large stalls due to\ncompaction when THP is enabled are not observed. Still, isolating\nPageReclaim pages on their own list helped completion time largely\nby reducing the number of pages scanned by direct reclaim although\ntime spend in congestion_wait could also be a factor.\n\nAgain, Andrea's series had far higher success rates for THP allocation\nat the cost of elapsed time. I didn't look too closely but a quick\nlook at the vmstat figures tells me kswapd reclaimed 8 times more pages\nthan the patch series and direct reclaim reclaimed roughly three times\nas many pages. It follows that if memory is aggressively reclaimed,\nthere will be more available for THP.\n\nwritebackCPFilevfat\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.76 (    0.00%)   29.10 (-1555.52%)   46.01 (-2517.18%)    4.79 ( -172.35%)   54.89 (-3022.53%)\n+/-                 0.14 (    0.00%)   25.61 (-18185.17%)    2.15 (-1434.83%)    6.60 (-4610.03%)    9.75\n(-6863.76%)\nUser Time           0.05 (    0.00%)    0.07 (  -45.83%)    0.05 (   -4.17%)    0.06 (  -29.17%)    0.06 (  -16.67%)\n+/-                 0.02 (    0.00%)    0.02 (   20.11%)    0.02 (   -3.14%)    0.01 (   31.58%)    0.01 (   47.41%)\nElapsed Time     22520.79 (    0.00%) 1082.85 (   95.19%)   73.30 (   99.67%)   32.43 (   99.86%)  291.84 (  98.70%)\n+/-              7277.23 (    0.00%)  706.29 (   90.29%)   19.05 (   99.74%)   17.05 (   99.77%)  125.55 (   98.27%)\nTHP Active         83.80 (    0.00%)   12.80 (   15.27%)   15.60 (   18.62%)   13.00 (   15.51%)    0.80 (    0.95%)\n+/-                66.81 (    0.00%)   20.19 (   30.22%)    5.92 (    8.86%)   15.06 (   22.54%)    1.17 (    1.75%)\nFault Alloc       171.00 (    0.00%)   67.80 (   39.65%)   97.40 (   56.96%)  125.60 (   73.45%)  133.00 (   77.78%)\n+/-                82.91 (    0.00%)   30.69 (   37.02%)   53.91 (   65.02%)   55.05 (   66.40%)   21.19 (   25.56%)\nFault Fallback    832.00 (    0.00%)  935.20 (  -12.40%)  906.00 (   -8.89%)  877.40 (   -5.46%)  870.20 (   -4.59%)\n+/-                82.91 (    0.00%)   30.69 (   62.98%)   54.01 (   34.86%)   55.05 (   33.60%)   20.91 (   74.78%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)       7229.81    928.42    704.52     80.68   1330.76\nTotal Elapsed Time (seconds)             112849.04   5618.69    571.11    360.54   1664.28\n\nIn this case, the test is reading/writing only from filesystems but as\nit's vfat, it's slow due to calling writepage during compaction. Little\nto observe really - the time to complete the test goes way down\nwith the series applied and THP allocation success rates go up in\ncomparison to 3.2-rc5.  The success rates are lower than 3.1.0 but\nthe elapsed time for that kernel is abysmal so it is not really a\nsensible comparison.\n\nAs before, Andrea's series allocates more THPs at the cost of overall\nperformance.\n\nwritebackCPFileext4\n                   3.1.0-vanilla         rc5-vanilla       freemore-v6r1        isolate-v6r1         andrea-v2r1\nSystem Time         1.51 (    0.00%)    1.77 (  -17.66%)    1.46 (    2.92%)    1.15 (   23.77%)    1.89 (  -25.63%)\n+/-                 0.27 (    0.00%)    0.67 ( -148.52%)    0.33 (  -22.76%)    0.30 (  -11.15%)    0.19 (   30.16%)\nUser Time           0.03 (    0.00%)    0.04 (  -37.50%)    0.05 (  -62.50%)    0.07 ( -112.50%)    0.04 (  -18.75%)\n+/-                 0.01 (    0.00%)    0.02 ( -146.64%)    0.02 (  -97.91%)    0.02 (  -75.59%)    0.02 (  -63.30%)\nElapsed Time      124.93 (    0.00%)  114.49 (    8.36%)   96.77 (   22.55%)   27.48 (   78.00%)  205.70 (  -64.65%)\n+/-                20.20 (    0.00%)   74.39 ( -268.34%)   59.88 ( -196.48%)    7.72 (   61.79%)   25.03 (  -23.95%)\nTHP Active        161.80 (    0.00%)   83.60 (   51.67%)  141.20 (   87.27%)   84.60 (   52.29%)   82.60 (   51.05%)\n+/-                71.95 (    0.00%)   43.80 (   60.88%)   26.91 (   37.40%)   59.02 (   82.03%)   52.13 (   72.45%)\nFault Alloc       471.40 (    0.00%)  228.60 (   48.49%)  282.20 (   59.86%)  225.20 (   47.77%)  388.40 (   82.39%)\n+/-                88.07 (    0.00%)   87.42 (   99.26%)   73.79 (   83.78%)  109.62 (  124.47%)   82.62 (   93.81%)\nFault Fallback    531.60 (    0.00%)  774.60 (  -45.71%)  720.80 (  -35.59%)  777.80 (  -46.31%)  614.80 (  -15.65%)\n+/-                88.07 (    0.00%)   87.26 (    0.92%)   73.79 (   16.22%)  109.62 (  -24.47%)   82.29 (    6.56%)\nMMTests Statistics: duration\nUser/Sys Time Running Test (seconds)         50.22     33.76     30.65     24.14    128.45\nTotal Elapsed Time (seconds)               1113.73   1132.19   1029.45    759.49   1707.26\n\nSame type of story - elapsed times go down. In this case, allocation\nsuccess rates are roughtly the same. As before, Andrea's has higher\nsuccess rates but takes a lot longer.\n\nOverall the series does reduce latencies and while the tests are\ninherency racy as alloc competes with the cp processes, the variability\nwas included. The THP allocation rates are not as high as they could\nbe but that is because we would have to be more aggressive about\nreclaim and compaction impacting overall performance.\n\nThis patch:\n\nCommit 39deaf85 (\"mm: compaction: make isolate_lru_page() filter-aware\")\nnoted that compaction does not migrate dirty or writeback pages and that\nis was meaningless to pick the page and re-add it to the LRU list.\n\nWhat was missed during review is that asynchronous migration moves dirty\npages if their ->migratepage callback is migrate_page() because these can\nbe moved without blocking.  This potentially impacted hugepage allocation\nsuccess rates by a factor depending on how many dirty pages are in the\nsystem.\n\nThis patch partially reverts 39deaf85 to allow migration to isolate dirty\npages again.  This increases how much compaction disrupts the LRU but that\nis addressed later in the series.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nReviewed-by: Andrea Arcangeli <aarcange@redhat.com>\nReviewed-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Minchan Kim <minchan.kim@gmail.com>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/b02012aa246750732a5526ed0df2109c049917cc"},{"sha":"2f62f458a90f77d32fe0525944cb5dcf00d4bbb1","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: compaction: determine if dirty pages can be migrated without blocking within ->migratepage\n\ncommit b969c4ab9f182a6e1b2a0848be349f99714947b0 upstream.\n\nStable note: Not tracked in Bugzilla. A fix aimed at preserving page\n\taging information by reducing LRU list churning had the side-effect\n\tof reducing THP allocation success rates. This was part of a series\n\tto restore the success rates while preserving the reclaim fix.\n\nAsynchronous compaction is used when allocating transparent hugepages to\navoid blocking for long periods of time.  Due to reports of stalling,\nthere was a debate on disabling synchronous compaction but this severely\nimpacted allocation success rates.  Part of the reason was that many dirty\npages are skipped in asynchronous compaction by the following check;\n\n\tif (PageDirty(page) && !sync &&\n\t\tmapping->a_ops->migratepage != migrate_page)\n\t\t\trc = -EBUSY;\n\nThis skips over all mapping aops using buffer_migrate_page() even though\nit is possible to migrate some of these pages without blocking.  This\npatch updates the ->migratepage callback with a \"sync\" parameter.  It is\nthe responsibility of the callback to fail gracefully if migration would\nblock.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nReviewed-by: Rik van Riel <riel@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Minchan Kim <minchan.kim@gmail.com>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/2f62f458a90f77d32fe0525944cb5dcf00d4bbb1"},{"sha":"f3674453cff3a7c411afbdb793840a923c65927e","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: page allocator: do not call direct reclaim for THP allocations while compaction is deferred\n\ncommit 66199712e9eef5aede09dbcd9dfff87798a66917 upstream.\n\nStable note: Not tracked in Buzilla. This was part of a series that\n\treduced interactivity stalls experienced when THP was enabled.\n\nIf compaction is deferred, direct reclaim is used to try to free enough\npages for the allocation to succeed.  For small high-orders, this has a\nreasonable chance of success.  However, if the caller has specified\n__GFP_NO_KSWAPD to limit the disruption to the system, it makes more sense\nto fail the allocation rather than stall the caller in direct reclaim.\nThis patch skips direct reclaim if compaction is deferred and the caller\nspecifies __GFP_NO_KSWAPD.\n\nAsync compaction only considers a subset of pages so it is possible for\ncompaction to be deferred prematurely and not enter direct reclaim even in\ncases where it should.  To compensate for this, this patch also defers\ncompaction only if sync compaction failed.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nAcked-by: Minchan Kim <minchan.kim@gmail.com>\nReviewed-by: Rik van Riel<riel@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/f3674453cff3a7c411afbdb793840a923c65927e"},{"sha":"8c0a4b1a824ae68728eb796760fdbcdc4f2c2b9e","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: compaction: make isolate_lru_page() filter-aware again\n\ncommit c82449352854ff09e43062246af86bdeb628f0c3 upstream.\n\nStable note: Not tracked in Bugzilla. A fix aimed at preserving page aging\n\tinformation by reducing LRU list churning had the side-effect of\n\treducing THP allocation success rates. This was part of a series\n\tto restore the success rates while preserving the reclaim fix.\n\nCommit 39deaf85 (\"mm: compaction: make isolate_lru_page() filter-aware\")\nnoted that compaction does not migrate dirty or writeback pages and that\nis was meaningless to pick the page and re-add it to the LRU list.  This\nhad to be partially reverted because some dirty pages can be migrated by\ncompaction without blocking.\n\nThis patch updates \"mm: compaction: make isolate_lru_page\" by skipping\nover pages that migration has no possibility of migrating to minimise LRU\ndisruption.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nReviewed-by: Rik van Riel<riel@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nReviewed-by: Minchan Kim <minchan@kernel.org>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/8c0a4b1a824ae68728eb796760fdbcdc4f2c2b9e"},{"sha":"32f275d718b1e0b293b99f10ea2d307c28a50fb4","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: compaction: introduce sync-light migration for use by compaction\n\ncommit a6bc32b899223a877f595ef9ddc1e89ead5072b8 upstream.\n\nStable note: Not tracked in Buzilla. This was part of a series that\n\treduced interactivity stalls experienced when THP was enabled.\n\tThese stalls were particularly noticable when copying data\n\tto a USB stick but the experiences for users varied a lot.\n\nThis patch adds a lightweight sync migrate operation MIGRATE_SYNC_LIGHT\nmode that avoids writing back pages to backing storage.  Async compaction\nmaps to MIGRATE_ASYNC while sync compaction maps to MIGRATE_SYNC_LIGHT.\nFor other migrate_pages users such as memory hotplug, MIGRATE_SYNC is\nused.\n\nThis avoids sync compaction stalling for an excessive length of time,\nparticularly when copying files to a USB stick where there might be a\nlarge number of dirty pages backed by a filesystem that does not support\n->writepages.\n\n[aarcange@redhat.com: This patch is heavily based on Andrea's work]\n[akpm@linux-foundation.org: fix fs/nfs/write.c build]\n[akpm@linux-foundation.org: fix fs/btrfs/disk-io.c build]\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nReviewed-by: Rik van Riel <riel@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Minchan Kim <minchan.kim@gmail.com>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/32f275d718b1e0b293b99f10ea2d307c28a50fb4"},{"sha":"b1f3e1cd8b54e29ad8e0cc66e4021e309f479ae7","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: vmscan: when reclaiming for compaction, ensure there are sufficient free pages available\n\ncommit fe4b1b244bdb96136855f2c694071cb09d140766 upstream.\n\nStable note: Not tracked on Bugzilla. THP and compaction was found to\n\taggressively reclaim pages and stall systems under different\n\tsituations that was addressed piecemeal over time. This patch\n\taddresses a problem where the fix regressed THP allocation\n\tsuccess rates.\n\nIn commit e0887c19 (\"vmscan: limit direct reclaim for higher order\nallocations\"), Rik noted that reclaim was too aggressive when THP was\nenabled.  In his initial patch he used the number of free pages to decide\nif reclaim should abort for compaction.  My feedback was that reclaim and\ncompaction should be using the same logic when deciding if reclaim should\nbe aborted.\n\nUnfortunately, this had the effect of reducing THP success rates when the\nworkload included something like streaming reads that continually\nallocated pages.  The window during which compaction could run and return\na THP was too small.\n\nThis patch combines Rik's two patches together.  compaction_suitable() is\nstill used to decide if reclaim should be aborted to allow compaction is\nused.  However, it will also ensure that there is a reasonable buffer of\nfree pages available.  This improves upon the THP allocation success rates\nbut bounds the number of pages that are freed for compaction.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nReviewed-by: Rik van Riel<riel@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Minchan Kim <minchan.kim@gmail.com>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/b1f3e1cd8b54e29ad8e0cc66e4021e309f479ae7"},{"sha":"d976800cdc129eaf8ee51f576d6af9f24c3b261c","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: vmscan: do not OOM if aborting reclaim to start compaction\n\ncommit 7335084d446b83cbcb15da80497d03f0c1dc9e21 upstream.\n\nStable note: Not tracked in Bugzilla. This patch makes later patches\n\teasier to apply but otherwise has little to justify it. The\n\tproblem it fixes was never observed but the source of the\n\ttheoretical problem did not exist for very long.\n\nDuring direct reclaim it is possible that reclaim will be aborted so that\ncompaction can be attempted to satisfy a high-order allocation.  If this\ndecision is made before any pages are reclaimed, it is possible that 0 is\nreturned to the page allocator potentially triggering an OOM.  This has\nnot been observed but it is a possibility so this patch addresses it.\n\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nReviewed-by: Rik van Riel <riel@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Minchan Kim <minchan.kim@gmail.com>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/d976800cdc129eaf8ee51f576d6af9f24c3b261c"},{"sha":"ca0de020fb36e8653762c5cf0e40bf0b5d71ae4b","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: vmscan: check if reclaim should really abort even if compaction_ready() is true for one zone\n\ncommit 0cee34fd72c582b4f8ad8ce00645b75fb4168199 upstream.\n\nStable note: Not tracked on Bugzilla. THP and compaction was found to\n\taggressively reclaim pages and stall systems under different\n\tsituations that was addressed piecemeal over time.\n\nIf compaction can proceed for a given zone, shrink_zones() does not\nreclaim any more pages from it.  After commit [e0c2327: vmscan: abort\nreclaim/compaction if compaction can proceed], do_try_to_free_pages()\ntries to finish as soon as possible once one zone can compact.\n\nThis was intended to prevent slabs being shrunk unnecessarily but there\nare side-effects.  One is that a small zone that is ready for compaction\nwill abort reclaim even if the chances of successfully allocating a THP\nfrom that zone is small.  It also means that reclaim can return too early\neven though sc->nr_to_reclaim pages were not reclaimed.\n\nThis partially reverts the commit until it is proven that slabs are really\nbeing shrunk unnecessarily but preserves the check to return 1 to avoid\nOOM if reclaim was aborted prematurely.\n\n[aarcange@redhat.com: This patch replaces a revert from Andrea]\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nReviewed-by: Rik van Riel <riel@redhat.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Minchan Kim <minchan.kim@gmail.com>\nCc: Dave Jones <davej@redhat.com>\nCc: Jan Kara <jack@suse.cz>\nCc: Andy Isaacson <adi@hexapodia.org>\nCc: Nai Xia <nai.xia@gmail.com>\nCc: Johannes Weiner <jweiner@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/ca0de020fb36e8653762c5cf0e40bf0b5d71ae4b"},{"sha":"df13380aa95e53c18a70a8670341986861a0a239","author":{"email":"3b96b99f19643d33e1bfa1caa535c041c3608549@openvz.org","name":"Konstantin Khlebnikov"},"message":"mm/hugetlb: fix warning in alloc_huge_page/dequeue_huge_page_vma\n\ncommit b1c12cbcd0a02527c180a862e8971e249d3b347d upstream.\n\nStable note: Not tracked in Bugzilla. [get|put]_mems_allowed() is extremely\n\texpensive and severely impacted page allocator performance. This\n\tis part of a series of patches that reduce page allocator overhead.\n\nFix a gcc warning (and bug?) introduced in cc9a6c877 (\"cpuset: mm: reduce\nlarge amounts of memory barrier related damage v3\")\n\nLocal variable \"page\" can be uninitialized if the nodemask from vma policy\ndoes not intersects with nodemask from cpuset.  Even if it doesn't happens\nit is better to initialize this variable explicitly than to introduce\na kernel oops in a weird corner case.\n\nmm/hugetlb.c: In function `alloc_huge_page':\nmm/hugetlb.c:1135:5: warning: `page' may be used uninitialized in this function\n\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nAcked-by: Mel Gorman <mgorman@suse.de>\nAcked-by: David Rientjes <rientjes@google.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/df13380aa95e53c18a70a8670341986861a0a239"},{"sha":"bbeecb32f3f835cf335fcae9a6c233c2c86404ea","author":{"email":"1aae5ab9541d66245293c8fc1b9880f5df073631@linaro.org","name":"Anton Vorontsov"},"message":"memcg: add memory.pressure_level events\n\nWith this patch userland applications that want to maintain the\ninteractivity/memory allocation cost can use the pressure level\nnotifications.  The levels are defined like this:\n\nThe \"low\" level means that the system is reclaiming memory for new\nallocations.  Monitoring this reclaiming activity might be useful for\nmaintaining cache level.  Upon notification, the program (typically\n\"Activity Manager\") might analyze vmstat and act in advance (i.e.\nprematurely shutdown unimportant services).\n\nThe \"medium\" level means that the system is experiencing medium memory\npressure, the system might be making swap, paging out active file\ncaches, etc.  Upon this event applications may decide to further analyze\nvmstat/zoneinfo/memcg or internal memory usage statistics and free any\nresources that can be easily reconstructed or re-read from a disk.\n\nThe \"critical\" level means that the system is actively thrashing, it is\nabout to out of memory (OOM) or even the in-kernel OOM killer is on its\nway to trigger.  Applications should do whatever they can to help the\nsystem.  It might be too late to consult with vmstat or any other\nstatistics, so it's advisable to take an immediate action.\n\nThe events are propagated upward until the event is handled, i.e.  the\nevents are not pass-through.  Here is what this means: for example you\nhave three cgroups: A->B->C.  Now you set up an event listener on\ncgroups A, B and C, and suppose group C experiences some pressure.  In\nthis situation, only group C will receive the notification, i.e.  groups\nA and B will not receive it.  This is done to avoid excessive\n\"broadcasting\" of messages, which disturbs the system and which is\nespecially bad if we are low on memory or thrashing.  So, organize the\ncgroups wisely, or propagate the events manually (or, ask us to\nimplement the pass-through events, explaining why would you need them.)\n\nPerformance wise, the memory pressure notifications feature itself is\nlightweight and does not require much of bookkeeping, in contrast to the\nrest of memcg features.  Unfortunately, as of current memcg\nimplementation, pages accounting is an inseparable part and cannot be\nturned off.  The good news is that there are some efforts[1] to improve\nthe situation; plus, implementing the same, fully API-compatible[2]\ninterface for CONFIG_CGROUP_MEM_RES_CTLR=n case (e.g.  embedded) is also\na viable option, so it will not require any changes on the userland\nside.\n\n[1] http://permalink.gmane.org/gmane.linux.kernel.cgroups/6291\n[2] http://lkml.org/lkml/2013/2/21/454\n\n[akpm@linux-foundation.org: coding-style fixes]\n[akpm@linux-foundation.org: fix CONFIG_CGROPUPS=n warnings]\nSigned-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>\nAcked-by: Kirill A. Shutemov <kirill@shutemov.name>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nCc: Tejun Heo <tj@kernel.org>\nCc: David Rientjes <rientjes@google.com>\nCc: Pekka Enberg <penberg@kernel.org>\nCc: Mel Gorman <mgorman@suse.de>\nCc: Glauber Costa <glommer@parallels.com>\nCc: Michal Hocko <mhocko@suse.cz>\nCc: Luiz Capitulino <lcapitulino@redhat.com>\nCc: Greg Thelen <gthelen@google.com>\nCc: Leonid Moiseichuk <leonid.moiseichuk@nokia.com>\nCc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>\nCc: John Stultz <john.stultz@linaro.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\nConflicts:\n\tmm/memcontrol.c\n\tmm/vmscan.c\n\nChange-Id: Idf09f4020b8d26a6de7fd2253980c8a49b0e7d7c","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/bbeecb32f3f835cf335fcae9a6c233c2c86404ea"},{"sha":"c00c1931f871487bdf5ef101e7b1c8a373362d62","author":{"email":"39ea6a09710987173e32e37c86918024a0f441c1@suse.de","name":"Mel Gorman"},"message":"mm: memory hotplug: Check if pages are correctly reserved on a per-section basis\n\ncommit 2bbcb8788311a40714b585fc11b51da6ffa2ab92 upstream.\n\nStable note: Fixes https://bugzilla.novell.com/show_bug.cgi?id=721039 .\n        Without the patch, memory hot-add can fail for kernel configurations\n        that do not set CONFIG_SPARSEMEM_VMEMMAP.\n\n(Resending as I am not seeing it in -next so maybe it got lost)\n\nmm: memory hotplug: Check if pages are correctly reserved on a per-section basis\n\nIt is expected that memory being brought online is PageReserved\nsimilar to what happens when the page allocator is being brought up.\nMemory is onlined in \"memory blocks\" which consist of one or more\nsections. Unfortunately, the code that verifies PageReserved is\ncurrently assuming that the memmap backing all these pages is virtually\ncontiguous which is only the case when CONFIG_SPARSEMEM_VMEMMAP is set.\nAs a result, memory hot-add is failing on those configurations with\nthe message;\n\nkernel: section number XXX page number 256 not reserved, was it already online?\n\nThis patch updates the PageReserved check to lookup struct page once\nper section to guarantee the correct struct page is being checked.\n\n[Check pages within sections properly: rientjes@google.com]\n[original patch by: nfont@linux.vnet.ibm.com]\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nAcked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nTested-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/c00c1931f871487bdf5ef101e7b1c8a373362d62"},{"sha":"f34065871e77ef1426f456553359a3ba8ba5a3fc","author":{"email":"12330474acf818c36105a159b1ab0efedce0665c@gmail.com","name":"Minchan Kim"},"message":"mm: compaction: trivial clean up in acct_isolated()\n\ncommit b9e84ac1536d35aee03b2601f19694949f0bd506 upstream.\n\nStable note: Not tracked in Bugzilla. This patch makes later patches\n\teasier to apply but has no other impact.\n\nacct_isolated of compaction uses page_lru_base_type which returns only\nbase type of LRU list so it never returns LRU_ACTIVE_ANON or\nLRU_ACTIVE_FILE.  In addtion, cc->nr_[anon|file] is used in only\nacct_isolated so it doesn't have fields in conpact_control.\n\nThis patch removes fields from compact_control and makes clear function of\nacct_issolated which counts the number of anon|file pages isolated.\n\nSigned-off-by: Minchan Kim <minchan.kim@gmail.com>\nAcked-by: Johannes Weiner <hannes@cmpxchg.org>\nReviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>\nReviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>\nAcked-by: Mel Gorman <mgorman@suse.de>\nAcked-by: Rik van Riel <riel@redhat.com>\nReviewed-by: Michal Hocko <mhocko@suse.cz>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: Mel Gorman <mgorman@suse.de>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/f34065871e77ef1426f456553359a3ba8ba5a3fc"},{"sha":"ba79277789cfe8b89e6419d2e8e1b5be5e3b811c","author":{"email":"c20b7eb10a8742e8800cf4ce1d02c9801be12758@gmail.com","name":"RyanG"},"message":"Revert \"Revert \"lowmemorykiller: Compact memory when killing processes\"\"\n\nThis reverts commit f4f8fcd7cdd1c742c8639d3a2b78fb360b0b456b.","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/ba79277789cfe8b89e6419d2e8e1b5be5e3b811c"},{"sha":"0b50f8df673998c017fe471b380598f89d97a5f1","author":{"email":"c20b7eb10a8742e8800cf4ce1d02c9801be12758@gmail.com","name":"RyanG"},"message":"Squash lowmemorykiller reverts\n\nRevert \"Revert \"lowmemorykiller: Use asynchronous compaction\"\"\n\nThis reverts commit 8ce1cfe8cf8fb769e66100f8b814ea5b8658a4c6.\n\nRevert \"Revert \"drivers: staging: android: lmk compile fixup\"\"\n\nThis reverts commit 49a038741bfc1758edf8e4103c819529f7fcdef9.\n\nRevert \"lowmemorykiller: Don't count swap cache pages twice\"\n\nThis reverts commit f18a32be9734116999031bed16b6845648164b30.\n\nRevert \"Revert \"lowmemorykiller: optimize for use with zswap\"\"\n\nThis reverts commit df855aa62cf8dca2182d5c32dc0fb68865bf591b.\n\nRevert \"staging:android:lmk: read rb tree root with spinlock\"\n\nThis reverts commit 468715e18b7ba3855ac4a8fed264908ea09e63f4.\n\nRevert \"lmk: wrap the lmk code with config\"\n\nThis reverts commit cea73cba262a396bb88f91e780acb2ff9ed1afa9.\n\nRevert \"drivers:lmk: Fix double delete issue\"\n\nThis reverts commit 323c773ae5a3c706a47687d97cc1bc0b38b67c2a.\n\nRevert \"defconfig: use Motorola's lmk optimizations\"\n\nThis reverts commit cc8bc12f4ee4e35bb7cad9555b5360ce087372de.\n\nRevert \"Revert \"Revert \"android: lowmemorykiller: squash task adj rbtree optimization from Motorola\"\"\"\n\nThis reverts commit d31abd76d6995b75981204727222114d7a4f004f.\n\nRevert \"Revert \"android: lowmemorykiller: squash task adj rbtree optimization from Motorola\"\"\n\nThis reverts commit 062577f93e22acde91cfd85c589178c670d112b6.\n\nRevert \"android: lowmemorykiller: squash task adj rbtree optimization from Motorola\"\n\nThis reverts commit 0c6f7a3bf543826e93d180e79e1871a22c13cca6.\n\nRevert \"lowmemorykiller: Fix __module_param_call for 3.1 compatability\"\n\nThis reverts commit e13f9b21758135118f12c895746676dc604f1aba.\n\nRevert \"lowmemorykiller: remove dead code\"\n\nThis reverts commit 47d02e8a969cd6f6dfd238de204afb711f68670e.\n\nRevert \"lowmemorykiller: optimize for use with zswap\"\n\nThis reverts commit c05f86275f29b79849dc2843f6f276058177703d.\n\nRevert \"lowmemorykiller: Don't count reserve page twice\"\n\nThis reverts commit e906409c44d6a4f32ba843d7a7baa16c1b70082d.\n\nRevert \"Revert \"android/lowmemorykiller: Selectively count free CMA pages\"\"\n\nThis reverts commit 29f9c906ca963de7da08b369179cb904b084e32b.\n\nRevert \"lowmemorykiller: Account for highmem during kswapd reclaim\"\n\nThis reverts commit c0736ac3a96e070ed7ce6fa8892bba8224b79aaf.\n\nRevert \"android/lowmemorykiller: Account for total_swapcache_pages\"\n\nThis reverts commit 8d856c407505b0111327b73eaf87de0b6812baca.\n\nRevert \"android/lowmemorykiller: Selectively count free CMA pages\"\n\nThis reverts commit 5ef2fde7e895e3895e0eb61a4a8a36b85b0e355b.\n\nRevert \"android: lowmemorykiller: add lmk parameters tunning code.\"\n\nThis reverts commit 2d042919529e1070355e774062cebd064ccb1568.\n\nRevert \"Revert \"android/lowmemorykiller: Only consider gfp_mask free pages\"\"\n\nThis reverts commit 7f7613394a1e8a71d664eb3b70745ae52f6132c8.\n\nRevert \"android/lowmemorykiller: Ignore tasks with freed mm\"\n\nThis reverts commit db6065f7f6765702af1a28bb7d22bda172d68335.\n\nRevert \"android/lowmemorykiller: Wait for memory to be freed\"\n\nThis reverts commit 5f4b65956584c0d524ee335c50e8ae1de19fbeea.\n\nRevert \"android/lowmemorykiller: Only consider gfp_mask free pages\"\n\nThis reverts commit 04073566feff865db5b6485cad1bbd7bcc1a95f4.\n\nRevert \"android/lowmemorykiller: Check all tasks for death pending\"\n\nThis reverts commit 2daea4bfb682b0a986d4712cbc6f16f2c6511d13.\n\nRevert \"lowmemorykiller: make default lowmemorykiller debug message useful\"\n\nThis reverts commit 18e8b5814795b1ff8c09664987121b9cd8251cd9.\n\nRevert \"staging: android: lowmemorykiller: Change default debug_level to 1\"\n\nThis reverts commit 88a7bd2dc71d74165c693acd4c9d78f8caa4f404.\n\nRevert \"staging: android: lowmemorykiller: Don't count reserved free memory\"\n\nThis reverts commit aa322ad087f7c825588a856da649b7f16dff0f66.\n\nRevert \"staging: android: lowmemorykiller: Add config option to support oom_adj values\"\n\nThis reverts commit 9d0b6ce66e7d7b7b42ceafa8cf48769614cb6cbe.\n\nRevert \"android, lowmemorykiller: remove task handoff notifier\"\n\nThis reverts commit 0362b0a53f5f3b325857baaf058bdd889ba534bd.\n\nRevert \"staging: android, lowmemorykiller: convert to use oom_score_adj\"\n\nThis reverts commit 7cd0b6cd080fd1a5498cdc066d5119021ce8ad54.\n\nRevert lowmemorykiller to ICS","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/0b50f8df673998c017fe471b380598f89d97a5f1"},{"sha":"1d8e104bd2c001a0c7377e0b0008582d9ed3e26e","author":{"email":"e2a0997578a2c3cd941982feeeee71b349e2b804@gmail.com","name":"Marco Navarra"},"message":"Staging: android: fixed 80 characters warnings in lowmemorykiller.c\n\nThis patch fixes some 80 chatacters limit warnings in the lowmemorykiller.c file\n\nSigned-off-by: Marco Navarra <fromenglish@gmail.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@suse.de>","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/1d8e104bd2c001a0c7377e0b0008582d9ed3e26e"},{"sha":"41551088569990967faea055af740bc3a6b37b80","author":{"email":"c208d1ecece4e5ef2e4fb72f0546c69cdce89063@gmail.com","name":"faux123"},"message":"staging: android/lowmemorykiller: Don't grab tasklist_lock\n\nGrabbing tasklist_lock has its disadvantages, i.e. it blocks\nprocess creation and destruction. If there are lots of processes,\nblocking doesn't sound as a great idea.\n\nFor LMK, it is sufficient to surround tasks list traverse with\nrcu_read_{,un}lock().\n\n>From now on using force_sig() is not safe, as it can race with an\nalready exiting task, so we use send_sig() now. As a downside, it\nwon't kill PID namespace init processes, but that's not what we\nwant anyway.\n\nSuggested-by: Oleg Nesterov <oleg@redhat.com>\nSigned-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>\nReviewed-by: Oleg Nesterov <oleg@redhat.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nmodified for HTC kernel from Linux 3.4+ by faux123","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/41551088569990967faea055af740bc3a6b37b80"},{"sha":"58863cb25054a433b20b3c3652c83f91217be69e","author":{"email":"c208d1ecece4e5ef2e4fb72f0546c69cdce89063@gmail.com","name":"faux123"},"message":"staging: android/lowmemorykiller: Better mm handling\n\nLMK should not directly check for task->mm. The reason is that the\nprocess' threads may exit or detach its mm via use_mm(), but other\nthreads may still have a valid mm. To catch this we use\nfind_lock_task_mm(), which walks up all threads and returns an\nappropriate task (with lock held).\n\nSuggested-by: Oleg Nesterov <oleg@redhat.com>\nReviewed-by: Oleg Nesterov <oleg@redhat.com>\nSigned-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>\nAcked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nmodified for HTC kernel from Linux 3.4+ by faux123","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/58863cb25054a433b20b3c3652c83f91217be69e"},{"sha":"71b522d111ed89ea5e5506a6f63d865f4c371171","author":{"email":"c208d1ecece4e5ef2e4fb72f0546c69cdce89063@gmail.com","name":"faux123"},"message":"staging: android/lowmemorykiller: No need for task->signal check\n\ntask->signal == NULL is not possible, so no need for these checks.\n\nSuggested-by: Oleg Nesterov <oleg@redhat.com>\nReviewed-by: Oleg Nesterov <oleg@redhat.com>\nSigned-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>\nAcked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nmodified for HTC kernel from Linux 3.4+ by faux123","distinct":true,"url":"https://api.github.com/repos/Decatf/android_kernel_samsung_p4/commits/71b522d111ed89ea5e5506a6f63d865f4c371171"}]}