[fabbione/kronosnet] b0c959: [link] switch link_get_status to write lock

GitHub noreply at github.com
Sat Jun 24 07:42:54 CEST 2017


  Branch: refs/heads/master
  Home:   https://github.com/fabbione/kronosnet
  Commit: b0c959ae7d2083c822e396ea72d41811962f821c
      https://github.com/fabbione/kronosnet/commit/b0c959ae7d2083c822e396ea72d41811962f821c
  Author: Fabio M. Di Nitto <fdinitto at redhat.com>
  Date:   2017-06-24 (Sat, 24 Jun 2017)

  Changed paths:
    M libknet/link.c

  Log Message:
  -----------
  [link] switch link_get_status to write lock

previous to the introduction of detailed link stats, the values
contained in the status structure would hardly change over time
making a rdlock more than enough to get the right data.

Now that the values are updated constantly, we need to remove
the window of thread X writing values and thread Y to read them
while being written.

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>




More information about the Commits mailing list