{"push_id":547418725,"size":2,"distinct_size":2,"ref":"refs/heads/Tyr","head":"e909b95a19c76fa0c5285c223fa8c245c1449486","before":"0790ed2d392c00518596757e735a14caa50a263d","commits":[{"sha":"e2bd3f941c603766e87672d635fadbf8cb0e4c05","author":{"email":"742cc7da48fa788d384ec77ccfb9a4657661404c@gmail.com","name":"imoseyon"},"message":"char: frandom: initial commit v1.1\n\n    Based on my dd test:\n      hw_random (msm_rng): 0.56 MB/s\n      linux random/urandom: 4.4 MB/s\n      frandom/erandom: 90 MB/s","distinct":true,"url":"https://api.github.com/repos/DerRomtester/one_plus_one/commits/e2bd3f941c603766e87672d635fadbf8cb0e4c05"},{"sha":"e909b95a19c76fa0c5285c223fa8c245c1449486","author":{"email":"6a4cf9207bb95b1a4cf1be22c2e93f8b38036f65@google.com","name":"Michel Lespinasse"},"message":"rbtree: add prio tree and interval tree tests\n\nPatch 1 implements support for interval trees, on top of the augmented\nrbtree API. It also adds synthetic tests to compare the performance of\ninterval trees vs prio trees. Short answers is that interval trees are\nslightly faster (~25%) on insert/erase, and much faster (~2.4 - 3x)\non search. It is debatable how realistic the synthetic test is, and I have\nnot made such measurements yet, but my impression is that interval trees\nwould still come out faster.\n\nPatch 2 uses a preprocessor template to make the interval tree generic,\nand uses it as a replacement for the vma prio_tree.\n\nPatch 3 takes the other prio_tree user, kmemleak, and converts it to use\na basic rbtree. We don't actually need the augmented rbtree support here\nbecause the intervals are always non-overlapping.\n\nPatch 4 removes the now-unused prio tree library.\n\nPatch 5 proposes an additional optimization to rb_erase_augmented, now\nproviding it as an inline function so that the augmented callbacks can be\ninlined in. This provides an additional 5-10% performance improvement\nfor the interval tree insert/erase benchmark. There is a maintainance cost\nas it exposes augmented rbtree users to some of the rbtree library internals;\nhowever I think this cost shouldn't be too high as I expect the augmented\nrbtree will always have much less users than the base rbtree.\n\nI should probably add a quick summary of why I think it makes sense to\nreplace prio trees with augmented rbtree based interval trees now.  One of\nthe drivers is that we need augmented rbtrees for Rik's vma gap finding\ncode, and once you have them, it just makes sense to use them for interval\ntrees as well, as this is the simpler and more well known algorithm.  prio\ntrees, in comparison, seem *too* clever: they impose an additional 'heap'\nconstraint on the tree, which they use to guarantee a faster worst-case\ncomplexity of O(k+log N) for stabbing queries in a well-balanced prio\ntree, vs O(k*log N) for interval trees (where k=number of matches,\nN=number of intervals).  Now this sounds great, but in practice prio trees\ndon't realize this theorical benefit.  First, the additional constraint\nmakes them harder to update, so that the kernel implementation has to\nsimplify things by balancing them like a radix tree, which is not always\nideal.  Second, the fact that there are both index and heap properties\nmakes both tree manipulation and search more complex, which results in a\nhigher multiplicative time constant.  As it turns out, the simple interval\ntree algorithm ends up running faster than the more clever prio tree.\n\nThis patch:\n\nAdd two test modules:\n\n- prio_tree_test measures the performance of lib/prio_tree.c, both for\n  insertion/removal and for stabbing searches\n\n- interval_tree_test measures the performance of a library of equivalent\n  functionality, built using the augmented rbtree support.\n\nIn order to support the second test module, lib/interval_tree.c is\nintroduced. It is kept separate from the interval_tree_test main file\nfor two reasons: first we don't want to provide an unfair advantage\nover prio_tree_test by having everything in a single compilation unit,\nand second there is the possibility that the interval tree functionality\ncould get some non-test users in kernel over time.\n\nSigned-off-by: Michel Lespinasse <walken@google.com>\nCc: Rik van Riel <riel@redhat.com>\nCc: Hillf Danton <dhillf@gmail.com>\nCc: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Catalin Marinas <catalin.marinas@arm.com>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: David Woodhouse <dwmw2@infradead.org>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n\nConflicts:\n\tlib/Kconfig.debug\n\tlib/Makefile","distinct":true,"url":"https://api.github.com/repos/DerRomtester/one_plus_one/commits/e909b95a19c76fa0c5285c223fa8c245c1449486"}]}