From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 2/5] build: Hook the schedulers into Kconfig Date: Fri, 8 Jan 2016 17:13:19 +0000 Message-ID: <568FEE2F.6090305@citrix.com> References: <1452187761-38328-1-git-send-email-jonathan.creekmore@gmail.com> <1452187761-38328-3-git-send-email-jonathan.creekmore@gmail.com> <20160108154744.GE32260@char.us.oracle.com> <568FDBBA.8050103@citrix.com> <568FE00D.6080906@suse.com> <568FF6B102000078000C50CE@prv-mh.provo.novell.com> <568FEAD3.3040109@cardoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aHabO-0002qZ-Tk for xen-devel@lists.xenproject.org; Fri, 08 Jan 2016 17:13:27 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jonathan Creekmore , Doug Goldstein Cc: George Dunlap , Juergen Gross , Dario Faggioli , Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 08/01/16 17:04, Jonathan Creekmore wrote: > Doug Goldstein writes: > >> On 1/8/16 10:49 AM, Jan Beulich wrote: >>>>>> On 08.01.16 at 17:30, wrote: >>>> So, based on the Kconfig setup and the linker ASSERT, there should be no >>>> way to have a default scheduler that is not in the build. I wish Kconfig >>>> allowed you to state that you must have at least one option selected or >>>> up to all of the options selected (so I could require 1-4 schedulers >>>> compiled in, but not 0). Unfortunately, the only way that seems allowed >>>> is if you compile code in as modules, which Xen does not (with a choice >>>> block, you can select multiple items as M, but only 1 as Y, but at least >>>> 1 must be present --- since we only support Y, the choice block wouldn't >>>> work for the schedulers). >>> Perhaps credit should just not be configurable then? >>> >>> Jan >>> >> How much effort are we willing to put in saving someone? We've already >> got these options completely hidden away. We've already given the user a >> warning that what they're doing isn't supported and they shouldn't be >> touching this. Then they have to disable the scheduler that they pick as >> the default. How many people are we expecting to really do this? I'm all >> for idiot proofing things but at some point we've got to say there's >> enough barriers to prevent this from happening. Otherwise we need to put >> a Xen developer in every Xen users home or office. > At this point, with the (not submitted yet) ASSERT in the linker file, > it is a compile error to not have any schedulers linked in and Kconfig > enforces that only schedulers compiled in can be a default. I think that should be sufficient. A user has to go a long way out of their way to get into this situation in the first place. If there is a nice way for checking for an empty string in the preprocessor, then something like BUILD_BUG_ON(ARRAY_SIZE(CONFIG_SCHED_DEFAULT) == 1); would also be a good sanity check, but I doubt this specific example compiles. ~Andrew