Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-iv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-iv
  • Repository
Switch branch/tag
  • linux-iv
  • drivers
  • virtio
  • virtio_balloon.c
Find file BlameHistoryPermalink
  • Ladi Prosek's avatar
    virtio-balloon: use actual number of stats for stats queue buffers · 9646b26e
    Ladi Prosek authored Mar 28, 2017
    
    
    The virtio balloon driver contained a not-so-obvious invariant that
    update_balloon_stats has to update exactly VIRTIO_BALLOON_S_NR counters
    in order to send valid stats to the host. This commit fixes it by having
    update_balloon_stats return the actual number of counters, and its
    callers use it when pushing buffers to the stats virtqueue.
    
    Note that it is still out of spec to change the number of counters
    at run-time. "Driver MUST supply the same subset of statistics in all
    buffers submitted to the statsq."
    Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarLadi Prosek <lprosek@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    9646b26e