• Nadav Amit's avatar
    vmw_balloon: stats rework · c7b3690f
    Nadav Amit authored
    To allow the balloon statistics to be updated concurrently, we change
    the statistics to be held per core and aggregate it when needed.
    
    To avoid the memory overhead of keeping the statistics per core, and
    since it is likely not used by most users, we start updating the
    statistics only after the first use. A read-write semaphore is used to
    protect the statistics initialization and avoid races. This semaphore is
    (and will) be used to protect configuration changes during reset.
    
    While we are at it, address some other issues: change the statistics
    update to inline functions instead of define; use ulong for saving the
    statistics; and clean the statistics printouts.
    
    Note that this patch changes the format of the outputs. If there are any
    automatic tools that use the statistics, they might fail.
    Reviewed-by: default avatarXavier Deguillard <xdeguillard@vmware.com>
    Signed-off-by: default avatarNadav Amit <namit@vmware.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    c7b3690f
vmw_balloon.c 34.8 KB