Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-3007

Request for comments/feedback: tcache and memory usage not shrinking

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • None
    • Low
    • 1
    • rhel-pt-c-libs
    • ssg_platform_tools
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • PT C Libraries 2025 S15
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      When tcache is enabled, memory tends to not shrink very well, but
      be fragmented in long running threads with several different malloc
      allocation patterns.

      Closest similar issue I did find was
      https://bugs.linaro.org/show_bug.cgi?id=3950
      [LKFT: libhugetlbfs: heapshrink-2M-64 failed]

      While talking with the user experimenting the problem the first idea
      I have, but just heuristics, could be to change _int_free():

      if (tcache->counts[tc_idx] < mp_.tcache_count)

      { tcache_put (p, tc_idx); return; }

      to swap the 'p' argument with the oldest entry in the tcache, and not
      'return'. Checking if any other local variable needs an adjust as well,
      at least the 'size' variable.

              fweimer@redhat.com Florian Weimer
              rhn-support-pandrade Paulo Andrade
              Florian Weimer Florian Weimer
              qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com qe-baseos-tools-bugs@redhat.com
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: