Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp297866img; Wed, 20 Mar 2019 20:57:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9CLAn1baNbOc54tuhF+woWLio1dO2BAaBXUgQtB/LZBbYEeVNyHCNCylfMhjOnwxkhFjJ X-Received: by 2002:a17:902:784d:: with SMTP id e13mr1453578pln.152.1553140679475; Wed, 20 Mar 2019 20:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553140679; cv=none; d=google.com; s=arc-20160816; b=KS/ki9qh9QgcR/rHwFkem/QsKCg1QRmyCTo3Lp1x9Xm3V2p6IKF7QI45+LB6o6rAES 7YWEfxjkb7v7KO6jy8sJzTTYIP3em0pMmZlsKUYGG5MrTE3C1zKZWBLIdQAoXmkv++E6 /b7iA3viiz0aHlMAA7yKM9uS4GitaXyUWwY1bhuowE7oSRoawBNz7JMQZcjsLMfyZf6C i2Ei/ke1AJXGS9ubjKMGeh/wksl4Et15Xd2qkycYXFtQziFZVPQlzTw3fUtZc6GXIGAI GRNxqFF1LJc/JJf1tqnObJv/mjwEmEvuRK/mU3RVCmsJfdodeOBncewRrt3Vd2ooLpZp ZuqA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rbC2rOdT+f1vuiTnn4H48uqnaLttNCEQzv52Lkrxrkg=; b=EBrVv5GRpe+wys9idCRb3ZFlqtLcvemPVAr/ThqHHCrbzhpO8wHYO4CCwM9ea3u1Wy 4helNlZpuKFMFF/8AnfG7G+soAAWfc3IlrhekyyfrpyBEtG0xeHX1Pkg8JgWZ2a/0K7R WQmuMZUNqh7zvDmQQbTgp4aybnMzqdNQM0DluDD6HkacyPNpnL1l/Ba+UYqhTVWb4T+L gdo6uOaJB260LVQzv7hkdS9Alrv+2dMPTukD55WT8XzIhAtj541o4zBmI5lLHL3qnXbS mA/KmvaDpgB/coPIdUdit6fWrgKEVSXbPxQ8tse97127r1ro29bw0OwDaJTFRelxWcrW TfdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Gzvq9/Xr"; 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 k7si3326876pfb.69.2019.03.20.20.57.44; Wed, 20 Mar 2019 20:57:59 -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; dkim=pass header.i=@kernel.org header.s=default header.b="Gzvq9/Xr"; 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 S1727899AbfCUD5H (ORCPT + 99 others); Wed, 20 Mar 2019 23:57:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:60742 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727511AbfCUD5H (ORCPT ); Wed, 20 Mar 2019 23:57:07 -0400 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 24E4C218B0; Thu, 21 Mar 2019 03:57:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553140626; bh=rbC2rOdT+f1vuiTnn4H48uqnaLttNCEQzv52Lkrxrkg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gzvq9/XruHwnUja0s05ds/NagNQ8vA8zd9sxsdWJwKNfDSVfmhDPOuiIWARzOEJ1a sZ98HDrAgBrenuX12T1RNmBERMW3Lq4ifVDFwzOOtDaXHM14PNYPtaN2XqrnUWMMiL OkJBiA1+OGpkmUgUMm6D0RrFDXq9G2xtOzVk0z9k= Date: Wed, 20 Mar 2019 23:57:05 -0400 From: Sasha Levin To: Kimberly Brown Cc: Michael Kelley , Long Li , Sasha Levin , Stephen Hemminger , Dexuan Cui , Greg KH , "K. Y. Srinivasan" , Haiyang Zhang , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6] Drivers: hv: vmbus: Expose monitor data only when monitor pages are used Message-ID: <20190321035705.GE25262@sasha-vm> References: <20190308224611.GA3047@ubu-Virtual-Machine> <20190319040401.GA3050@ubu-Virtual-Machine> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190319040401.GA3050@ubu-Virtual-Machine> 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 Tue, Mar 19, 2019 at 12:04:01AM -0400, Kimberly Brown wrote: >There are two methods for signaling the host: the monitor page mechanism >and hypercalls. The monitor page mechanism is used by performance >critical channels (storage, networking, etc.) because it provides >improved throughput. However, latency is increased. Monitor pages are >allocated to these channels. > >Monitor pages are not allocated to channels that do not use the monitor >page mechanism. Therefore, these channels do not have a valid monitor id >or valid monitor page data. In these cases, some of the "_show" >functions return incorrect data. They return an invalid monitor id and >data that is beyond the bounds of the hv_monitor_page array fields. > >The "channel->offermsg.monitor_allocated" value can be used to determine >whether monitor pages have been allocated to a channel. > >Add "is_visible()" callback functions for the device-level and >channel-level attribute groups. These functions will hide the monitor >sysfs files when the monitor mechanism is not used. > >Remove ".default_attributes" from "vmbus_chan_attrs" and create a >channel-level attribute group. These changes allow the new >"is_visible()" callback function to be applied to the channel-level >attributes. > >Call "sysfs_create_group()" in "vmbus_add_channel_kobj()" to create the >channel's sysfs files. Add a new function, >“vmbus_remove_channel_attr_group()”, and call it in "free_channel()" to >remove the channel's sysfs files when the channel is closed. > >Signed-off-by: Kimberly Brown I've queued it up for hyperv-fixes, thanks Kimberly. Should this go in stable as well? -- Thanks, Sasha