Received: by 10.223.176.46 with SMTP id f43csp1008641wra; Fri, 26 Jan 2018 10:16:21 -0800 (PST) X-Google-Smtp-Source: AH8x2242pN6AlLYM3GrTtsroE7wKEBcv1lIv++b9rOdVtjvEiPpd04RV6vv8Wa4kN7WSoSvV9qnY X-Received: by 10.98.248.1 with SMTP id d1mr19911809pfh.222.1516990581773; Fri, 26 Jan 2018 10:16:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516990581; cv=none; d=google.com; s=arc-20160816; b=nRNBiV8BxEMObUoywYLMYomUTjyhD6kCkb9J9XUCVH2SAiVYTRtwbAl6lk0diNkPaQ ViCk2TwkUbmVK1NsuKy+kGTMiici1ox+CyIouxoUXUoL/ZTIEy4zpWSCvwn/kQmGUwQS Ig/zLVpca/2A8qgl3q9N5rdrh2K700atkpqSWy01cdrKeVkkD5w/xZVm7l542EcBNiMm CAFBuTmRY+XFA5iukSHFckM8f0PWIQPyfJbIK8J2zSYsCO7A2pNFT0g+XHG18YpPZdV8 GmZ08F1L9rXzWacujsyWSoWhzR8cu135iw78+FxgTlAYeSOmhEc5noEXq/vn78jlJLPT lvsw== 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:arc-authentication-results; bh=bAgZ5Wod7Q8Y3lXtPRLzhztyzxmoaSDP4o4heqOHqB4=; b=bBspX29iXI0EZTFLIbJqirScclipa/HY3Sqbud7JkMVztyNY/LSHDOgZh/GK58gW8h lQk6dvzppSPeMy/NxNYjcwwsRADXREDnpHDJr4E7e4q8pF51V3gmRV/8u/pAlNNWVOAl 1t15gSHVx0hb2kIHJDbTSTP8BXuIPPDJ1NYv2JjIkcKNPVEiQFsOTLZGS2w0lzBNvb1P RPA2i26sBigMOHaP4JB3bXltmvry/SxltDgaEmlF1Q5cYquwPlZXhfT7ql8CNMzTpcYi UsKphoLHWoOuTXkYxpJ7lxvGcII3kVEQmQo9vM9lFWobAFzfM0yLeK4OJ/pD9OFW5no9 CE8A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 74si6662822pfl.59.2018.01.26.10.16.07; Fri, 26 Jan 2018 10:16:21 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752350AbeAZSPn (ORCPT + 99 others); Fri, 26 Jan 2018 13:15:43 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:55628 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752089AbeAZSPm (ORCPT ); Fri, 26 Jan 2018 13:15:42 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0FF6AF66; Fri, 26 Jan 2018 18:15:41 +0000 (UTC) Date: Fri, 26 Jan 2018 19:15:39 +0100 From: Greg KH To: "Michael Kelley (EOSG)" 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 , KY Srinivasan , "x86@kernel.org" , "jrp@pun.org" Subject: Re: [PATCH v2 char-misc 1/1] Drivers: hv: vmbus: Implement Direct Mode for stimer0 Message-ID: <20180126181539.GA29801@kroah.com> References: <20180122222929.3762-1-mikelley@exchange.microsoft.com> <20180125095939.GA16968@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > > 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 > > ; KY Srinivasan ; 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