Post AXdbQKoaE6RL1HvBC4 by mattst88@fosstodon.org
 (DIR) More posts by mattst88@fosstodon.org
 (DIR) Post #AXdbQKoaE6RL1HvBC4 by mattst88@fosstodon.org
       2023-07-13T00:40:42Z
       
       1 likes, 0 repeats
       
       Another day, another bizarre software discovery.Apparently #Gentoo's sys-apps/sandbox (which ensures ebuilds don't make a mess outside of their build "sandbox") had a huge performance regression which caused webkit-gtk build times to go from 9 minutes to 1 hour.After collecting a ton of data, applying patches, reverting patches, etc, I filed https://bugs.gentoo.org/910273 and it seems we have a fix.But I don't know how it's fixing things!
       
 (DIR) Post #AXdbQLjIpDoHrCSTbM by mattst88@fosstodon.org
       2023-07-13T00:44:29Z
       
       0 likes, 1 repeats
       
       The proposed patch removes the use of the faccessat() function and instead relies on fstatat64().The system I'm testing on is a 64-core/128-thread beast, and I found that building with -j32 is actually significantly faster than with -j128 (39 minutes vs 1 hour).So the faccessat() function must be causing some sort of serialization that essentially causes a denial of service with that many jobs?Any guesses what is going on here?#linux, #glibc, #gentoo
       
 (DIR) Post #AXeJDcUBbvYm2n7zxg by penguin42@mastodon.org.uk
       2023-07-13T10:45:54Z
       
       0 likes, 0 repeats
       
       @mattst88 Maybe add an assert if the faccessat ends up with a different result from the fstat - I assume you're expecting it never to try and access anything it can't use in a build?
       
 (DIR) Post #AXeWcM23Dn1Beo5nvs by q66@blahaj.social
       2023-07-13T13:10:04Z
       
       1 likes, 0 repeats
       
       @mattst88 while at it, drop the fstatat64 and other lfs64 junk and replace with plain fstatat + _FILE_OFFSET_BITS on glibc please
       
 (DIR) Post #AXeXHt1NTPV1qOa7sm by amonakov@mastodon.gamedev.place
       2023-07-13T07:38:12Z
       
       1 likes, 0 repeats
       
       @mattst88 Why guess when you can profile? ;)Without AT_EACCESS in flags, faccessat really doesn't scale due to how access_override_creds works:https://gist.github.com/amonakov/9281bba3974d931fe500eaad0369568cThe sandbox could probably use AT_EACCESS (which makes faccessat more efficient than fstatat).