public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
Cc: "olaf@aepfle.de" <olaf@aepfle.de>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jrp@pun.org" <jrp@pun.org>,
	"marcelo.cerri@canonical.com" <marcelo.cerri@canonical.com>,
	"apw@canonical.com" <apw@canonical.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"vkuznets@redhat.com" <vkuznets@redhat.com>,
	"leann.ogasawara@canonical.com" <leann.ogasawara@canonical.com>
Subject: Re: [PATCH v2 char-misc 1/1] Drivers: hv: vmbus: Implement Direct Mode for stimer0
Date: Fri, 26 Jan 2018 19:15:39 +0100	[thread overview]
Message-ID: <20180126181539.GA29801@kroah.com> (raw)
In-Reply-To: <DM5PR2101MB1030ECDF8405BDAD033E9595DCE00@DM5PR2101MB1030.namprd21.prod.outlook.com>

On Fri, Jan 26, 2018 at 05:34:28PM +0000, Michael Kelley (EOSG) wrote:
> > -----Original Message-----
> > From: Greg KH [mailto:gregkh@linuxfoundation.org]
> > Sent: Thursday, January 25, 2018 2:00 AM
> > To: Michael Kelley (EOSG) <Michael.H.Kelley@microsoft.com>
> > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; olaf@aepfle.de;
> > apw@canonical.com; vkuznets@redhat.com; jasowang@redhat.com;
> > leann.ogasawara@canonical.com; marcelo.cerri@canonical.com; Stephen Hemminger
> > <sthemmin@microsoft.com>; KY Srinivasan <kys@microsoft.com>; x86@kernel.org;
> > jrp@pun.org
> > Subject: Re: [PATCH v2 char-misc 1/1] Drivers: hv: vmbus: Implement Direct Mode for stimer0
> > 
> > On Mon, Jan 22, 2018 at 03:29:29PM -0700, mikelley@exchange.microsoft.com wrote:
> > > +/*
> > > + * If false, we're using the old mechanism for stimer0 interrupts
> > > + * where it sends a VMbus message when it expires. The old
> > > + * mechanism is used if Direct Mode is explicitly disabled
> > > + * by the module parameter, or on older versions of Hyper-V
> > > + * that don't support Direct Mode. While Hyper-V provides
> > > + * four stimer's per CPU, Linux uses only stimer0.
> > > + */
> > > +static bool direct_mode_enabled = true;
> > > +module_param(direct_mode_enabled, bool, 0444);
> > > +MODULE_PARM_DESC(direct_mode_enabled,
> > > +			"Set to N to disable stimer Direct Mode.");
> > 
> > Ick ick ick.  How is a distro or user supposed to know if/when to enable
> > this and not to enable it?  This isn't ok, can you please make this
> > "automatic" to always do the right thing based on what it is running on?
> 
> To be clear, this patch already does the "automatic" thing based on the
> capabilities of the hypervisor.  But it's often handy to be able to override
> the automatic behavior without having to rebuild the kernel.

Then put the option somewhere else.  sysfs, debugfs, somewhere else.
Never a module parameter please, not for new code.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

      reply	other threads:[~2018-01-26 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 22:29 [PATCH v2 char-misc 1/1] Drivers: hv: vmbus: Implement Direct Mode for stimer0 mikelley
2018-01-25  9:59 ` Greg KH
2018-01-26 17:34   ` Michael Kelley (EOSG)
2018-01-26 18:15     ` Greg KH [this message]

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=20180126181539.GA29801@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Michael.H.Kelley@microsoft.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=jasowang@redhat.com \
    --cc=jrp@pun.org \
    --cc=leann.ogasawara@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.cerri@canonical.com \
    --cc=olaf@aepfle.de \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    /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