Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • linux
  • filter.h
Find file BlameHistoryPermalink
  • Eric Dumazet's avatar
    bpf: Use u64_stats_t in struct bpf_prog_stats · 61a0abae
    Eric Dumazet authored Oct 26, 2021
    Commit 316580b6
    
     ("u64_stats: provide u64_stats_t type")
    fixed possible load/store tearing on 64bit arches.
    
    For instance the following C code
    
    stats->nsecs += sched_clock() - start;
    
    Could be rightfully implemented like this by a compiler,
    confusing concurrent readers a lot:
    
    stats->nsecs += sched_clock();
    // arbitrary delay
    stats->nsecs -= start;
    
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/bpf/20211026214133.3114279-4-eric.dumazet@gmail.com
    61a0abae
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7