{"push_id":1339711726,"size":1000,"distinct_size":3376,"ref":"refs/heads/n7.0","head":"d85bb4310aaeac9f86ee81af0f8d0ca61bd4f575","before":"d6f382958fe15bd59f3777c2c6ae7f73644a7ad2","commits":[{"sha":"2ffac71b51592f8436c82b94a873746ec50a6aab","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: delete zram_init_device()\n\n(cherry pick from commit b67d1ec189ffb92cdad9b2bd29475fb1e0166983)\n\nallocate new `zram_meta' in disksize_store() only for uninitialised zram\ndevice, saving a number of allocations and deallocations in case if\ndisksize_store() was called on currently used device.  at the same time\nzram_meta stack variable is not necessary, because we can set ->meta\ndirectly.  there is also no need in setting QUEUE_FLAG_NONROT queue on\nevery disksize_store(), set it once during device creation.\n\n[minchan@kernel.org: handle zram->meta alloc fail case]\n[minchan@kernel.org: prevent lockdep spew of init_lock]\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Sasha Levin <sasha.levin@oracle.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: Ie3aa438d7a78ff7daf46792787d09b504752bbe0","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/2ffac71b51592f8436c82b94a873746ec50a6aab"},{"sha":"f341c10cd399f54e7faa1967f0b971fa23b8de8f","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: introduce compressing backend abstraction\n\n(cherry pick from commit e7e1ef439d18f9a21521116ea9f2b976d7230e54)\n\nZRAM performs direct LZO compression algorithm calls, making it the one\nand only option.  While LZO is generally performs well, LZ4 algorithm\ntends to have a faster decompression (see http://code.google.com/p/lz4/\nfor full report)\n\n\tName            Ratio  C.speed D.speed\n\t                        MB/s    MB/s\n\tLZ4 (r101)      2.084    422    1820\n\tLZO 2.06        2.106    414     600\n\nThus, users who have mostly read (decompress) usage scenarious or mixed\nworkflow (writes with relatively high read ops number) will benefit from\nusing LZ4 compression backend.\n\nIntroduce compressing backend abstraction zcomp in order to support\nmultiple compression algorithms with the following set of operations:\n\n        .create\n        .destroy\n        .compress\n        .decompress\n\nSchematically zram write() usually contains the following steps:\n0) preparation (decompression of partioal IO, etc.)\n1) lock buffer_lock mutex (protects meta compress buffers)\n2) compress (using meta compress buffers)\n3) alloc and map zs_pool object\n4) copy compressed data (from meta compress buffers) to object allocated by 3)\n5) free previous pool page, assign a new one\n6) unlock buffer_lock mutex\n\nAs we can see, compressing buffers must remain untouched from 1) to 4),\nbecause, otherwise, concurrent write() can overwrite data.  At the same\ntime, zram_meta must be aware of a) specific compression algorithm memory\nrequirements and b) necessary locking to protect compression buffers.  To\nremove requirement a) new struct zcomp_strm introduced, which contains a\ncompress/decompress `buffer' and compression algorithm `private' part.\nWhile struct zcomp implements zcomp_strm stream handling and locking and\nremoves requirement b) from zram meta.  zcomp ->create() and ->destroy(),\nrespectively, allocate and deallocate algorithm specific zcomp_strm\n`private' part.\n\nEvery zcomp has zcomp stream and mutex to protect its compression stream.\nStream usage semantics remains the same -- only one write can hold stream\nlock and use its buffers.  zcomp_strm_find() turns caller into exclusive\nuser of a stream (holding stream mutex until zram release stream), and\nzcomp_strm_release() makes zcomp stream available (unlock the stream\nmutex).  Hence no concurrent write (compression) operations possible at\nthe moment.\n\niozone -t 3 -R -r 16K -s 60M -I +Z\n\n       test            base           patched\n--------------------------------------------------\n  Initial write      597992.91       591660.58\n        Rewrite      609674.34       616054.97\n           Read     2404771.75      2452909.12\n        Re-read     2459216.81      2470074.44\n   Reverse Read     1652769.66      1589128.66\n    Stride read     2202441.81      2202173.31\n    Random read     2236311.47      2276565.31\n Mixed workload     1423760.41      1709760.06\n   Random write      579584.08       615933.86\n         Pwrite      597550.02       594933.70\n          Pread     1703672.53      1718126.72\n         Fwrite     1330497.06      1461054.00\n          Fread     3922851.00      3957242.62\n\nUsage examples:\n\n\tcomp = zcomp_create(NAME) /* NAME e.g. \"lzo\" */\n\nwhich initialises compressing backend if requested algorithm is supported.\n\nCompress:\n\tzstrm = zcomp_strm_find(comp)\n\tzcomp_compress(comp, zstrm, src, &dst_len)\n\t[..] /* copy compressed data */\n\tzcomp_strm_release(comp, zstrm)\n\nDecompress:\n\tzcomp_decompress(comp, src, src_len, dst);\n\nFree compessing backend and its zcomp stream:\n\tzcomp_destroy(comp)\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: I7a3bc22fd1db9590de57d1d0c579aaab239e056f","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/f341c10cd399f54e7faa1967f0b971fa23b8de8f"},{"sha":"d8b135ac01333f207592903161422bf32f3192c5","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: use zcomp compressing backends\n\n(cherry pick from commit b7ca232ee7e85ed3b18e39eb20a7f458ee1d6047)\n\nDo not perform direct LZO compress/decompress calls, initialise\nand use zcomp LZO backend (single compression stream) instead.\n\n[akpm@linux-foundation.org: resolve conflicts with zram-delete-zram_init_device-fix.patch]\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: I8d36c5e3acf5100e73facab7fc527a68de7461ac","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/d8b135ac01333f207592903161422bf32f3192c5"},{"sha":"35ec56755430f4af5e18a399e8f3ca5314578721","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: factor out single stream compression\n\n(cherry pick from commit 9cc97529a180b369fcb7e5265771b6ba7e01f05b)\n\nThis is preparation patch to add multi stream support to zcomp.\n\nIntroduce struct zcomp_strm_single and a set of functions to manage\nzcomp_strm stream access.  zcomp_strm_single implements single compession\nstream, same way as current zcomp implementation.  This moves zcomp_strm\nstream control and locking from zcomp, so compressing backend zcomp is not\naware of required locking.\n\nSingle and multi streams require different locking schemes.  Minchan Kim\nreported that spinlock-based locking scheme (which is used in multi stream\nimplementation) has demonstrated a severe perfomance regression for single\ncompression stream case, comparing to mutex-based.  see\nhttps://lkml.org/lkml/2014/2/18/16\n\nThe following set of functions added:\n- zcomp_strm_single_find()/zcomp_strm_single_release()\n  find and release a compression stream, implement required locking\n- zcomp_strm_single_create()/zcomp_strm_single_destroy()\n  create and destroy zcomp_strm_single\n\nNew ->strm_find() and ->strm_release() callbacks added to zcomp, which are\nset to zcomp_strm_single_find() and zcomp_strm_single_release() during\ninitialisation.  Instead of direct locking and zcomp_strm access from\nzcomp_strm_find() and zcomp_strm_release(), zcomp now calls ->strm_find()\nand ->strm_release() correspondingly.\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: Ib715ea3738fe634eca63a9a87d6f3fe423c1ae17","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/35ec56755430f4af5e18a399e8f3ca5314578721"},{"sha":"cbd0d53f672f9af046b5a74bff94754d5f8163fc","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: document failed_reads, failed_writes stats\n\n(cherry pick from commit 8dd1d3247e6c00b50ef83934ea8b22a1590015de)\n\nDocument `failed_reads' and `failed_writes' device attributes.\nRemove info about `discard' - there is no such zram attr.\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nCc: 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: Icfa3a705580554ef8e5305102bc2fe933006a633","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/cbd0d53f672f9af046b5a74bff94754d5f8163fc"},{"sha":"f341c57b3300dea4044fd6865718177b8a4ef39d","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: add multi stream functionality\n\n(cherry pick from commit beca3ec71fe5490ee9237dc42400f50402baf83e)\n\nExisting zram (zcomp) implementation has only one compression stream\n(buffer and algorithm private part), so in order to prevent data\ncorruption only one write (compress operation) can use this compression\nstream, forcing all concurrent write operations to wait for stream lock\nto be released.  This patch changes zcomp to keep a compression streams\nlist of user-defined size (via sysfs device attr).  Each write operation\nstill exclusively holds compression stream, the difference is that we\ncan have N write operations (depending on size of streams list)\nexecuting in parallel.  See TEST section later in commit message for\nperformance data.\n\nIntroduce struct zcomp_strm_multi and a set of functions to manage\nzcomp_strm stream access.  zcomp_strm_multi has a list of idle\nzcomp_strm structs, spinlock to protect idle list and wait queue, making\nit possible to perform parallel compressions.\n\nThe following set of functions added:\n- zcomp_strm_multi_find()/zcomp_strm_multi_release()\n  find and release a compression stream, implement required locking\n- zcomp_strm_multi_create()/zcomp_strm_multi_destroy()\n  create and destroy zcomp_strm_multi\n\nzcomp ->strm_find() and ->strm_release() callbacks are set during\ninitialisation to zcomp_strm_multi_find()/zcomp_strm_multi_release()\ncorrespondingly.\n\nEach time zcomp issues a zcomp_strm_multi_find() call, the following set\nof operations performed:\n\n- spin lock strm_lock\n- if idle list is not empty, remove zcomp_strm from idle list, spin\n  unlock and return zcomp stream pointer to caller\n- if idle list is empty, current adds itself to wait queue. it will be\n  awaken by zcomp_strm_multi_release() caller.\n\nzcomp_strm_multi_release():\n- spin lock strm_lock\n- add zcomp stream to idle list\n- spin unlock, wake up sleeper\n\nMinchan Kim reported that spinlock-based locking scheme has demonstrated\na severe perfomance regression for single compression stream case,\ncomparing to mutex-based (see https://lkml.org/lkml/2014/2/18/16)\n\nbase                      spinlock                    mutex\n\n==Initial write           ==Initial write             ==Initial  write\nrecords:  5               records:  5                 records:   5\navg:      1642424.35      avg:      699610.40         avg:       1655583.71\nstd:      39890.95(2.43%) std:      232014.19(33.16%) std:       52293.96\nmax:      1690170.94      max:      1163473.45        max:       1697164.75\nmin:      1568669.52      min:      573429.88         min:       1553410.23\n==Rewrite                 ==Rewrite                   ==Rewrite\nrecords:  5               records:  5                 records:   5\navg:      1611775.39      avg:      501406.64         avg:       1684419.11\nstd:      17144.58(1.06%) std:      15354.41(3.06%)   std:       18367.42\nmax:      1641800.95      max:      531356.78         max:       1706445.84\nmin:      1593515.27      min:      488817.78         min:       1655335.73\n\nWhen only one compression stream available, mutex with spin on owner\ntends to perform much better than frequent wait_event()/wake_up().  This\nis why single stream implemented as a special case with mutex locking.\n\nIntroduce and document zram device attribute max_comp_streams.  This\nattr shows and stores current zcomp's max number of zcomp streams\n(max_strm).  Extend zcomp's zcomp_create() with `max_strm' parameter.\n`max_strm' limits the number of zcomp_strm structs in compression\nbackend's idle list (max_comp_streams).\n\nmax_comp_streams used during initialisation as follows:\n-- passing to zcomp_create() max_strm equals to 1 will initialise zcomp\nusing single compression stream zcomp_strm_single (mutex-based locking).\n-- passing to zcomp_create() max_strm greater than 1 will initialise zcomp\nusing multi compression stream zcomp_strm_multi (spinlock-based locking).\n\ndefault max_comp_streams value is 1, meaning that zram with single stream\nwill be initialised.\n\nLater patch will introduce configuration knob to change max_comp_streams\non already initialised and used zcomp.\n\nTEST\niozone -t 3 -R -r 16K -s 60M -I +Z\n\n       test           base       1 strm (mutex)     3 strm (spinlock)\n-----------------------------------------------------------------------\n Initial write      589286.78       583518.39          718011.05\n       Rewrite      604837.97       596776.38         1515125.72\n  Random write      584120.11       595714.58         1388850.25\n        Pwrite      535731.17       541117.38          739295.27\n        Fwrite     1418083.88      1478612.72         1484927.06\n\nUsage example:\nset max_comp_streams to 4\n        echo 4 > /sys/block/zram0/max_comp_streams\n\nshow current max_comp_streams (default value is 1).\n        cat /sys/block/zram0/max_comp_streams\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: I3d8f23d41d12a27c963d5198713c5a9d9f567187","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/f341c57b3300dea4044fd6865718177b8a4ef39d"},{"sha":"44d08a826042832fdf0e31528f1968b0ba8d8122","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: add set_max_streams knob\n\n(cherry pick from commit fe8eb122c82b2049c460fc6df6e8583a2f935cff)\n\nThis patch allows to change max_comp_streams on initialised zcomp.\n\nIntroduce zcomp set_max_streams() knob, zcomp_strm_multi_set_max_streams()\nand zcomp_strm_single_set_max_streams() callbacks to change streams limit\nfor zcomp_strm_multi and zcomp_strm_single, accordingly.  set_max_streams\nfor single steam zcomp does nothing.\n\nIf user has lowered the limit, then zcomp_strm_multi_set_max_streams()\nattempts to immediately free extra streams (as much as it can, depending\non idle streams availability).\n\nNote, this patch does not allow to change stream 'policy' from single to\nmulti stream (or vice versa) on already initialised compression backend.\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: I90321a12889514e000baddd75ed386b5fcd20f65","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/44d08a826042832fdf0e31528f1968b0ba8d8122"},{"sha":"5ba7b57f0732352196a8a781df1ec0da1ed5c10b","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: make compression algorithm selection possible\n\n(cherry pick from commit e46b8a030d76d3c94156c545c3f4c3676d813435)\n\nAdd and document `comp_algorithm' device attribute.  This attribute allows\nto show supported compression and currently selected compression\nalgorithms:\n\n\tcat /sys/block/zram0/comp_algorithm\n\t[lzo] lz4\n\nand change selected compression algorithm:\n\techo lzo > /sys/block/zram0/comp_algorithm\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: I2360ec6ebb252306e9af6ca7679977bfb1c8cd42","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/5ba7b57f0732352196a8a781df1ec0da1ed5c10b"},{"sha":"85d79d6f051a4e35fb0785ccec425f5dc51390c5","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: add lz4 algorithm backend\n\n(cherry pick from commit 6e76668e415adf799839f0ab205142ad7002d260)\n\nIntroduce LZ4 compression backend and make it available for selection.\nLZ4 support is optional and requires user to set ZRAM_LZ4_COMPRESS config\noption.  The default compression backend is LZO.\n\nTEST\n\n(x86_64, core i5, 2 cores + 2 hyperthreading, zram disk size 1G,\next4 file system, 3 compression streams)\n\niozone -t 3 -R -r 16K -s 60M -I +Z\n\n       Test           LZO           LZ4\n----------------------------------------------\n  Initial write   1642744.62    1317005.09\n        Rewrite   2498980.88    1800645.16\n           Read   3957026.38    5877043.75\n        Re-read   3950997.38    5861847.00\n   Reverse Read   2937114.56    5047384.00\n    Stride read   2948163.19    4929587.38\n    Random read   3292692.69    4880793.62\n Mixed workload   1545602.62    3502940.38\n   Random write   2448039.75    1758786.25\n         Pwrite   1670051.03    1338329.69\n          Pread   2530682.00    5097177.62\n         Fwrite   3232085.62    3275942.56\n          Fread   6306880.25    6645271.12\n\nSo on my system LZ4 is slower in write-only tests, while it performs\nbetter in read-only and mixed (reads + writes) tests.\n\nOfficial LZ4 benchmarks available here http://code.google.com/p/lz4/\n(linux kernel uses revision r90).\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: I5efaac2f8796f8e2eb293cb33ee50aacdaa73ddd","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/85d79d6f051a4e35fb0785ccec425f5dc51390c5"},{"sha":"17bed7799d6bd114be18889717a1e71c3c2e2bde","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: move comp allocation out of init_lock\n\n(cherry pick from commit d61f98c70e8b0d324e8e83be2ed546d6295e63f3)\n\nWhile fixing lockdep spew of ->init_lock reported by Sasha Levin [1],\nMinchan Kim noted [2] that it's better to move compression backend\nallocation (using GPF_KERNEL) out of the ->init_lock lock, same way as\nwith zram_meta_alloc(), in order to prevent the same lockdep spew.\n\n[1] https://lkml.org/lkml/2014/2/27/337\n[2] https://lkml.org/lkml/2014/3/3/32\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nReported-by: Minchan Kim <minchan@kernel.org>\nAcked-by: Minchan Kim <minchan@kernel.org>\nCc: Sasha Levin <sasha.levin@oracle.com>\nAcked-by: 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: Iad85f5137d8e6e76b1c7a13bc12c02e53ca896f7","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/17bed7799d6bd114be18889717a1e71c3c2e2bde"},{"sha":"de3524d7c9a77c4846fc09a81883895a92171f98","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: return error-valued pointer from zcomp_create()\n\n(cherry pick from commit fcfa8d95cacf5cbbe6dee6b8d229fe86142266e0)\n\nInstead of returning just NULL, return ERR_PTR from zcomp_create() if\ncompressing backend creation has failed.  ERR_PTR(-EINVAL) for unsupported\ncompression algorithm request, ERR_PTR(-ENOMEM) for allocation (zcomp or\ncompression stream) error.\n\nPerform IS_ERR() check of returned from zcomp_create() value in\ndisksize_store() and set return code to PTR_ERR().\n\nChange suggested by Jerome Marchand.\n\n[akpm@linux-foundation.org: clean up error recovery flow]\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nReported-by: Jerome Marchand <jmarchan@redhat.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Arnd Bergmann <arnd@arndb.de>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I45c9629c60303d86b1a34dce7ee20e1ddf7e508e","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/de3524d7c9a77c4846fc09a81883895a92171f98"},{"sha":"78e4f63e96748362265ffc2885caf763bec4203b","author":{"name":"Minchan Kim","email":"513909c15f9d22f3704dca2f86978b287731f351@kernel.org"},"message":"zram: propagate error to user\n\n(cherry pick from commit 60a726e33375a1096e85399cfa1327081b4c38be)\n\nWhen we initialized zcomp with single, we couldn't change\nmax_comp_streams without zram reset but current interface doesn't show\nany error to user and even it changes max_comp_streams's value without\nany effect so it would make user very confusing.\n\nThis patch prevents max_comp_streams's change when zcomp was initialized\nas single zcomp and emit the error to user(ex, echo).\n\n[akpm@linux-foundation.org: don't return with the lock held, per Sergey]\n[fengguang.wu@intel.com: fix coccinelle warnings]\nSigned-off-by: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: Jerome Marchand <jmarchan@redhat.com>\nAcked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nSigned-off-by: Fengguang Wu <fengguang.wu@intel.com>\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>\nBug: 24810447\nChange-Id: I858a6cab44badbebb71ff11796f5c3773e858a34","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/78e4f63e96748362265ffc2885caf763bec4203b"},{"sha":"3f9337718a99ba1f15cc43991c5e7ea17db372ef","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: use scnprintf() in attrs show() methods\n\n(cherry pick from commit 56b4e8cb85827a2ccc4752a2a7148e56b62b7e96)\n\nsysfs.txt documentation lists the following requirements:\n\n - The buffer will always be PAGE_SIZE bytes in length. On i386, this\n   is 4096.\n\n - show() methods should return the number of bytes printed into the\n   buffer. This is the return value of scnprintf().\n\n - show() should always use scnprintf().\n\nUse scnprintf() in show() functions.\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: If890b214eddd582cc52e731ad75733236e8806f0","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/3f9337718a99ba1f15cc43991c5e7ea17db372ef"},{"sha":"d26908d3129004f496fa242cd5b1c911e29f28fc","author":{"name":"Joonsoo Kim","email":"e700615c04bcea977d20418bded45c707d0cb497@lge.com"},"message":"zram: support REQ_DISCARD\n\n(cherry pick from commit f4659d8e620d08bd1a84a8aec5d2f5294a242764)\n\nzram is ram based block device and can be used by backend of filesystem.\nWhen filesystem deletes a file, it normally doesn't do anything on data\nblock of that file.  It just marks on metadata of that file.  This\nbehavior has no problem on disk based block device, but has problems on\nram based block device, since we can't free memory used for data block.\nTo overcome this disadvantage, there is REQ_DISCARD functionality.  If\nblock device support REQ_DISCARD and filesystem is mounted with discard\noption, filesystem sends REQ_DISCARD to block device whenever some data\nblocks are discarded.  All we have to do is to handle this request.\n\nThis patch implements to flag up QUEUE_FLAG_DISCARD and handle this\nREQ_DISCARD request.  With it, we can free memory used by zram if it isn't\nused.\n\n[akpm@linux-foundation.org: tweak comments]\nSigned-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nCc: 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: If2194c9c4d098bca7ba3d7897ccd4ca3f4797a01","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/d26908d3129004f496fa242cd5b1c911e29f28fc"},{"sha":"921561fdb71860bfcd29dfe9c0fec5b132daf1c8","author":{"name":"Sergey Senozhatsky","email":"9251ceca1068cc8334161fa91b1f6065a5ee8fa4@gmail.com"},"message":"zram: allow request end to coincide with disksize\n\n(cherry pick from commit 75c7caf5a052ffd8db3312fa7864ee2d142890c4)\n\nPass valid_io_request() checks if request end coincides with disksize\n(end equals bound), only fail if we attempt to read beyond the bound.\n\nmkfs.ext2 produces numerous errors:\n[ 2164.632747] quiet_error: 1 callbacks suppressed\n[ 2164.633260] Buffer I/O error on device zram0, logical block 153599\n[ 2164.633265] lost page write due to I/O error on zram0\n\nSigned-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nBug: 24810447\nChange-Id: I9e909fa82a3b2a9c42e4396788b6121204e471e2","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/921561fdb71860bfcd29dfe9c0fec5b132daf1c8"},{"sha":"1af055491733164c1249cf4a9c92c868363f032b","author":{"name":"Jiang Liu","email":"c0a41b948164b7a0d38af35906b7c492f65cef4f@gmail.com"},"message":"zram: optimize memory operations with clear_page()/copy_page()\n\n(cherry pick from commit 42e99bd975fdd24d2bf1a24ebb8b0b42bab8ba65)\n\nSome architectures provides architecture-specific, optimized version of\nclear_page()/copy_page(), which may have better performance than\nmemset()/memcpy(). So use clear_page()/copy_page() to optimize zram\nperformance if possible.\n\nSigned-off-by: Jiang Liu <jiang.liu@huawei.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nBug: 24810447\nChange-Id: I436471882853aa683474d93785a5bb89ba85953c","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/1af055491733164c1249cf4a9c92c868363f032b"},{"sha":"fc6ca6bd6ec7987b9c5a30304d561c674113b1df","author":{"name":"Julia Lawall","email":"5f26763d26f96d414e30b3f33734591afe022543@lip6.fr"},"message":"zram: fix error return code\n\n(cherry pick from commit 201c7b72f0bf38d7f31fd229a01de035d0f10cd1)\n\nReturn a negative error code on failure.\n\nA simplified version of the semantic match that finds this problem is as\nfollows: (http://coccinelle.lip6.fr/)\n\n// <smpl>\n@@\nidentifier ret; expression e1,e2;\n@@\n(\nif (\\(ret < 0\\|ret != 0\\))\n { ... return ret; }\n|\nret = 0\n)\n... when != ret = e1\n    when != &ret\n*if(...)\n{\n  ... when != ret = e2\n      when forall\n return ret;\n}\n// </smpl>\n\nSigned-off-by: Julia Lawall <Julia.Lawall@lip6.fr>\nCc: Minchan Kim <minchan@kernel.org>\nCc: Nitin Gupta <ngupta@vflare.org>\nAcked-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I80e5b9d0b3185128b35a4f15b2c10ffd2b43d826","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/fc6ca6bd6ec7987b9c5a30304d561c674113b1df"},{"sha":"6b7947aeb87ccb0852c6b50e0ea45596fa999d37","author":{"name":"Richard Laager","email":"1ed8b68f60808770e9931ba5284c72fdf40b266a@wiktel.com"},"message":"lib/lz4: correct the LZ4 license\n\n(cherry pick from commit ee8a99bdb47f32327bdfaffe35b900ca7161ba4e)\n\nThe LZ4 code is listed as using the \"BSD 2-Clause License\".\n\nSigned-off-by: Richard Laager <rlaager@wiktel.com>\nAcked-by: Kyungsik Lee <kyungsik.lee@lge.com>\nCc: Chanho Min <chanho.min@lge.com>\nCc: Richard Yao <ryao@gentoo.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\n[ The 2-clause BSD can be just converted into GPL, but that's rude and\n  pointless, so don't do it   - Linus ]\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nBug: 24810447\nChange-Id: I332c38794d84d261092ff61a8e4d5d98b4666db8","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/6b7947aeb87ccb0852c6b50e0ea45596fa999d37"},{"sha":"ba78606d8045a16638bf64776026816250224c1f","author":{"name":"Greg Kroah-Hartman","email":"4931344b09d7a7d3573e8b1ebec918e229ead9bf@linuxfoundation.org"},"message":"lz4: ensure length does not wrap\n\n(cherry pick from commit 206204a1162b995e2185275167b22468c00d6b36)\n\nGiven some pathologically compressed data, lz4 could possibly decide to\nwrap a few internal variables, causing unknown things to happen.  Catch\nthis before the wrapping happens and abort the decompression.\n\nReported-by: \"Don A. Bailey\" <donb@securitymouse.com>\nCc: stable <stable@vger.kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nBug: 24810447\nChange-Id: Ie008fb8b69f1a1bbf40900fe2d49fff41e7d300b","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/ba78606d8045a16638bf64776026816250224c1f"},{"sha":"eb12875f21937db1b563720c265d959e077d1a6c","author":{"name":"Greg Kroah-Hartman","email":"4931344b09d7a7d3573e8b1ebec918e229ead9bf@linuxfoundation.org"},"message":"lz4: fix another possible overrun\n\n(cherry pick from commit 4148c1f67abf823099b2d7db6851e4aea407f5ee)\n\nThere is one other possible overrun in the lz4 code as implemented by\nLinux at this point in time (which differs from the upstream lz4\ncodebase, but will get synced at in a future kernel release.)  As\npointed out by Don, we also need to check the overflow in the data\nitself.\n\nWhile we are at it, replace the odd error return value with just a\n\"simple\" -1 value as the return value is never used for anything other\nthan a basic \"did this work or not\" check.\n\nReported-by: \"Don A. Bailey\" <donb@securitymouse.com>\nReported-by: Willy Tarreau <w@1wt.eu>\nCc: stable <stable@vger.kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>\nBug: 24810447\nChange-Id: If06c4719c0b6db3e3e9b693b50fa2218ed1f5078","distinct":true,"url":"https://api.github.com/repos/AICP/kernel_htc_flounder/commits/eb12875f21937db1b563720c265d959e077d1a6c"}]}
{"actor":{"display_login":"AICP-Gerrit"}}