Build #776

RPKI Build for FRR

Build: #776 was successful Changes by Mark Stapp <mjs@voltanet.io>

Code commits

FRR - FreeRangeRouting

  • Mark Stapp <mjs@voltanet.io>

    Mark Stapp <mjs@voltanet.io> a311fb565344e7398c452638bf2701644c7e5c42

    Merge pull request #3589 from donaldsharp/self_vs_thread
    lib: Convert RUSAGE_SELF to RUSAGE_THREAD where we can

  • Mark Stapp <mjs@voltanet.io>

    Mark Stapp <mjs@voltanet.io> c065db320a5898ea2205b87fb35418ca29e4ab2d

    Merge pull request #3590 from donaldsharp/zebra_pthread_setnames
    FRR pthread setnames

  • Donald Sharp

    Donald Sharp c80bedb83bf0e91b49b81e9d2c4bd80550712c5a m

    lib, bgpd: Convert frr_pthread_set_name to only cause it to set os name of the thread
    The current invocation of frr_pthread_set_name was causing it reset the os_name.
    There is no need for this, we now always create the pthread appropriately
    to have both name and os_name.  So convert this function to a simple
    call through of the pthread call now.

    Before(any of these changes):
    sharpd@robot ~/frr1> ps -L -p 16895
      PID   LWP TTY          TIME CMD
    16895 16895 ?        00:01:39 bgpd
    16895 16896 ?        00:00:54
    16895 16897 ?        00:00:07 bgpd_ka

    After:
    sharpd@donna ~/frr1> ps -L -p 1752
      PID   LWP TTY          TIME CMD
     1752  1752 ?        00:00:00 bgpd
     1752  1753 ?        00:00:00 bgpd_io
     1752  1754 ?        00:00:00 bgpd_ka

    Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

  • Donald Sharp

    Donald Sharp 6d0a40b5b76d62d55c68d569579b1eb5a2a3294c m

    lib: Cleanup thread name setting to happen at start
    When we start a thread we always call fpt_run and since
    the last commit we know os_name is filled with something,
    therefore we can just set the name on startup.

    This creates this output now for zebra:

    sharpd@donna ~/frr2> ps -L -p 25643
      PID   LWP TTY          TIME CMD
    25643 25643 ?        00:00:00 zebra
    25643 25644 ?        00:00:00 Zebra dplane
    25643 25684 ?        00:00:00 zebra_apic
    sharpd@donna ~/frr2>

    I removed the abstraction to frr_pthread_set_name because
    it was snprintf'ing into the same buffer which was the
    real bug here( the first character of os_name became null).
    In the next commit I'll remove that api because
    it is unneeded and was a horrible hack to get
    this to work for the one place it was wanted.

    Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

  • Donald Sharp

    Donald Sharp b8dccd94f3d7408812240c375ea9885147300e70 m

    lib: On frr_pthread_new save a os_name
    On call of frr_pthread_new, save the os_name if given,
    if not given use the name passed in( shortening to fit
    in available space ) and finally if the name was not
    passed in use the default value.

    Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>

  • Donald Sharp

    Donald Sharp 231db9a6e1b39c56d38c99397d8b5e6f13a0aeef m

    lib: Convert RUSAGE_SELF to RUSAGE_THREAD where we can
    When using getrusage, we have multiple choices about what
    to call for data gathering about this particular thread of execution.

    RUSAGE_SELF -> This means gather all cpu run time for all pthreads associated
    with this process.

    RUSAGE_THREAD -> This means gather all cpu run time for this particular
    pthread.

    Clearly with data gathering for slow thread as well as `show thread cpu`
    it would be preferable to gather only data about the current running
    pthread.  This probably was the original behavior of using RUSAGE_SELF
    when we didn't have multiple pthreads.  So it didn't matter so much.

    Prior to this change, 10 iterations of 1 million routes install/remove
    from zebra would give us this cpu time for the dataplane pthread:

    Showing statistics for pthread Zebra dplane thread
    --------------------------------------------------
                          CPU (user+system): Real (wall-clock):
    Active   Runtime(ms)   Invoked Avg uSec Max uSecs Avg uSec Max uSecs  Type  Thread
        0     280902.149    326541      860   2609982      550   2468910    E  dplane_thread_loop

    After this change we are seeing this:

    Showing statistics for pthread Zebra dplane thread
    --------------------------------------------------
                          CPU (user+system): Real (wall-clock):
    Active   Runtime(ms)   Invoked Avg uSec Max uSecs Avg uSec Max uSecs  Type  Thread
        0      58045.560    334944      173    277226      539   2502268    E  dplane_thread_loop

    Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>