{"push_id":715767316,"size":1,"distinct_size":1,"ref":"refs/heads/pac-5.1","head":"09cb7d03ed4ad33d05a4103697416e0c1790de25","before":"e5cccb88a196f76bc4240ecbfbffa8ecf81ba0ce","commits":[{"sha":"09cb7d03ed4ad33d05a4103697416e0c1790de25","author":{"email":"3b96b99f19643d33e1bfa1caa535c041c3608549@openvz.org","name":"Konstantin Khlebnikov"},"message":"radix-tree: introduce bit-optimized iterator\n\nA series of radix tree cleanups, and usage of them in the core pagecache\ncode.\n\nMicro-benchmark:\n\nlookup 14 slots (typical page-vector size)\nin radix-tree there earch <step> slot filled and tagged\nbefore/after - nsec per full scan through tree\n\n* Intel Sandy Bridge i7-2620M 4Mb L3\nNew code always faster\n\n* AMD Athlon 6000+ 2x1Mb L2, without L3\nNew code generally faster,\nMinor degradation (marked with \"*\") for huge sparse trees\n\n* i386 on Sandy Bridge\nNew code faster for common cases: tagged and dense trees.\nSome degradations for non-tagged lookup on sparse trees.\n\nIdeally, there might help __ffs() analog for searching first non-zero\nlong element in array, gcc sometimes cannot optimize this loop corretly.\n\nNumbers:\n\nCPU: Intel Sandy Bridge i7-2620M 4Mb L3\n\nradix-tree with 1024 slots:\n\ntagged lookup\n\nstep  1      before  7156        after  3613\nstep  2      before  5399        after  2696\nstep  3      before  4779        after  1928\nstep  4      before  4456        after  1429\nstep  5      before  4292        after  1213\nstep  6      before  4183        after  1052\nstep  7      before  4157        after  951\nstep  8      before  4016        after  812\nstep  9      before  3952        after  851\nstep  10     before  3937        after  732\nstep  11     before  4023        after  709\nstep  12     before  3872        after  657\nstep  13     before  3892        after  633\nstep  14     before  3720        after  591\nstep  15     before  3879        after  578\nstep  16     before  3561        after  513\n\nnormal lookup\n\nstep  1      before  4266       after  3301\nstep  2      before  2695       after  2129\nstep  3      before  2083       after  1712\nstep  4      before  1801       after  1534\nstep  5      before  1628       after  1313\nstep  6      before  1551       after  1263\nstep  7      before  1475       after  1185\nstep  8      before  1432       after  1167\nstep  9      before  1373       after  1092\nstep  10     before  1339       after  1134\nstep  11     before  1292       after  1056\nstep  12     before  1319       after  1030\nstep  13     before  1276       after  1004\nstep  14     before  1256       after  987\nstep  15     before  1228       after  992\nstep  16     before  1247       after  999\n\nradix-tree with 1024*1024*128 slots:\n\ntagged lookup\n\nstep  1      before  1086102841  after  674196409\nstep  2      before  816839155   after  498138306\nstep  7      before  599728907   after  240676762\nstep  15     before  555729253   after  185219677\nstep  63     before  606637748   after  128585664\nstep  64     before  608384432   after  102945089\nstep  65     before  596987114   after  123996019\nstep  128    before  304459225   after  56783056\nstep  256    before  158846855   after  31232481\nstep  512    before  86085652    after  18950595\nstep  12345  before  6517189     after  1674057\n\nnormal lookup\n\nstep  1      before  626064869  after  544418266\nstep  2      before  418809975  after  336321473\nstep  7      before  242303598  after  207755560\nstep  15     before  208380563  after  176496355\nstep  63     before  186854206  after  167283638\nstep  64     before  176188060  after  170143976\nstep  65     before  185139608  after  167487116\nstep  128    before  88181865   after  86913490\nstep  256    before  45733628   after  45143534\nstep  512    before  24506038   after  23859036\nstep  12345  before  2177425    after  2018662\n\n* AMD Athlon 6000+ 2x1Mb L2, without L3\n\nradix-tree with 1024 slots:\n\ntag-lookup\n\nstep  1      before  8164        after  5379\nstep  2      before  5818        after  5581\nstep  3      before  4959        after  4213\nstep  4      before  4371        after  3386\nstep  5      before  4204        after  2997\nstep  6      before  4950        after  2744\nstep  7      before  4598        after  2480\nstep  8      before  4251        after  2288\nstep  9      before  4262        after  2243\nstep  10     before  4175        after  2131\nstep  11     before  3999        after  2024\nstep  12     before  3979        after  1994\nstep  13     before  3842        after  1929\nstep  14     before  3750        after  1810\nstep  15     before  3735        after  1810\nstep  16     before  3532        after  1660\n\nnormal-lookup\n\nstep  1      before  7875        after  5847\nstep  2      before  4808        after  4071\nstep  3      before  4073        after  3462\nstep  4      before  3677        after  3074\nstep  5      before  4308        after  2978\nstep  6      before  3911        after  3807\nstep  7      before  3635        after  3522\nstep  8      before  3313        after  3202\nstep  9      before  3280        after  3257\nstep  10     before  3166        after  3083\nstep  11     before  3066        after  3026\nstep  12     before  2985        after  2982\nstep  13     before  2925        after  2924\nstep  14     before  2834        after  2808\nstep  15     before  2805        after  2803\nstep  16     before  2647        after  2622\n\nradix-tree with 1024*1024*128 slots:\n\ntag-lookup\n\nstep  1      before  1288059720  after  951736580\nstep  2      before  961292300   after  884212140\nstep  7      before  768905140   after  547267580\nstep  15     before  771319480   after  456550640\nstep  63     before  504847640   after  242704304\nstep  64     before  392484800   after  177920786\nstep  65     before  491162160   after  246895264\nstep  128    before  208084064   after  97348392\nstep  256    before  112401035   after  51408126\nstep  512    before  75825834    after  29145070\nstep  12345  before  5603166     after  2847330\n\nnormal-lookup\n\nstep  1      before  1025677120  after  861375100\nstep  2      before  647220080   after  572258540\nstep  7      before  505518960   after  484041813\nstep  15     before  430483053   after  444815320\t*\nstep  63     before  388113453   after  404250546\t*\nstep  64     before  374154666   after  396027440\t*\nstep  65     before  381423973   after  396704853\t*\nstep  128    before  190078700   after  202619384\t*\nstep  256    before  100886756   after  102829108\t*\nstep  512    before  64074505    after  56158720\nstep  12345  before  4237289     after  4422299\t\t*\n\n* i686 on Sandy bridge\n\nradix-tree with 1024 slots:\n\ntagged lookup\n\nstep  1      before  7990        after  4019\nstep  2      before  5698        after  2897\nstep  3      before  5013        after  2475\nstep  4      before  4630        after  1721\nstep  5      before  4346        after  1759\nstep  6      before  4299        after  1556\nstep  7      before  4098        after  1513\nstep  8      before  4115        after  1222\nstep  9      before  3983        after  1390\nstep  10     before  4077        after  1207\nstep  11     before  3921        after  1231\nstep  12     before  3894        after  1116\nstep  13     before  3840        after  1147\nstep  14     before  3799        after  1090\nstep  15     before  3797        after  1059\nstep  16     before  3783        after  745\n\nnormal lookup\n\nstep  1      before  5103       after  3499\nstep  2      before  3299       after  2550\nstep  3      before  2489       after  2370\nstep  4      before  2034       after  2302\t\t*\nstep  5      before  1846       after  2268\t\t*\nstep  6      before  1752       after  2249\t\t*\nstep  7      before  1679       after  2164\t\t*\nstep  8      before  1627       after  2153\t\t*\nstep  9      before  1542       after  2095\t\t*\nstep  10     before  1479       after  2109\t\t*\nstep  11     before  1469       after  2009\t\t*\nstep  12     before  1445       after  2039\t\t*\nstep  13     before  1411       after  2013\t\t*\nstep  14     before  1374       after  2046\t\t*\nstep  15     before  1340       after  1975\t\t*\nstep  16     before  1331       after  2000\t\t*\n\nradix-tree with 1024*1024*128 slots:\n\ntagged lookup\n\nstep  1      before  1225865377  after  667153553\nstep  2      before  842427423   after  471533007\nstep  7      before  609296153   after  276260116\nstep  15     before  544232060   after  226859105\nstep  63     before  519209199   after  141343043\nstep  64     before  588980279   after  141951339\nstep  65     before  521099710   after  138282060\nstep  128    before  298476778   after  83390628\nstep  256    before  149358342   after  43602609\nstep  512    before  76994713    after  22911077\nstep  12345  before  5328666     after  1472111\n\nnormal lookup\n\nstep  1      before  819284564  after  533635310\nstep  2      before  512421605  after  364956155\nstep  7      before  271443305  after  305721345\t*\nstep  15     before  223591630  after  273960216\t*\nstep  63     before  190320247  after  217770207\t*\nstep  64     before  178538168  after  267411372\t*\nstep  65     before  186400423  after  215347937\t*\nstep  128    before  88106045   after  140540612\t*\nstep  256    before  44812420   after  70660377\t\t*\nstep  512    before  24435438   after  36328275\t\t*\nstep  12345  before  2123924    after  2148062\t\t*\n\nbloat-o-meter delta for this patchset + patchset with related shmem cleanups\n\nbloat-o-meter: x86_64\n\nadd/remove: 4/3 grow/shrink: 5/6 up/down: 928/-939 (-11)\nfunction                                     old     new   delta\nradix_tree_next_chunk                          -     499    +499\nshmem_unuse                                  428     554    +126\nshmem_radix_tree_replace                     131     227     +96\nfind_get_pages_tag                           354     419     +65\nfind_get_pages_contig                        345     407     +62\nfind_get_pages                               362     396     +34\n__kstrtab_radix_tree_next_chunk                -      22     +22\n__ksymtab_radix_tree_next_chunk                -      16     +16\n__kcrctab_radix_tree_next_chunk                -       8      +8\nradix_tree_gang_lookup_slot                  204     203      -1\nstatic.shmem_xattr_set                       384     381      -3\nradix_tree_gang_lookup_tag_slot              208     191     -17\nradix_tree_gang_lookup                       231     187     -44\nradix_tree_gang_lookup_tag                   247     199     -48\nshmem_unlock_mapping                         278     190     -88\n__lookup                                     217       -    -217\n__lookup_tag                                 242       -    -242\nradix_tree_locate_item                       279       -    -279\n\nbloat-o-meter: i386\n\nadd/remove: 3/3 grow/shrink: 8/9 up/down: 1075/-1275 (-200)\nfunction                                     old     new   delta\nradix_tree_next_chunk                          -     757    +757\nshmem_unuse                                  352     449     +97\nfind_get_pages_contig                        269     322     +53\nshmem_radix_tree_replace                     113     154     +41\nfind_get_pages_tag                           277     318     +41\ndcache_dir_lseek                             426     458     +32\n__kstrtab_radix_tree_next_chunk                -      22     +22\nvc_do_resize                                 968     977      +9\nsnd_pcm_lib_read1                            725     733      +8\n__ksymtab_radix_tree_next_chunk                -       8      +8\nnetlbl_cipsov4_list                         1120    1127      +7\nfind_get_pages                               293     291      -2\nnew_slab                                     467     459      -8\nbitfill_unaligned_rev                        425     417      -8\nradix_tree_gang_lookup_tag_slot              177     146     -31\nblk_dump_cmd                                 267     229     -38\nradix_tree_gang_lookup_slot                  212     134     -78\nshmem_unlock_mapping                         221     128     -93\nradix_tree_gang_lookup_tag                   275     162    -113\nradix_tree_gang_lookup                       255     126    -129\n__lookup                                     227       -    -227\n__lookup_tag                                 271       -    -271\nradix_tree_locate_item                       277       -    -277\n\nThis patch:\n\nImplement a clean, simple and effective radix-tree iteration routine.\n\nIterating divided into two phases:\n* lookup next chunk in radix-tree leaf node\n* iterating through slots in this chunk\n\nMain iterator function radix_tree_next_chunk() returns pointer to first\nslot, and stores in the struct radix_tree_iter index of next-to-last slot.\n For tagged-iterating it also constuct bitmask of tags for retunted chunk.\n All additional logic implemented as static-inline functions and macroses.\n\nAlso adds radix_tree_find_next_bit() static-inline variant of\nfind_next_bit() optimized for small constant size arrays, because\nfind_next_bit() too heavy for searching in an array with one/two long\nelements.\n\n[akpm@linux-foundation.org: rework comments a bit]\nSigned-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>\nTested-by: Hugh Dickins <hughd@google.com>\nCc: Christoph Hellwig <hch@lst.de>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\nChange-Id: Ifa6826a370f359f688c02b5ccded918d5a588cdc","distinct":true,"url":"https://api.github.com/repos/Split-Screen/android_kernel_motorola_omap4-common/commits/09cb7d03ed4ad33d05a4103697416e0c1790de25"}]}