{"push_id":882982562,"size":1,"distinct_size":1,"ref":"refs/heads/m","head":"40f6ee47034f8310190fa6f2b2129ee431bcbb8b","before":"528049eb20ca7d59ab6153a9b2848fd395eb98c0","commits":[{"sha":"40f6ee47034f8310190fa6f2b2129ee431bcbb8b","author":{"email":"69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org","name":"Linus Torvalds"},"message":"vfs: Fix pathological performance case for __alloc_fd()\n\nAl Viro points out that:\n> >     * [Linux-specific aside] our __alloc_fd() can degrade quite badly\n> > with some use patterns.  The cacheline pingpong in the bitmap is probably\n> > inevitable, unless we accept considerably heavier memory footprint,\n> > but we also have a case when alloc_fd() takes O(n) and it's _not_ hard\n> > to trigger - close(3);open(...); will have the next open() after that\n> > scanning the entire in-use bitmap.\n\nAnd Eric Dumazet has a somewhat realistic multithreaded microbenchmark\nthat opens and closes a lot of sockets with minimal work per socket.\n\nThis patch largely fixes it.  We keep a 2nd-level bitmap of the open\nfile bitmaps, showing which words are already full.  So then we can\ntraverse that second-level bitmap to efficiently skip already allocated\nfile descriptors.\n\nOn his benchmark, this improves performance by up to an order of\nmagnitude, by avoiding the excessive open file bitmap scanning.\n\nChange-Id: I74b8f4dc7b34c20ec0c3191a17ad1a763597b901\nTested-and-acked-by: Eric Dumazet <edumazet@google.com>\nCc: Al Viro <viro@zeniv.linux.org.uk>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\nSigned-off-by: franciscofranco <franciscofranco.1990@gmail.com>","distinct":true,"url":"https://api.github.com/repos/DirtyUnicorns/android_kernel_htc_flounder/commits/40f6ee47034f8310190fa6f2b2129ee431bcbb8b"}]}