Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4851429imm; Mon, 17 Sep 2018 23:41:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZp1zO30JRWm+bhAty+znEgt1eDrmB1vj4q66FWJ/gP0EH43VxIUmTRzq6d0pGHAHgfQif9 X-Received: by 2002:a17:902:8506:: with SMTP id bj6-v6mr27551061plb.210.1537252883251; Mon, 17 Sep 2018 23:41:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537252883; cv=none; d=google.com; s=arc-20160816; b=pBDO3DwAcpiWzH/REMXvzIrjeQ1PPTNEvpVJvROff+TBWonb1lE+JHzg1snth0Gk8Y x/O06XUoZHlVYT1iCN5sLEQelblyqG07znJzKnCMB7P8JSI7N7yXex7ytF2tuu3vpD3G hpwfZJPJG+50FhWWAp1cQwaaF8BlkIVhjZ+CtNAFfHl3Dd9kwiXuFMzUL3A702kCXvMs bDcAarKympnvI5nmDHzzjtssWRaeNJIKoSA6RXAjkKAQ8nn2y70fphZ8c1N/KH6HRJn5 3aI/LlL7Vl1Xwl9hFBIkrTqbVshO9ovJzpubWtamKYFHaI5de0tKUBmMT4agY4wDW1I4 8+IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=PTg/QWOPmIVEMeEq8TI+hOF9oH4OEk51GpiHVsRjXjU=; b=noft1tYLUEe/aw1jLt0R3uYoJqM9WBCv9y/VGzzDyukZh8IIILr0Pm4J/nE+fns2RO BnFnm3tMpkt7FtBXbSeAjoyAs72NnGE8g3wZfy4QNBZs9xl/NU8I+jiVIACLo2Bz8w9u UIcA4S+9JjN/NqM1lkVC2RqkZK/j0bMXYxeI+weNY25l4qEydSbSfTA0OtGc6x99DtXW osizLxz/VhcH9wBOGjL8qiSrixpiVP/3fgoeKqykzpC/iCyeiF9rl97niLFcxwV3lGjB 43qZzaNb9bIs1kR+3DLTkhBeB61dc9Ne/RFEvD47eZGMdYo6AHoYhhmphIuit4x65wTT 7kPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si16834720pgs.322.2018.09.17.23.41.07; Mon, 17 Sep 2018 23:41:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729423AbeIRMLj (ORCPT + 99 others); Tue, 18 Sep 2018 08:11:39 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:36971 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729295AbeIRMLj (ORCPT ); Tue, 18 Sep 2018 08:11:39 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Mon, 17 Sep 2018 23:39:56 -0700 Received: from sc2-haas01-esx0118.eng.vmware.com (sc2-haas01-esx0118.eng.vmware.com [10.172.44.118]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 3E17B40926; Mon, 17 Sep 2018 23:40:20 -0700 (PDT) From: Nadav Amit To: Arnd Bergmann , Greg Kroah-Hartman CC: , Nadav Amit Subject: [PATCH 13/19] vmw_balloon: add reset stat Date: Mon, 17 Sep 2018 23:38:47 -0700 Message-ID: <20180918063853.198332-14-namit@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180918063853.198332-1-namit@vmware.com> References: <20180918063853.198332-1-namit@vmware.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX13-EDG-OU-002.vmware.com: namit@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is useful to expose how many times the balloon resets. If it happens more than very rarely - this is an indication for a problem. Reviewed-by: Xavier Deguillard Signed-off-by: Nadav Amit --- drivers/misc/vmw_balloon.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index cf5e41dd7048..0b3343d84aa8 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -216,7 +216,8 @@ enum vmballoon_stat_page { enum vmballoon_stat_general { VMW_BALLOON_STAT_TIMER, VMW_BALLOON_STAT_DOORBELL, - VMW_BALLOON_STAT_LAST = VMW_BALLOON_STAT_DOORBELL + VMW_BALLOON_STAT_RESET, + VMW_BALLOON_STAT_LAST = VMW_BALLOON_STAT_RESET }; #define VMW_BALLOON_STAT_NUM (VMW_BALLOON_STAT_LAST + 1) @@ -1288,6 +1289,7 @@ static void vmballoon_reset(struct vmballoon *b) vmballoon_deinit_batching(b); } + vmballoon_stats_gen_inc(b, VMW_BALLOON_STAT_RESET); b->reset_required = false; error = vmballoon_vmci_init(b); @@ -1365,7 +1367,8 @@ static const char * const vmballoon_stat_page_names[] = { static const char * const vmballoon_stat_names[] = { [VMW_BALLOON_STAT_TIMER] = "timer", - [VMW_BALLOON_STAT_DOORBELL] = "doorbell" + [VMW_BALLOON_STAT_DOORBELL] = "doorbell", + [VMW_BALLOON_STAT_RESET] = "reset", }; static int vmballoon_enable_stats(struct vmballoon *b) -- 2.17.1