linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Kimberly Brown <kimbrownkd@gmail.com>
Cc: Michael Kelley <mikelley@microsoft.com>,
	Long Li <longli@microsoft.com>,
	Sasha Levin <Alexander.Levin@microsoft.com>,
	Dexuan Cui <decui@microsoft.com>,
	devel@linuxdriverproject.org,
	Haiyang Zhang <haiyangz@microsoft.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set
Date: Thu, 14 Feb 2019 11:50:19 -0800	[thread overview]
Message-ID: <20190214115019.0e914fa5@shemminger-XPS-13-9360> (raw)
In-Reply-To: <20190214061102.GA22473@ubu-Virtual-Machine>

On Thu, 14 Feb 2019 01:11:03 -0500
Kimberly Brown <kimbrownkd@gmail.com> wrote:

> On Mon, Feb 11, 2019 at 10:02:47AM -0800, Stephen Hemminger wrote:
> > On Mon, 11 Feb 2019 02:01:18 -0500
> > Kimberly Brown <kimbrownkd@gmail.com> wrote:
> >   
> > > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote:  
> > > > On Fri, 8 Feb 2019 05:01:12 -0500
> > > > Kimberly Brown <kimbrownkd@gmail.com> wrote:
> > > > 
> > > > You are right, the current behavior is broken.
> > > > It would be good to add a description of under what conditions
> > > > monitor is not used. Is this some part of a project emulating
> > > > Hyper-V?
> > > >     
> > > 
> > > I'm not sure which conditions determine whether the monitor mechanism is
> > > used. I've searched the Hypervisor TLFS, and I couldn't find any
> > > information. If you have any suggestions for where I can find this
> > > information, please let me know.  
> > 
> > The monitor page stuff pre-dates my involvement with Hyper-V. KY might know.
> > But based on comments it looks like it was added to avoid hypercalls
> > for each message. It probably showed up in Windows Server 2012 timeframe.
> > 
> > To test you might want to dig up Windows Server 2008.
> >    
> 
> It looks like the monitor mechanism has always been used. It's present in the
> earliest commit that I can find: 3e7ee4902fe6 ("add the Hyper-V virtual bus")
> from 2009.
> 
> I propose that the following sentences be added to the sysfs documentation for
> the affected attributes:
> 
> "The monitor page mechanism is used for performance critical channels (storage,
> network, etc.). Channels that do not use the monitor page mechanism will return
> EINVAL."
> 
> I think that this provides sufficient information for a user to understand why
> opening an affected file can return EINVAL. What do you think?

Thanks for following up. I agree with you EINVAL works as a solution.
My understanding is that their are two ways a channel can work. The first one is
for the guest to send a hyper call to the host to indicate when data is available.
The other is for the guest to indicate by setting a bit in shared memory with host.

The shared memory approach reduces host/guest overhead and allows for more opportunities
for batching in the ring. The host checks the shared memory on a polling interval
defined in the latency field.

The hypercall method does not use the monitor page. It has lower latency (no polling).

  reply	other threads:[~2019-02-14 19:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  9:57 [PATCH 0/2] Drivers: hv: vmbus: Fix sysfs functions that display monitor id and page data Kimberly Brown
2019-02-08  9:58 ` [PATCH 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0 Kimberly Brown
2019-02-08 22:28   ` Stephen Hemminger
2019-02-08 10:01 ` [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set Kimberly Brown
2019-02-08 22:32   ` Stephen Hemminger
2019-02-11  7:01     ` Kimberly Brown
2019-02-11 18:02       ` Stephen Hemminger
2019-02-14  6:11         ` Kimberly Brown
2019-02-14 19:50           ` Stephen Hemminger [this message]
2019-02-19  5:37 ` [PATCH v2 0/2] Drivers: hv: vmbus: Fix sysfs functions that display monitor id and page data Kimberly Brown
2019-02-19  5:38   ` [PATCH v2 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0 Kimberly Brown
2019-02-20 14:35     ` Michael Kelley
     [not found] ` <cover.1550554279.git.kimbrownkd@gmail.com>
2019-02-19  5:38   ` [PATCH v2 2/2] Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set Kimberly Brown
2019-02-20 16:11     ` Michael Kelley
2019-02-26  5:35     ` [PATCH v3] Drivers: hv: vmbus: Expose monitor data when channel uses monitor pages Kimberly Brown
2019-02-26  8:18       ` Greg KH
2019-03-01 19:18       ` [PATCH v4] Drivers: hv: vmbus: Expose monitor data only when monitor pages are used Kimberly Brown
2019-03-02 18:39         ` Michael Kelley
2019-03-03 21:40           ` Kimberly Brown
2019-03-03  8:05         ` Greg KH
2019-03-03 21:11           ` Kimberly Brown
2019-03-04  7:38             ` Greg KH
2019-03-08 22:46         ` [PATCH v5] " Kimberly Brown
2019-03-09  7:21           ` Greg KH
2019-03-12  0:04             ` Kimberly Brown
2019-03-19  4:04           ` [PATCH v6] " Kimberly Brown
2019-03-19  9:26             ` Greg KH
2019-03-20 20:18             ` Michael Kelley
2019-03-21  3:57             ` Sasha Levin
2019-03-21 15:55               ` Michael Kelley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190214115019.0e914fa5@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=Alexander.Levin@microsoft.com \
    --cc=decui@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=haiyangz@microsoft.com \
    --cc=kimbrownkd@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=mikelley@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).