{"push_id":789591100,"size":32,"distinct_size":32,"ref":"refs/heads/exp","head":"0ad6cd8aad9c917d8955e830ed602930fbac4f35","before":"e72cc9d6c41f8e0dc7f37359143fb31c765d8830","commits":[{"sha":"d4c5a758cbb255434dc42421ba0a280a4e17f43f","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: decouple handle and object\n\nRecently, we started to use zram heavily and some of issues\npopped.\n\n1) external fragmentation\n\nI got a report from Juneho Choi that fork failed although there are plenty\nof free pages in the system.  His investigation revealed zram is one of\nthe culprit to make heavy fragmentation so there was no more contiguous\n16K page for pgd to fork in the ARM.\n\n2) non-movable pages\n\nOther problem of zram now is that inherently, user want to use zram as\nswap in small memory system so they use zRAM with CMA to use memory\nefficiently.  However, unfortunately, it doesn't work well because zRAM\ncannot use CMA's movable pages unless it doesn't support compaction.  I\ngot several reports about that OOM happened with zram although there are\nlots of swap space and free space in CMA area.\n\n3) internal fragmentation\n\nzRAM has started support memory limitation feature to limit memory usage\nand I sent a patchset(https://lkml.org/lkml/2014/9/21/148) for VM to be\nharmonized with zram-swap to stop anonymous page reclaim if zram consumed\nmemory up to the limit although there are free space on the swap.  One\nproblem for that direction is zram has no way to know any hole in memory\nspace zsmalloc allocated by internal fragmentation so zram would regard\nswap is full although there are free space in zsmalloc.  For solving the\nissue, zram want to trigger compaction of zsmalloc before it decides full\nor not.\n\nThis patchset is first step to support above issues.  For that, it adds\nindirect layer between handle and object location and supports manual\ncompaction to solve 3th problem first of all.\n\nAfter this patchset got merged, next step is to make VM aware of zsmalloc\ncompaction so that generic compaction will move zsmalloced-pages\nautomatically in runtime.\n\nIn my imaginary experiment(ie, high compress ratio data with heavy swap\nin/out on 8G zram-swap), data is as follows,\n\nBefore =\nzram allocated object :      60212066 bytes\nzram total used:     140103680 bytes\nratio:         42.98 percent\nMemFree:          840192 kB\n\nCompaction\n\nAfter =\nfrag ratio after compaction\nzram allocated object :      60212066 bytes\nzram total used:      76185600 bytes\nratio:         79.03 percent\nMemFree:          901932 kB\n\nJuneho reported below in his real platform with small aging.\nSo, I think the benefit would be bigger in real aging system\nfor a long time.\n\n- frag_ratio increased 3% (ie, higher is better)\n- memfree increased about 6MB\n- In buddy info, Normal 2^3: 4, 2^2: 1: 2^1 increased, Highmem: 2^1 21 increased\n\nfrag ratio after swap fragment\nused :        156677 kbytes\ntotal:        166092 kbytes\nfrag_ratio :  94\nmeminfo before compaction\nMemFree:           83724 kB\nNode 0, zone   Normal  13642   1364     57     10     61     17      9      5      4      0      0\nNode 0, zone  HighMem    425     29      1      0      0      0      0      0      0      0      0\n\nnum_migrated :  23630\ncompaction done\n\nfrag ratio after compaction\nused :        156673 kbytes\ntotal:        160564 kbytes\nfrag_ratio :  97\nmeminfo after compaction\nMemFree:           89060 kB\nNode 0, zone   Normal  14076   1544     67     14     61     17      9      5      4      0      0\nNode 0, zone  HighMem    863     50      1      0      0      0      0      0      0      0      0\n\nThis patchset adds more logics(about 480 lines) in zsmalloc but when I\ntested heavy swapin/out program, the regression for swapin/out speed is\nmarginal because most of overheads were caused by compress/decompress and\nother MM reclaim stuff.\n\nThis patch (of 7):\n\nCurrently, handle of zsmalloc encodes object's location directly so it\nmakes support of migration hard.\n\nThis patch decouples handle and object via adding indirect layer.  For\nthat, it allocates handle dynamically and returns it to user.  The handle\nis the address allocated by slab allocation so it's unique and we could\nkeep object's location in the memory space allocated for handle.\n\nWith it, we can change object's position without changing handle itself.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Mel Gorman <mel@csn.ul.ie>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/d4c5a758cbb255434dc42421ba0a280a4e17f43f"},{"sha":"3a7d0ab2f11acd9be47b9aa1decf37896d956caa","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: factor out obj_[malloc|free]\n\nIn later patch, migration needs some part of functions in zs_malloc and\nzs_free so this patch factor out them.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Mel Gorman <mel@csn.ul.ie>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/3a7d0ab2f11acd9be47b9aa1decf37896d956caa"},{"sha":"99e0d3b8810cdf520cd7a2ea51816cb0e54994c5","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: support compaction\n\nThis patch provides core functions for migration of zsmalloc.  Migraion\npolicy is simple as follows.\n\nfor each size class {\n        while {\n                src_page = get zs_page from ZS_ALMOST_EMPTY\n                if (!src_page)\n                        break;\n                dst_page = get zs_page from ZS_ALMOST_FULL\n                if (!dst_page)\n                        dst_page = get zs_page from ZS_ALMOST_EMPTY\n                if (!dst_page)\n                        break;\n                migrate(from src_page, to dst_page);\n        }\n}\n\nFor migration, we need to identify which objects in zspage are allocated\nto migrate them out.  We could know it by iterating of freed objects in a\nzspage because first_page of zspage keeps free objects singly-linked list\nbut it's not efficient.  Instead, this patch adds a tag(ie,\nOBJ_ALLOCATED_TAG) in header of each object(ie, handle) so we could check\nwhether the object is allocated easily.\n\nThis patch adds another status bit in handle to synchronize between user\naccess through zs_map_object and migration.  During migration, we cannot\nmove objects user are using due to data coherency between old object and\nnew object.\n\n[akpm@linux-foundation.org: zsmalloc.c needs sched.h for cond_resched()]\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Mel Gorman <mel@csn.ul.ie>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/99e0d3b8810cdf520cd7a2ea51816cb0e54994c5"},{"sha":"1a80b41c976bf149ee5f0fe680b6b9b65a120a32","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: adjust ZS_ALMOST_FULL\n\nCurretly, zsmalloc regards a zspage as ZS_ALMOST_EMPTY if the zspage has\nunder 1/4 used objects(ie, fullness_threshold_frac).  It could make result\nin loose packing since zsmalloc migrates only ZS_ALMOST_EMPTY zspage out.\n\nThis patch changes the rule so that zsmalloc makes zspage which has above\n3/4 used object ZS_ALMOST_FULL so it could make tight packing.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Mel Gorman <mel@csn.ul.ie>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/1a80b41c976bf149ee5f0fe680b6b9b65a120a32"},{"sha":"4a4f63827c637f69654f9b01fad15f33004f006a","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: record handle in page->private for huge object\n\nWe store handle on header of each allocated object so it increases the\nsize of each object by sizeof(unsigned long).\n\nIf zram stores 4096 bytes to zsmalloc(ie, bad compression), zsmalloc needs\n4104B-class to add handle.\n\nHowever, 4104B-class has 1-pages_per_zspage so wasted size by internal\nfragment is 8192 - 4104, which is terrible.\n\nSo this patch records the handle in page->private on such huge object(ie,\npages_per_zspage == 1 && maxobj_per_zspage == 1) instead of header of each\nobject so we could use 4096B-class, not 4104B-class.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Mel Gorman <mel@csn.ul.ie>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/4a4f63827c637f69654f9b01fad15f33004f006a"},{"sha":"3b2e866ca179dcdbe62faa34f0f3aa3409306b74","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: add fullness into stat\n\nDuring investigating compaction, fullness information of each class is\nhelpful for investigating how the compaction works well.  With that, we\ncould know how compaction works well more clear on each size class.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Mel Gorman <mel@csn.ul.ie>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/3b2e866ca179dcdbe62faa34f0f3aa3409306b74"},{"sha":"c8b56050222c89fc3f3db40925a9aae522ef3919","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: zsmalloc documentation\n\nCreate zsmalloc doc which explains design concept and stat information.\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/c8b56050222c89fc3f3db40925a9aae522ef3919"},{"sha":"949078b7abbd8dfd7f880da256f2bffed466f059","author":{"email":"842623aaa6886395f571cb9eedae2d71709d8fe9@samsung.com","name":"Yinghao Xie"},"message":"mm/zsmalloc.c: fix comment for get_pages_per_zspage\n\nSigned-off-by: Yinghao Xie <yinghao.xie@sumsung.com>\nSuggested-by: Minchan Kim <minchan@kernel.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/949078b7abbd8dfd7f880da256f2bffed466f059"},{"sha":"b272c36604e3a7587dfd88c07af053c8acb6ee7d","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zsmalloc: remove synchronize_rcu from zs_compact()\n\nDo not synchronize rcu in zs_compact(). Neither zsmalloc not\nzram use rcu.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/b272c36604e3a7587dfd88c07af053c8acb6ee7d"},{"sha":"9937c55efccbf9032f38790674dbd74c5b76fa74","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zsmalloc: micro-optimize zs_object_copy()\n\nA micro-optimization.  Avoid additional branching and reduce (a bit)\nregistry pressure (f.e.  s_off += size; d_off += size; may be calculated\ntwise: first for >= PAGE_SIZE check and later for offset update in \"else\"\nclause).\n\nscripts/bloat-o-meter shows some improvement\n\nadd/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)\nfunction                          old     new   delta\nzs_object_copy                    550     540     -10\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/9937c55efccbf9032f38790674dbd74c5b76fa74"},{"sha":"f569256a4798b6524faafbfc02f9a24a79da0806","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zsmalloc: remove unnecessary insertion/removal of zspage in compaction\n\nIn putback_zspage, we don't need to insert a zspage into list of zspage\nin size_class again to just fix fullness group. We could do directly\nwithout reinsertion so we could save some instuctions.\n\nReported-by: Heesub Shin <heesub.shin@samsung.com>\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Ganesh Mahendran <opensource.ganesh@gmail.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Juneho Choi <juno.choi@lge.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/f569256a4798b6524faafbfc02f9a24a79da0806"},{"sha":"76feb12d2ee356be513acddca8d6ffac1caaff5c","author":{"email":"45471ea77bd08f3d26635f3f5adb40ba41250a2b@samsung.com","name":"Heesub Shin"},"message":"zsmalloc: fix fatal corruption due to wrong size class selection\n\nThere is no point in overriding the size class below.  It causes fatal\ncorruption on the next chunk on the 3264-bytes size class, which is the\nlast size class that is not huge.\n\nFor example, if the requested size was exactly 3264 bytes, current\nzsmalloc allocates and returns a chunk from the size class of 3264 bytes,\nnot 4096.  User access to this chunk may overwrite head of the next\nadjacent chunk.\n\nHere is the panic log captured when freelist was corrupted due to this:\n\n    Kernel BUG at ffffffc00030659c [verbose debug info unavailable]\n    Internal error: Oops - BUG: 96000006 [#1] PREEMPT SMP\n    Modules linked in:\n    exynos-snapshot: core register saved(CPU:5)\n    CPUMERRSR: 0000000000000000, L2MERRSR: 0000000000000000\n    exynos-snapshot: context saved(CPU:5)\n    exynos-snapshot: item - log_kevents is disabled\n    CPU: 5 PID: 898 Comm: kswapd0 Not tainted 3.10.61-4497415-eng #1\n    task: ffffffc0b8783d80 ti: ffffffc0b71e8000 task.ti: ffffffc0b71e8000\n    PC is at obj_idx_to_offset+0x0/0x1c\n    LR is at obj_malloc+0x44/0xe8\n    pc : [<ffffffc00030659c>] lr : [<ffffffc000306604>] pstate: a0000045\n    sp : ffffffc0b71eb790\n    x29: ffffffc0b71eb790 x28: ffffffc00204c000\n    x27: 000000000001d96f x26: 0000000000000000\n    x25: ffffffc098cc3500 x24: ffffffc0a13f2810\n    x23: ffffffc098cc3501 x22: ffffffc0a13f2800\n    x21: 000011e1a02006e3 x20: ffffffc0a13f2800\n    x19: ffffffbc02a7e000 x18: 0000000000000000\n    x17: 0000000000000000 x16: 0000000000000feb\n    x15: 0000000000000000 x14: 00000000a01003e3\n    x13: 0000000000000020 x12: fffffffffffffff0\n    x11: ffffffc08b264000 x10: 00000000e3a01004\n    x9 : ffffffc08b263fea x8 : ffffffc0b1e611c0\n    x7 : ffffffc000307d24 x6 : 0000000000000000\n    x5 : 0000000000000038 x4 : 000000000000011e\n    x3 : ffffffbc00003e90 x2 : 0000000000000cc0\n    x1 : 00000000d0100371 x0 : ffffffbc00003e90\n\nReported-by: Sooyong Suk <s.suk@samsung.com>\nSigned-off-by: Heesub Shin <heesub.shin@samsung.com>\nTested-by: Sooyong Suk <s.suk@samsung.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/76feb12d2ee356be513acddca8d6ffac1caaff5c"},{"sha":"d4fa61b04f071ef7ffd3480f2dc1bf8ddd13fbdf","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zsmalloc: remove extra cond_resched() in __zs_compact\n\nDo not perform cond_resched() before the busy compaction loop in\n__zs_compact(), because this loop does it when needed.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Stephen Rothwell <sfr@canb.auug.org.au>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/d4fa61b04f071ef7ffd3480f2dc1bf8ddd13fbdf"},{"sha":"7b75c031ce5b429560fd5b2dcea04362c3a18e3b","author":{"email":"eee62f459f15dcddf87a8df69e8328e2a2562028@kernel.org","name":"Minchan Kim"},"message":"zram: support compaction\n\nNow that zsmalloc supports compaction, zram can use it.  For the first\nstep, this patch exports compact knob via sysfs so user can do compaction\nvia \"echo 1 > /sys/block/zram0/compact\".\n\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Juneho Choi <juno.choi@lge.com>\nCc: Gunho Lee <gunho.lee@lge.com>\nCc: Luigi Semenzato <semenzato@google.com>\nCc: Dan Streetman <ddstreet@ieee.org>\nCc: Seth Jennings <sjennings@variantweb.net>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nCc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Mel Gorman <mel@csn.ul.ie>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/7b75c031ce5b429560fd5b2dcea04362c3a18e3b"},{"sha":"13b926f9f5855f6ecc2b005026cdee7dff160146","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: remove `num_migrated' device attr\n\nThis patch introduces rework to zram stats.  We have per-stat sysfs nodes,\nand it makes things a bit hard to use in user space: it doesn't give an\nimmediate stats 'snapshot', it requires user space to use more syscalls -\nopen, read, close for every stat file, with appropriate error checks on\nevery step, etc.\n\nFirst, zram now accounts block layer statistics, available in\n/sys/block/zram<id>/stat and /proc/diskstats files.  So some new stats are\navailable (see Documentation/block/stat.txt), besides, zram's activities\nnow can be monitored by sysstat's iostat or similar tools.\n\nExample:\ncat /sys/block/zram0/stat\n248     0    1984    0   251029     0  2008232   5120   0   5116   5116\n\nSecond, group currently exported on per-stat basis nodes into two\ncategories (files):\n\n-- zram<id>/io_stat\naccumulates device's IO stats, that are not accounted by block layer,\nand contains:\n        failed_reads\n        failed_writes\n        invalid_io\n        notify_free\n\nExample:\ncat /sys/block/zram0/io_stat\n0        0        0   652572\n\n-- zram<id>/mm_stat\naccumulates zram mm stats and contains:\n        orig_data_size\n        compr_data_size\n        mem_used_total\n        mem_limit\n        mem_used_max\n        zero_pages\n        num_migrated\n\nExample:\ncat /sys/block/zram0/mm_stat\n434634752 270288572 279158784        0 579895296    15060        0\n\nper-stat sysfs nodes are now considered to be deprecated and we plan to\nremove them (and clean up some of the existing stat code) in two years (as\nof now, there is no warning printed to syslog about deprecated stats being\nused).  User space is advised to use the above mentioned 3 files.\n\nThis patch (of 7):\n\nRemove sysfs `num_migrated' attribute.  We are moving away from per-stat\ndevice attrs towards 3 stat files that will accumulate io and mm stats in\na format similar to block layer statistics in /sys/block/<dev>/stat.  That\nwill be easier to use in user space, and reduce the number of syscalls\nneeded to read zram device statistics.\n\n`num_migrated' will return back in zram<id>/mm_stat file.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/13b926f9f5855f6ecc2b005026cdee7dff160146"},{"sha":"f3986a2f23bc46904767cbc46a6899628a340067","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: move compact_store() to sysfs functions area\n\nA cosmetic change.  We have a new code layout and keep zram per-device\nsysfs store and show functions in one place.  Move compact_store() to that\nhandlers block to conform to current layout.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/f3986a2f23bc46904767cbc46a6899628a340067"},{"sha":"5a7c5dea6d7d0df7dcf0be537ba1d9d97dc13ee0","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: use generic start/end io accounting\n\nUse bio generic_start_io_acct() and generic_end_io_acct() to account\ndevice's block layer statistics.  This will let users to monitor zram\nactivities using sysstat and similar packages/tools.\n\nApart from the usual per-stat sysfs attr, zram IO stats are now also\navailable in '/sys/block/zram<id>/stat' and '/proc/diskstats' files.\n\nWe will slowly get rid of per-stat sysfs files.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/5a7c5dea6d7d0df7dcf0be537ba1d9d97dc13ee0"},{"sha":"ba4cb34b046ddc29fcaa60dec07ece4cbe94c318","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: describe device attrs in documentation\n\nBriefly describe exported device stat attrs in zram documentation.  We\nwill eventually get rid of per-stat sysfs nodes and, thus, clean up\nDocumentation/ABI/testing/sysfs-block-zram file, which is the only source\nof information about device sysfs nodes.\n\nAdd `num_migrated' description, since there is no independent\n`num_migrated' sysfs node (and no corresponding sysfs-block-zram entry),\nit will be exported via zram<id>/mm_stat file.\n\nAt this point we can provide minimal description, because sysfs-block-zram\nstill contains detailed information.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/ba4cb34b046ddc29fcaa60dec07ece4cbe94c318"},{"sha":"643de63efb48e944f387cba1ae8a434670825236","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: export new 'io_stat' sysfs attrs\n\nPer-device `zram<id>/io_stat' file provides accumulated I/O statistics of\nparticular zram device in a format similar to block layer statistics.  The\nfile consists of a single line and represents the following stats\n(separated by whitespace):\n\n        failed_reads\n        failed_writes\n        invalid_io\n        notify_free\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/643de63efb48e944f387cba1ae8a434670825236"},{"sha":"ac498cc4b47e540b28a93c2d3e1ea8c3c303252f","author":{"email":"d9c384f6b6e27869ff3b53bd225c29030ac4166b@gmail.com","name":"Sergey Senozhatsky"},"message":"zram: export new 'mm_stat' sysfs attrs\n\nPer-device `zram<id>/mm_stat' file provides mm statistics of a particular\nzram device in a format similar to block layer statistics.  The file\nconsists of a single line and represents the following stats (separated by\nwhitespace):\n\n        orig_data_size\n        compr_data_size\n        mem_used_total\n        mem_limit\n        mem_used_max\n        zero_pages\n        num_migrated\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nAcked-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>","distinct":true,"url":"https://api.github.com/repos/Epirex/Samsung_STE_Kernel/commits/ac498cc4b47e540b28a93c2d3e1ea8c3c303252f"}]}