{"push_id":915704504,"size":127,"distinct_size":127,"ref":"refs/heads/zram_new","head":"a90d816f6f0953837db50ca904ad79201122b79c","before":"e3c79c6cf4444cce083eecbdea59bb4d3a1d2ec8","commits":[{"sha":"deed367344fbd115dffa1bc68d7fd609b67f5a81","author":{"email":"81d350bdba3c00ffd4ee275b8b38db13ebdb86e1@gmail.com","name":"Jason Riordan"},"message":"Squash revert of all previous zram work\n\n* This reverts all of our changes to zram/zsmalloc\n  and puts us back to provided ASUS 2.20.40.xx kernel sources\n\n* zram has made it into aosp kernel/common for 3.10\n  and we will follow that going forward\n\nRevert \"defconfig: regenerate & enable LZ4 compression for zram\"\n\nThis reverts commit c87c49526e1a4329e3b1542a4d4eb899da4311ab.\n\nRevert \"Revert \"staging: zsmalloc: Rename page_mapcount_reset\"\"\n\nThis reverts commit be7d59a693ab27fc21528e25393852d662947cad.\n\nRevert \"zram: switch to lz4 as default commpressor\"\n\nThis reverts commit 967d61be1ce10f18ae409735f981334cb3f1de31.\n\nRevert \"lz4: add overrun checks to lz4_uncompress_unknownoutputsize()\"\n\nThis reverts commit 674eb23b59682d8f5641cda8252f35da3bdc2c3a.\n\nRevert \"lz4: fix another possible overrun\"\n\nThis reverts commit 2ed89dd377a1c3bc3fb8f9401c1d1e4f30437cef.\n\nRevert \"lz4: ensure length does not wrap\"\n\nThis reverts commit 54ae383aba3a2f953244a6ca044c55be967a8ea0.\n\nRevert \"lz4: fix compression/decompression signedness mismatch\"\n\nThis reverts commit ad25c6b04ad7bc249168d1cb8a4c9ac9d455e63f.\n\nRevert \"lib/lz4: correct the LZ4 license\"\n\nThis reverts commit fe47e6cdcf34799dc5eee2e51c415b49007d4c52.\n\nRevert \"lib: add lz4 compressor module\"\n\nThis reverts commit 1da8d7e5b8ea10e21792e1c430306977a074bfb1.\n\nRevert \"lib: add support for LZ4-compressed kernel\"\n\nThis reverts commit 7313c241349838e1de930eb15acedea6a71677b2.\n\nRevert \"decompressor: add LZ4 decompressor module\"\n\nThis reverts commit abd28539c9ace3ca36a93e1816a6a55628a3bfad.\n\nRevert \"zram: fix incorrect stat with failed_reads\"\n\nThis reverts commit 49568ecd035eb97413686526c0062ac515f48c9c.\n\nRevert \"zram: replace global tb_lock with fine grain lock\"\n\nThis reverts commit 1036be56c3f4bbdcc2cbdf8d3643167928db24e5.\n\nRevert \"zram: use size_t instead of u16\"\n\nThis reverts commit 19f93b2012f360453ad14004e446218ff54b6672.\n\nRevert \"zram: remove unused SECTOR_SIZE define\"\n\nThis reverts commit 7316b2c6e187e521112b6c6675681d1c289498a8.\n\nRevert \"zram: rename struct `table' to `zram_table_entry'\"\n\nThis reverts commit 3cbc00deb7a59960657f4bf2ebaecc2b78288bea.\n\nRevert \"zram: avoid lockdep splat by revalidate_disk\"\n\nThis reverts commit 8c64f9ee5703acc20e15e0cf052dd017cc2d912b.\n\nRevert \"zram: revalidate disk after capacity change\"\n\nThis reverts commit e9d58dd3c89e5828d40ed05d12f19196b928940a.\n\nRevert \"zram: correct offset usage in zram_bio_discard\"\n\nThis reverts commit 6236077cde7e31fc696488048af54ab12fe06e5e.\n\nRevert \"zram: support REQ_DISCARD\"\n\nThis reverts commit f52685caa47d0c3d456cfaf06ad3d589712fd336.\n\nRevert \"zram: use scnprintf() in attrs show() methods\"\n\nThis reverts commit 44775261a82cef16272197e4933d59bc37b7d5dd.\n\nRevert \"zram: propagate error to user\"\n\nThis reverts commit 06b253bdb75d9def602d51f0830fc3fecc59e399.\n\nRevert \"zram: return error-valued pointer from zcomp_create()\"\n\nThis reverts commit 2958a2870c1f113dfe37a18f27f2b562b857ea8d.\n\nRevert \"zram: move comp allocation out of init_lock\"\n\nThis reverts commit c63f2a3b5c4f0fbeb6f323d3b6eaceaf51beb3be.\n\nRevert \"zram: add lz4 algorithm backend\"\n\nThis reverts commit 1a1c95647253def453c4bfc6e5bd3eb6c3a560ed.\n\nRevert \"zram: make compression algorithm selection possible\"\n\nThis reverts commit ac37d6d33d03856d25fa313434dafb088a165667.\n\nRevert \"zram: add set_max_streams knob\"\n\nThis reverts commit 13bdbf7836d932659329b49434041cc83687ba5b.\n\nRevert \"zram: add multi stream functionality\"\n\nThis reverts commit 3f4fe4af6b1f122df50f4dabcdac449e708284b3.\n\nRevert \"zram: document failed_reads, failed_writes stats\"\n\nThis reverts commit d2c4735bd6f598af21af8ed9c1825552de68e423.\n\nRevert \"zram: factor out single stream compression\"\n\nThis reverts commit 17da440f4d3b9c17b486f28398f9d8ae9e197c15.\n\nRevert \"zram: use zcomp compressing backends\"\n\nThis reverts commit f1832c86f0f853fb1370a76e5c8c3e5b4d4f0756.\n\nRevert \"zram: introduce compressing backend abstraction\"\n\nThis reverts commit 15e87ce4fa5c4a80e93246adedf6ff3f568de764.\n\nRevert \"zram: delete zram_init_device()\"\n\nThis reverts commit f8b250ae436a45e28919d47196035c5f19a885ad.\n\nRevert \"zram: move zram size warning to documentation\"\n\nThis reverts commit 26c9a836f45c1192e5c7fe3c6ff559f561077d81.\n\nRevert \"zram: drop not used table `count' member\"\n\nThis reverts commit 69f1b655fc1f0b645f219e978ec4042040ea3167.\n\nRevert \"zram: report failed read and write stats\"\n\nThis reverts commit 836bc5ed9c294db20d3613a13c96ba03d2cfaa4f.\n\nRevert \"zram: remove zram stats code duplication\"\n\nThis reverts commit 313562a2d76268fa5bc4c6a8730bec20ad74f4ce.\n\nRevert \"zram: use atomic64_t for all zram stats\"\n\nThis reverts commit f545b0c757f48125a41037babd28cd005bc3c437.\n\nRevert \"zram: remove good and bad compress stats\"\n\nThis reverts commit bf503f1f45859c453122d6eca6965b9da8c46d3d.\n\nRevert \"zram: do not pass rw argument to __zram_make_request()\"\n\nThis reverts commit dd0cd4e32392075e03ebe8d3337047045e291e99.\n\nRevert \"zram: drop `init_done' struct zram member\"\n\nThis reverts commit bc6588aeeb3ce95cf822e12b0e0036b5d6423274.\n\nRevert \"zram: avoid null access when fail to alloc meta\"\n\nThis reverts commit 93d977352492a10c515449199ba224d42e905508.\n\nRevert \"zram: remove zram->lock in read path and change it with mutex\"\n\nThis reverts commit c7e4e0a80fe2d2dc2c15ed516f5c018642cb6627.\n\nRevert \"zram: remove workqueue for freeing removed pending slot\"\n\nThis reverts commit 4fc54a4dd399db3aeec69d299bb6c40df680ff0a.\n\nRevert \"zram: introduce zram->tb_lock\"\n\nThis reverts commit 1a6dee1a5e3ad1409afd411c0340d0aa3c34725f.\n\nRevert \"zram: use atomic operation for stat\"\n\nThis reverts commit c8f302cf6d9dcd64606727affa884f11fc1d056f.\n\nRevert \"zram: remove unnecessary free\"\n\nThis reverts commit 3dfa36df5b6e30a56b8bebf91e844fd2e516210b.\n\nRevert \"zram: delay pending free request in read path\"\n\nThis reverts commit b6c7b62f0eeb5bf235c216ce3dbeff0202d0320f.\n\nRevert \"zram: fix race between reset and flushing pending work\"\n\nThis reverts commit bea0f83e1a42707c6eff455c0692598a7a843149.\n\nRevert \"zram: add copyright\"\n\nThis reverts commit 9744b0a40882b7f0048dc5af00437ebff7206b06.\n\nRevert \"zram: promote zram from staging\"\n\nThis reverts commit 540a1d561e85a6a0b9780afc7c1ad4632ec96750.\n\nRevert \"zsmalloc: add copyright\"\n\nThis reverts commit 955b56254ff79761b686a74a38bd2b37bf7e1d6d.\n\nRevert \"zsmalloc: move it under mm\"\n\nThis reverts commit 99ef9f597b09bad5241d48cf83a53d1153a1e7b4.\n\nRevert \"Staging: zram: Fix memory leak by refcount mismatch\"\n\nThis reverts commit b98f5d36e2bb74e1c26864d5ae71b179439ac4f8.\n\nRevert \"Staging: zram: Fix access of NULL pointer\"\n\nThis reverts commit ab88688b07ad272353c795fa7d0d98079427ce5f.\n\nRevert \"Staging: zram: Fix variable dereferenced before check\"\n\nThis reverts commit 1a7e67bf8c42c2a29a043ecaa1ab6963096bd29b.\n\nRevert \"Revert \"staging: zram: Add auto loading of module if user opens /dev/zram.\"\"\n\nThis reverts commit 958d80bd5c3e8e790a388e6bf68391d96555c381.\n\nRevert \"zsmalloc: add more comment\"\n\nThis reverts commit 3b155a0a5026e06d2d6feda9695aad516f54bd57.\n\nRevert \"zsmalloc: add Kconfig for enabling page table method\"\n\nThis reverts commit c778b8168343655b527b17f3b7c2b6ac724bdcad.\n\nRevert \"staging: zsmalloc: Ensure handle is never 0 on success\"\n\nThis reverts commit 3a8a9d223837f58265aed78084b050cfef0e33a3.\n\nRevert \"staging: zsmalloc: Rename page_mapcount_reset\"\n\nThis reverts commit e95555cbd81518fd5d8e8a55388fd18e4818d6d0.\n\nRevert \"staging: zsmalloc: access page->private by using page_private macro\"\n\nThis reverts commit 19bb5af02f40f35181c5a6bb2c6c4fee10a84cec.\n\nRevert \"staging/zsmalloc: Fixed up incorrect formatted comments\"\n\nThis reverts commit b70c920efab5f65217a17ec52aefbb0a136442eb.\n\nRevert \"Staging: Fixes string split across lines in zsmalloc zsmalloc-main\"\n\nThis reverts commit 8e1322f8ee4b881e139d75f751a8de6b5542308b.\n\nRevert \"Reset zram to 6830384 (HTC msm8960 kernel prior to patching up)\"\n\nThis reverts commit a5ff10ded8a5abece235875763ae06cd3d540665.\n\nChange-Id: I1345bf67dafa545755baa01f135ac8294ce65617","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/deed367344fbd115dffa1bc68d7fd609b67f5a81"},{"sha":"c9ff0a464a5458556261a1bf4af3313f1da37ad5","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: move it under mm\n\n(cherry pick from bcf1647d0899666f0fb90d176abf63bae22abb7c)\n\nThis patch moves zsmalloc under mm directory.\n\nBefore that, description will explain why we have needed custom\nallocator.\n\nZsmalloc is a new slab-based memory allocator for storing compressed\npages.  It is designed for low fragmentation and high allocation success\nrate on large object, but <= PAGE_SIZE allocations.\n\nzsmalloc differs from the kernel slab allocator in two primary ways to\nachieve these design goals.\n\nzsmalloc never requires high order page allocations to back slabs, or\n\"size classes\" in zsmalloc terms.  Instead it allows multiple\nsingle-order pages to be stitched together into a \"zspage\" which backs\nthe slab.  This allows for higher allocation success rate under memory\npressure.\n\nAlso, zsmalloc allows objects to span page boundaries within the zspage.\nThis allows for lower fragmentation than could be had with the kernel\nslab allocator for objects between PAGE_SIZE/2 and PAGE_SIZE.  With the\nkernel slab allocator, if a page compresses to 60% of it original size,\nthe memory savings gained through compression is lost in fragmentation\nbecause another object of the same size can't be stored in the leftover\nspace.\n\nThis ability to span pages results in zsmalloc allocations not being\ndirectly addressable by the user.  The user is given an\nnon-dereferencable handle in response to an allocation request.  That\nhandle must be mapped, using zs_map_object(), which returns a pointer to\nthe mapped region that can be used.  The mapping is necessary since the\nobject data may reside in two different noncontigious pages.\n\nThe zsmalloc fulfills the allocation needs for zram perfectly\n\n[sjenning@linux.vnet.ibm.com: borrow Seth's quote]\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Nitin Gupta <ngupta@vflare.org>\nReviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>\nCc: Bob Liu <bob.liu@oracle.com>\nCc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nCc: Hugh Dickins <hughd@google.com>\nCc: Jens Axboe <axboe@kernel.dk>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Mel Gorman <mgorman@suse.de>\nCc: Pekka Enberg <penberg@kernel.org>\nCc: Rik van Riel <riel@redhat.com>\nCc: Seth Jennings <sjenning@linux.vnet.ibm.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I7b7923baeb9989e002523c66696e4a98fb357c46","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/c9ff0a464a5458556261a1bf4af3313f1da37ad5"},{"sha":"ae636ee8c12ae587457944116c5ad47f751dbebe","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: promote zram from staging\n\n(cherry pick from commit cd67e10ac6997c6d1e1504e3c111b693bfdbc148)\n\nZram has lived in staging for a LONG LONG time and have been\nfixed/improved by many contributors so code is clean and stable now.  Of\ncourse, there are lots of product using zram in real practice.\n\nThe major TV companys have used zram as swap since two years ago and\nrecently our production team released android smart phone with zram\nwhich is used as swap, too and recently Android Kitkat start to use zram\nfor small memory smart phone.  And there was a report Google released\ntheir ChromeOS with zram, too and cyanogenmod have been used zram long\ntime ago.  And I heard some disto have used zram block device for tmpfs.\nIn addition, I saw many report from many other peoples.  For example,\nLubuntu start to use it.\n\nThe benefit of zram is very clear.  With my experience, one of the\nbenefit was to remove jitter of video application with backgroud memory\npressure.  It would be effect of efficient memory usage by compression\nbut more issue is whether swap is there or not in the system.  Recent\nmobile platforms have used JAVA so there are many anonymous pages.  But\nembedded system normally are reluctant to use eMMC or SDCard as swap\nbecause there is wear-leveling and latency issues so if we do not use\nswap, it means we can't reclaim anoymous pages and at last, we could\nencounter OOM kill.  :(\n\nAlthough we have real storage as swap, it was a problem, too.  Because\nit sometime ends up making system very unresponsible caused by slow swap\nstorage performance.\n\nQuote from Luigi on Google\n \"Since Chrome OS was mentioned: the main reason why we don't use swap\n  to a disk (rotating or SSD) is because it doesn't degrade gracefully\n  and leads to a bad interactive experience.  Generally we prefer to\n  manage RAM at a higher level, by transparently killing and restarting\n  processes.  But we noticed that zram is fast enough to be competitive\n  with the latter, and it lets us make more efficient use of the\n  available RAM.  \" and he announced.\nhttp://www.spinics.net/lists/linux-mm/msg57717.html\n\nOther uses case is to use zram for block device.  Zram is block device\nso anyone can format the block device and mount on it so some guys on\nthe internet start zram as /var/tmp.\nhttp://forums.gentoo.org/viewtopic-t-838198-start-0.html\n\nLet's promote zram and enhance/maintain it instead of removing.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nReviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>\nAcked-by: Nitin Gupta <ngupta@vflare.org>\nAcked-by: Pekka Enberg <penberg@kernel.org>\nCc: Bob Liu <bob.liu@oracle.com>\nCc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nCc: Hugh Dickins <hughd@google.com>\nCc: Jens Axboe <axboe@kernel.dk>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Mel Gorman <mgorman@suse.de>\nCc: Rik van Riel <riel@redhat.com>\nCc: Seth Jennings <sjenning@linux.vnet.ibm.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ie338290523af86fc4401a1560920de1b71100152","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/ae636ee8c12ae587457944116c5ad47f751dbebe"},{"sha":"cd5d4e145dfe9016e82ec0507182b22f2aa6f418","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: add copyright\n\n(cherry pick from commit 31fc00bb788ffde7d8d861d8b2bba798ab445992)\n\nAdd my copyright to the zsmalloc source code which I maintain.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ic4137129666be7a6a383ed8b9c929ee97b6cc9fc","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/cd5d4e145dfe9016e82ec0507182b22f2aa6f418"},{"sha":"6bdd8a0b8e34fc0266a14d93381296e1b8cd91f0","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: remove old private project comment\n\n(cherry pick from commit 49061236a9c2e18b31617cef10d27ba136068bac)\n\nRemove the old private compcache project address so upcoming patches\nshould be sent to LKML because we Linux kernel community will take care.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I00c2876712ef4c65e8b0cd2f77774d617048268f","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/6bdd8a0b8e34fc0266a14d93381296e1b8cd91f0"},{"sha":"e1c3a8ba35428e8e508cabaf223c8125b00b71b2","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: add copyright\n\n(cherry pick from commit 7bfb3de8a1b3bebc2dc68d381efe27448c0584c5)\n\nAdd my copyright to the zram source code which I maintain.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ie6353ef599481e2681bac62f85a2673d6f51b271","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/e1c3a8ba35428e8e508cabaf223c8125b00b71b2"},{"sha":"4d27083c9c2ca63b3fa4a9119df9ef9d0017036b","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: fix race between reset and flushing pending work\n\n(cherry pick from commit da4a04126baa3be03bc566d4a2ee0944c5e783d0)\n\nDan and Sergey reported that there is a racy between reset and flushing\nof pending work so that it could make oops by freeing zram->meta in\nreset while zram_slot_free can access zram->meta if new request is\nadding during the race window.\n\nThis patch moves flush after taking init_lock so it prevents new request\nso that it closes the race.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nReported-by: Dan Carpenter <dan.carpenter@oracle.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nTested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: <stable@vger.kernel.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ib5fb789b4fb7a5892b934ab10ebeae12fcf7742f","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/4d27083c9c2ca63b3fa4a9119df9ef9d0017036b"},{"sha":"ae615cbab3d8392f865dce1706a2f064466257f1","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: use atomic operation for stat\n\n(cherry pick from commit deb0bdeb2f3d6b81d37fc778316dae46b6daab56)\n\nSome of fields in zram->stats are protected by zram->lock which is\nrather coarse-grained so let's use atomic operation without explict\nlocking.\n\nThis patch is ready for removing dependency of zram->lock in read path\nwhich is very coarse-grained rw_semaphore.  Of course, this patch adds\nnew atomic operation so it might make slow but my 12CPU test couldn't\nspot any regression.  All gain/lose is marginal within stddev.\n\n  iozone -t -T -l 12 -u 12 -r 16K -s 60M -I +Z -V 0\n\n  ==Initial write                ==Initial write\n  records: 50                    records: 50\n  avg:  412875.17                avg:  415638.23\n  std:   38543.12 (9.34%)        std:   36601.11 (8.81%)\n  max:  521262.03                max:  502976.72\n  min:  343263.13                min:  351389.12\n  ==Rewrite                      ==Rewrite\n  records: 50                    records: 50\n  avg:  416640.34                avg:  397914.33\n  std:   60798.92 (14.59%)       std:   46150.42 (11.60%)\n  max:  543057.07                max:  522669.17\n  min:  304071.67                min:  316588.77\n  ==Read                         ==Read\n  records: 50                    records: 50\n  avg: 4147338.63                avg: 4070736.51\n  std:  179333.25 (4.32%)        std:  223499.89 (5.49%)\n  max: 4459295.28                max: 4539514.44\n  min: 3753057.53                min: 3444686.31\n  ==Re-read                      ==Re-read\n  records: 50                    records: 50\n  avg: 4096706.71                avg: 4117218.57\n  std:  229735.04 (5.61%)        std:  171676.25 (4.17%)\n  max: 4430012.09                max: 4459263.94\n  min: 2987217.80                min: 3666904.28\n  ==Reverse Read                 ==Reverse Read\n  records: 50                    records: 50\n  avg: 4062763.83                avg: 4078508.32\n  std:  186208.46 (4.58%)        std:  172684.34 (4.23%)\n  max: 4401358.78                max: 4424757.22\n  min: 3381625.00                min: 3679359.94\n  ==Stride read                  ==Stride read\n  records: 50                    records: 50\n  avg: 4094933.49                avg: 4082170.22\n  std:  185710.52 (4.54%)        std:  196346.68 (4.81%)\n  max: 4478241.25                max: 4460060.97\n  min: 3732593.23                min: 3584125.78\n  ==Random read                  ==Random read\n  records: 50                    records: 50\n  avg: 4031070.04                avg: 4074847.49\n  std:  192065.51 (4.76%)        std:  206911.33 (5.08%)\n  max: 4356931.16                max: 4399442.56\n  min: 3481619.62                min: 3548372.44\n  ==Mixed workload               ==Mixed workload\n  records: 50                    records: 50\n  avg:  149925.73                avg:  149675.54\n  std:    7701.26 (5.14%)        std:    6902.09 (4.61%)\n  max:  191301.56                max:  175162.05\n  min:  133566.28                min:  137762.87\n  ==Random write                 ==Random write\n  records: 50                    records: 50\n  avg:  404050.11                avg:  393021.47\n  std:   58887.57 (14.57%)       std:   42813.70 (10.89%)\n  max:  601798.09                max:  524533.43\n  min:  325176.99                min:  313255.34\n  ==Pwrite                       ==Pwrite\n  records: 50                    records: 50\n  avg:  411217.70                avg:  411237.96\n  std:   43114.99 (10.48%)       std:   33136.29 (8.06%)\n  max:  530766.79                max:  471899.76\n  min:  320786.84                min:  317906.94\n  ==Pread                        ==Pread\n  records: 50                    records: 50\n  avg: 4154908.65                avg: 4087121.92\n  std:  151272.08 (3.64%)        std:  219505.04 (5.37%)\n  max: 4459478.12                max: 4435857.38\n  min: 3730512.41                min: 3101101.67\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nTested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Jerome Marchand <jmarchan@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ia5c5ae7a9642ab9d498140588b6ca34c075013ca","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/ae615cbab3d8392f865dce1706a2f064466257f1"},{"sha":"01d43ea3824a440a54e8718dcf43dda25d5cf362","author":{"email":"95fa41a9413662e176c48c0be293e461a4775728@samsung.com","name":"Sunghan Suh"},"message":"zram: prevent data loss in error cases of function zram_bvec_write()\n\n(cherry pick from commit f40ac2ae1b506484dd9261a24bbf3e86b2206ff8)\n\nIn function zram_bvec_write(), previous data at the index is\nalready freed by function zram_free_page().\nWhen failed to compress or zs_malloc, there is no way to restore old data.\nTherefore, free previous data when it's about to update.\n\nAlso, no need to check whether table is not empty outside of\nfunction zram_free_page(), because the function properly checks inside.\n\nSigned-off-by: Sunghan Suh <sunghan.suh@samsung.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nBug: 24810447\nChange-Id: Ib0361b2c60fd42ce8e03ee8b6ed5ab54b56a25c0","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/01d43ea3824a440a54e8718dcf43dda25d5cf362"},{"sha":"5f130da24c19e3d92c620cd26517f5eb0d272088","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: introduce zram->tb_lock\n\n(cherry pick from commit 92967471b67163bb1654e9b7fe99449ab70a4aaa)\n\nCurrently, the zram table is protected by zram->lock but it's rather\ncoarse-grained lock and it makes hard for scalibility.\n\nLet's use own rwlock instead of depending on zram->lock.  This patch\nadds new locking so obviously, it would make slow but this patch is just\nprepartion for removing coarse-grained rw_semaphore(ie, zram->lock)\nwhich is hurdle about zram scalability.\n\nFinal patch in this patchset series will remove the lock from read-path\nand change rw_semaphore with mutex in write path.  With bonus, we could\ndrop pending slot free mess in next patch.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nTested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Jerome Marchand <jmarchan@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I597475b88083d07fc45af4fd9d2c551cda4f513c","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/5f130da24c19e3d92c620cd26517f5eb0d272088"},{"sha":"c7c632a530a7ce546f84ef47cc9f9e477f1a0d31","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: remove workqueue for freeing removed pending slot\n\n(cherry pick from commit f614a9f48dedd2b80d1dc8bae8094842fcdb39dd)\n\nCommit a0c516cbfc74 (\"zram: don't grab mutex in zram_slot_free_noity\")\nintroduced free request pending code to avoid scheduling by mutex under\nspinlock and it was a mess which made code lenghty and increased\noverhead.\n\nNow, we don't need zram->lock any more to free slot so this patch\nreverts it and then, tb_lock should protect it.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nTested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Jerome Marchand <jmarchan@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I9682d6f62d517612030e8466d3d93703793bc24b","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/c7c632a530a7ce546f84ef47cc9f9e477f1a0d31"},{"sha":"ee3875d713f6fa5fedcc5c6f27d4d9f3aefbdba7","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: remove zram->lock in read path and change it with mutex\n\n(cherry pick from commit e46e33152eb82b8e2db7ffb3790a2a2653c34513)\n\nFinally, we separated zram->lock dependency from 32bit stat/ table\nhandling so there is no reason to use rw_semaphore between read and\nwrite path so this patch removes the lock from read path totally and\nchanges rw_semaphore with mutex.  So, we could do\n\nold:\n\n  read-read: OK\n  read-write: NO\n  write-write: NO\n\nNow:\n\n  read-read: OK\n  read-write: OK\n  write-write: NO\n\nThe below data proves mixed workload performs well 11 times and there is\nalso enhance on write-write path because current rw-semaphore doesn't\nsupport SPIN_ON_OWNER.  It's side effect but anyway good thing for us.\n\nWrite-related tests perform better (from 61% to 1058%) but read path has\ngood/bad(from -2.22% to 1.45%) but they are all marginal within stddev.\n\n  CPU 12\n  iozone -t -T -l 12 -u 12 -r 16K -s 60M -I +Z -V 0\n\n  ==Initial write                ==Initial write\n  records: 10                    records: 10\n  avg:  516189.16                avg:  839907.96\n  std:   22486.53 (4.36%)        std:   47902.17 (5.70%)\n  max:  546970.60                max:  909910.35\n  min:  481131.54                min:  751148.38\n  ==Rewrite                      ==Rewrite\n  records: 10                    records: 10\n  avg:  509527.98                avg: 1050156.37\n  std:   45799.94 (8.99%)        std:   40695.44 (3.88%)\n  max:  611574.27                max: 1111929.26\n  min:  443679.95                min:  980409.62\n  ==Read                         ==Read\n  records: 10                    records: 10\n  avg: 4408624.17                avg: 4472546.76\n  std:  281152.61 (6.38%)        std:  163662.78 (3.66%)\n  max: 4867888.66                max: 4727351.03\n  min: 4058347.69                min: 4126520.88\n  ==Re-read                      ==Re-read\n  records: 10                    records: 10\n  avg: 4462147.53                avg: 4363257.75\n  std:  283546.11 (6.35%)        std:  247292.63 (5.67%)\n  max: 4912894.44                max: 4677241.75\n  min: 4131386.50                min: 4035235.84\n  ==Reverse Read                 ==Reverse Read\n  records: 10                    records: 10\n  avg: 4565865.97                avg: 4485818.08\n  std:  313395.63 (6.86%)        std:  248470.10 (5.54%)\n  max: 5232749.16                max: 4789749.94\n  min: 4185809.62                min: 3963081.34\n  ==Stride read                  ==Stride read\n  records: 10                    records: 10\n  avg: 4515981.80                avg: 4418806.01\n  std:  211192.32 (4.68%)        std:  212837.97 (4.82%)\n  max: 4889287.28                max: 4686967.22\n  min: 4210362.00                min: 4083041.84\n  ==Random read                  ==Random read\n  records: 10                    records: 10\n  avg: 4410525.23                avg: 4387093.18\n  std:  236693.22 (5.37%)        std:  235285.23 (5.36%)\n  max: 4713698.47                max: 4669760.62\n  min: 4057163.62                min: 3952002.16\n  ==Mixed workload               ==Mixed workload\n  records: 10                    records: 10\n  avg:  243234.25                avg: 2818677.27\n  std:   28505.07 (11.72%)       std:  195569.70 (6.94%)\n  max:  288905.23                max: 3126478.11\n  min:  212473.16                min: 2484150.69\n  ==Random write                 ==Random write\n  records: 10                    records: 10\n  avg:  555887.07                avg: 1053057.79\n  std:   70841.98 (12.74%)       std:   35195.36 (3.34%)\n  max:  683188.28                max: 1096125.73\n  min:  437299.57                min:  992481.93\n  ==Pwrite                       ==Pwrite\n  records: 10                    records: 10\n  avg:  501745.93                avg:  810363.09\n  std:   16373.54 (3.26%)        std:   19245.01 (2.37%)\n  max:  518724.52                max:  833359.70\n  min:  464208.73                min:  765501.87\n  ==Pread                        ==Pread\n  records: 10                    records: 10\n  avg: 4539894.60                avg: 4457680.58\n  std:  197094.66 (4.34%)        std:  188965.60 (4.24%)\n  max: 4877170.38                max: 4689905.53\n  min: 4226326.03                min: 4095739.72\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nTested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Jerome Marchand <jmarchan@redhat.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Id52a2ef5b60088dbe03050d581a99fd67ac8b96f","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/ee3875d713f6fa5fedcc5c6f27d4d9f3aefbdba7"},{"sha":"b882bf1de7630ab3706c81e0befb96dd2735cb20","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: avoid null access when fail to alloc meta\n\n(cherry pick from commit db5d711e2db776f18219b033e5dc4fb7e4264dd7)\n\nzram_meta_alloc could fail so caller should check it.  Otherwise, your\nsystem will hang.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: <stable@vger.kernel.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Iba3a0fb8b26c5d9964b7716bfee1844a3896088d","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/b882bf1de7630ab3706c81e0befb96dd2735cb20"},{"sha":"7ed347f9e0ff2e6fafdb2d3795b9d61f14c4c50c","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: drop `init_done' struct zram member\n\n(cherry pick from commit be2d1d56c82d8cf20e6c77515eb499f8e86eb5be)\n\nIntroduce init_done() helper function which allows us to drop `init_done'\nstruct zram member.  init_done() uses the fact that ->init_done == 1\nequals to ->meta != NULL.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Id59b264680627e7c8fb6966f2e115acbb15c5ffe","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/7ed347f9e0ff2e6fafdb2d3795b9d61f14c4c50c"},{"sha":"23fcbc89d9a282cbf33aaf71c1cb5b13140395fa","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: do not pass rw argument to __zram_make_request()\n\n(cherry pick from commit be257c61306750d11c20d2ac567bf63304c696a3)\n\nDo not pass rw argument down the __zram_make_request() -> zram_bvec_rw()\nchain, decode it in zram_bvec_rw() instead.  Besides, this is the place\nwhere we distinguish READ and WRITE bio data directions, so account zram\nRW stats here, instead of __zram_make_request().  This also allows to\naccount a real number of zram READ/WRITE operations, not just requests\n(single RW request may cause a number of zram RW ops with separate\nlocking, compression/decompression, etc).\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Icc018a740548fff44d72eba24a20527738c3b53c","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/23fcbc89d9a282cbf33aaf71c1cb5b13140395fa"},{"sha":"02878e0e9bf778edee6792e5eb625565ba7bf619","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: remove good and bad compress stats\n\n(cherry pick from commit b7cccf8b4009bf74df61f3c9d86b95fabd807c11)\n\nRemove `good' and `bad' compressed sub-requests stats.  RW request may\ncause a number of RW sub-requests.  zram used to account `good' compressed\nsub-queries (with compressed size less than 50% of original size), `bad'\ncompressed sub-queries (with compressed size greater that 75% of original\nsize), leaving sub-requests with compression size between 50% and 75% of\noriginal size not accounted and not reported.  zram already accounts each\nsub-request's compression size so we can calculate real device compression\nratio.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I959bece2cb1473fdb65b202a6a7d4a306e29f2ee","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/02878e0e9bf778edee6792e5eb625565ba7bf619"},{"sha":"0116a108ef187b5f96f752e1e6583fdc6f0b44b6","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: use atomic64_t for all zram stats\n\n(cherry pick from commit 90a7806ea9b9f7cb4751859cc2506e2d80e36ef1)\n\nThis is a preparation patch for stats code duplication removal.\n\n1) use atomic64_t for `pages_zero' and `pages_stored' zram stats.\n\n2) `compr_size' and `pages_zero' struct zram_stats members did not\n   follow the existing device attr naming scheme: zram_stats.ATTR has\n   ATTR_show() function.  rename them:\n\n   -- compr_size -> compr_data_size\n   -- pages_zero -> zero_pages\n\nMinchan Kim's note:\n If we really have trouble with atomic stat operation, we could\n change it with percpu_counter so that it could solve atomic overhead and\n unnecessary memory space by introducing unsigned long instead of 64bit\n atomic_t.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I3a129a8fa8dd7648fc35f3c7dcf67e6b7e2d2ac6","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/0116a108ef187b5f96f752e1e6583fdc6f0b44b6"},{"sha":"d177337b9d7e000e9f9113dd185e5be2b2a68646","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: remove zram stats code duplication\n\n(cherry pick from commit a68eb3b65e658406d386bebef02277f4007b2f45)\n\nIntroduce ZRAM_ATTR_RO macro that generates device_attribute and default\nATTR show() function for existing atomic64_t zram stats.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ib1b65be36fc70779790023972168c08048e39fbc","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/d177337b9d7e000e9f9113dd185e5be2b2a68646"},{"sha":"3fdc8c1544de98d099bdae499e3532c800f8f0c8","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: report failed read and write stats\n\n(cherry pick from commit 6444724939db5de7390c90f7b4a657159b3b4465)\n\nzram accounted but did not report numbers of failed read and write\nqueries.  make these stats available as failed_reads and failed_writes\nattrs.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I5022b8e485c748dc257b7d637a1c24c918fddbe8","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/3fdc8c1544de98d099bdae499e3532c800f8f0c8"},{"sha":"6700c1dfdea2987de14b879bd5e691f8ff19f9fd","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: drop not used table `count' member\n\n(cherry pick from commit 59fc86a4922f1a1c0f69eac758a7e2b2b138aab4)\n\nstruct table `count' member is not used.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Nitin Gupta <ngupta@vflare.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ifeadc3ea1e72ba83fba5fc0b0753d461e8b8b84c","distinct":true,"url":"https://api.github.com/repos/jrior001/android_kernel_asus_moorefield/commits/6700c1dfdea2987de14b879bd5e691f8ff19f9fd"}]}