GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Arnd Bergmann (arnd@society.oftrolls.com)'s status on Saturday, 04-Jan-2025 19:40:53 JST Arnd Bergmann Arnd Bergmann

    I had a feeling that kernel compilation got slower recently and tried to find the slowest file across randconfig builds. It turned out to be arch/x86/xen/setup.c, which takes 15 seconds to preprocess on a reasonably fast Apple M1 Ultra.

    This all comes from one line "extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)), extra_pages, max_pages - max_pfn);" that expands to 47MB of preprocessor output after commits 80fcac55385c..867046cc70277.

    In conversation about 5 months ago from society.oftrolls.com permalink
    • Embed this notice
      Lorenzo Stoakes (ljs@social.kernel.org)'s status on Saturday, 04-Jan-2025 19:40:46 JST Lorenzo Stoakes Lorenzo Stoakes
      in reply to
      • Lorenzo Stoakes
      • Omar Sandoval
      @osandov @arnd For those following, posted https://lore.kernel.org/linux-mm/c83c17bb-be75-4c67-979d-54eee38774c6@lucifer.local/T/#u summarising situation + showing some results on my local box (ignore cringe hostname of said box)
      In conversation about 5 months ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        Build performance regressions originating from min()/max() macros
      Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Lorenzo Stoakes (ljs@social.kernel.org)'s status on Saturday, 04-Jan-2025 19:40:47 JST Lorenzo Stoakes Lorenzo Stoakes
      in reply to
      • Omar Sandoval
      @osandov @arnd Regardless, this is an unacceptable build regression.

      Chatted to @arnd on IRC who suggests he is tied up with stuff to dig into this more so I'll have a wee look :)

      EDIT: Think that'll be more likely a report to list + leave others to solve as this seems quite involved and I have a ton of things to do :>)
      In conversation about 5 months ago permalink
    • Embed this notice
      Omar Sandoval (osandov@fosstodon.org)'s status on Saturday, 04-Jan-2025 19:40:49 JST Omar Sandoval Omar Sandoval
      in reply to
      • Lorenzo Stoakes

      @ljs @arnd eh I don't think it's fair to call this pedantry. This looks like a legitimate quality of life improvement for a common annoyance with min/max, but given the consequences, it's fair to say that it's not worth it.

      In conversation about 5 months ago permalink
    • Embed this notice
      Lorenzo Stoakes (ljs@social.kernel.org)'s status on Saturday, 04-Jan-2025 19:40:50 JST Lorenzo Stoakes Lorenzo Stoakes
      in reply to
      @arnd we going to revert that series then?

      I feel there is pedantry at play...
      In conversation about 5 months ago permalink
    • Embed this notice
      Mans R (mansr@society.oftrolls.com)'s status on Saturday, 04-Jan-2025 19:46:40 JST Mans R Mans R
      in reply to
      • KeyJ
      • Dirk Steins

      @dirksteins @arnd @KeyJ There's no reason to doubt the correctness, but as has been noted, it is somewhat slow.

      Now as shocking as this might be, it is quite tame compared to the boost C++ library.

      In conversation about 5 months ago permalink
      Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Dirk Steins (dirksteins@social.cologne)'s status on Saturday, 04-Jan-2025 19:46:41 JST Dirk Steins Dirk Steins
      in reply to
      • Mans R
      • KeyJ

      @mansr @arnd @KeyJ probably. But I still ask myself if a 47MB expression is useful and if the compiler is able to process this correctly (it probably is, but is it efficient?).

      In conversation about 5 months ago permalink
    • Embed this notice
      Mans R (mansr@society.oftrolls.com)'s status on Saturday, 04-Jan-2025 19:46:43 JST Mans R Mans R
      in reply to
      • KeyJ
      • Dirk Steins

      @dirksteins @arnd @KeyJ It's a huge constant expression that gets evaluated by the compiler. The final code is (probably) fine.

      In conversation about 5 months ago permalink
    • Embed this notice
      Dirk Steins (dirksteins@social.cologne)'s status on Saturday, 04-Jan-2025 19:46:44 JST Dirk Steins Dirk Steins
      in reply to
      • KeyJ

      @arnd @KeyJ and this is effective and efficient code? Doesn’t look like it to me - but I’m not a kernel developer.

      In conversation about 5 months ago permalink
    • Embed this notice
      Arnd Bergmann (arnd@society.oftrolls.com)'s status on Saturday, 04-Jan-2025 19:46:47 JST Arnd Bergmann Arnd Bergmann
      in reply to
      • KeyJ

      @KeyJ it nests min() multiple levels deep with the use of min3(), and each one expands its argument 20 times times now (up from 6 back in linux-6.6). This gets 8000 expansions for each of the arguments, plus a lot of extra bits with each expansion. PFN_DOWN(MAXMEM) contributes a bit to the initial size as well.

      See https://pastebin.com/MmfWH7TM for the first few pages of it.

      In conversation about 5 months ago permalink

      Attachments

      1. Domain not in remote thumbnail source whitelist: pastebin.com
        unsigned long extra_pages = 0; extra_pages = __builtin_choose_expr((sizeof(in - Pastebin.com
        Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
    • Embed this notice
      KeyJ (keyj@mastodon.gamedev.place)'s status on Saturday, 04-Jan-2025 19:46:48 JST KeyJ KeyJ
      in reply to

      @arnd But ... how? Even if it expanded to 47 kilobytes, that would be excessive, but 47 *megabytes*? 🤯

      In conversation about 5 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.