Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp197111imj; Thu, 14 Feb 2019 18:28:32 -0800 (PST) X-Google-Smtp-Source: AHgI3IacHztimicCt+EX3lHBQ2eRXRp1qvGo5yzfCiV3H8xjvD97/mBaQFqCmc4GQvDoYOW6Hs7d X-Received: by 2002:a62:1382:: with SMTP id 2mr3625232pft.157.1550197712203; Thu, 14 Feb 2019 18:28:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550197712; cv=none; d=google.com; s=arc-20160816; b=yTf9TsKTvYkfLef4pmtV+xhT2HXyvuGBmq5rXtsENSQvEwtFD6N0RSqtU7xPB4VftC ushx54WXh2xd7bY29HECuu39VIF4zo8ZDMEk+EGvsoDtg+N3ObWHI25tB5+gD1MRgxPC JZ9CxlkAN0aO06EL6Z33wAsp4fqkd8c8/ENV5t9fy7qyrGn+bAdRxhozx8YtGaVumg8W RvVT2FCFtfrKTAuHxibOv69/JNdH/bkHMkES1Nk3avjGEJk28FMITn1kOXoFpNtWXkls yw3dWCndFXdArLLt1RuxF5QE2UfrChncEchyyBRi4fx7gVOD6pzR4avJqTih0/m4F+AS Cs4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pQ/PpuD/ksmTGbQMlfJizXdDL+SRTZuUDS4zjs+O1/Y=; b=RDNU8Snxkl50tciGRYjA8JVestkKqK2xkdWHgf/l8wOTczYunecqLeWItXowy94/aQ IugFiCZ5v5Mioa2xYcQtOBkTl1pvuU7k8M4lx8x9HaYYnDiV99Y+MTywaaK+tUyiEVfb axKvU0CVhMdWZsnnAEJpuRwKnvvLfTZYmpu3bRc6ZQdvYeVlgJgxRXqW0lOAqJKXgG7A MtSHRZLrWOWFrSPNmtBctHXzYJlZxFtcbaoJIzOhhQQOMvNlIZB0nM6RnsDRjOSZd614 RdpdZWZBs+OMK8EZgl0eilVE50w473ETFHCum/LvVtX+/Uv7Y7vChCuehZskmC8GycGC 2hoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kyWi2AA5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si4171092plp.424.2019.02.14.18.28.16; Thu, 14 Feb 2019 18:28:32 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=kyWi2AA5; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731145AbfBOB5E (ORCPT + 99 others); Thu, 14 Feb 2019 20:57:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:40422 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726443AbfBOB5E (ORCPT ); Thu, 14 Feb 2019 20:57:04 -0500 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6242B2192D; Fri, 15 Feb 2019 01:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550195823; bh=4K53UDdx78F4UBGvMl07QBDfjh5AmGkqdyuCcnG32+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kyWi2AA5GdgLm1MjJaLnfpjQdPhEWOolfUC3hgm/yv+5ZM2v5MGKs/2mWSeCMeLd7 dtTCxfJMUuJIj4fdkHOkeWczIeAZnLlv+VnwZkJ8LJgnP+YFGd+NTf9gZh8Z3EsBRi AIl9Agtvvt5JwpAcNNKkrDYZd9oPHRZu3yBlK6HI= Date: Thu, 14 Feb 2019 20:57:02 -0500 From: Sasha Levin To: Michael Kelley Cc: kimbrownkd , Long Li , Sasha Levin , Dexuan Cui , Stephen Hemminger , KY Srinivasan , Haiyang Zhang , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4] Drivers: hv: vmbus: Expose counters for interrupts and full conditions Message-ID: <20190215015702.GL69686@sasha-vm> References: <20190117043759.GA3395@ubu-Virtual-Machine> <20190204071309.GA3470@ubu-Virtual-Machine> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 04, 2019 at 04:25:34PM +0000, Michael Kelley wrote: >From: Kimberly Brown Sent: Sunday, February 3, 2019 11:13 PM >> >> Counter values for per-channel interrupts and ring buffer full >> conditions are useful for investigating performance. >> >> Expose counters in sysfs for 2 types of guest to host interrupts: >> 1) Interrupts caused by the channel's outbound ring buffer transitioning >> from empty to not empty >> 2) Interrupts caused by the channel's inbound ring buffer transitioning >> from full to not full while a packet is waiting for enough buffer space to >> become available >> >> Expose 2 counters in sysfs for the number of times that write operations >> encountered a full outbound ring buffer: >> 1) The total number of write operations that encountered a full >> condition >> 2) The number of write operations that were the first to encounter a >> full condition >> >> Increment the outbound full condition counters in the >> hv_ringbuffer_write() function because, for most drivers, a full >> outbound ring buffer is detected in that function. Also increment the >> outbound full condition counters in the set_channel_pending_send_size() >> function. In the hv_sock driver, a full outbound ring buffer is detected >> and set_channel_pending_send_size() is called before >> hv_ringbuffer_write() is called. >> >> I tested this patch by confirming that the sysfs files were created and >> observing the counter values. The values seemed to increase by a >> reasonable amount when the Hyper-v related drivers were in use. >> >> Signed-off-by: Kimberly Brown >> --- >> >Reviewed-by: Michael Kelley Queued for hyperv-next, thanks Kimberly! -- Thanks, Sasha