Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2198334pxu; Fri, 9 Oct 2020 10:14:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzumDTeIhFIWTSrUUwJ6s6BlR+XFaS0IRfag2Mj855CdXef1R/oiRkzA+HPovpJ6fMFKtBO X-Received: by 2002:a17:906:6409:: with SMTP id d9mr15045399ejm.344.1602263660453; Fri, 09 Oct 2020 10:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602263660; cv=none; d=google.com; s=arc-20160816; b=bTtOdE6iSj5ZDLDvkJNYM7EzZss+uj7mVPIk4CqSVNIgdEjXm3fLyj5UbZ8SlVQPpU XsVsxXQ8p9KMOQHkkqfoSYbUCKGuhrLilFXWFjrmp10tpJXmadp6lo2Z9NMaN5JnT8ny +TYaBGt8Vq1AzdFiGRv2r/OPgapTEGZBJuQbCltn3hi5VccJIYVzMpmktA7lYCSMOzPs UVRERGiJP++sByaGtezMa/5XqN5EBKYPSKhAmFMTG8w4AqccttQF74iFWzVurQ0Wzhaf m+QYCFzrLESjiZ7Bq2Cjbdai1j0kfxcsOJWWkxlnrdQqNzT/ksJ8WpgIC8+KgdOCWs3Z LJXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tFEwM9P+2Pgk3Bpz9/Ar38HVU3AgqZXMl54cBXbjv8o=; b=0jeImPzbW/Ag0Uyu0ZCwJTfjISGRIByxVSavPDX4pBeNb2t6ylxc4u53cG0aMB6PSl 8jJiXQaOIpHucNA3qaOsTIHoXJ6GMb322CAUQgk/1WYQeTO4kbc17MUuQpnWLH1X67ZR yLwWVkMMJwzkqlmGZ43fRkwTbn7Gvfi0tI4t2TgCvr4nqilsod/Uww6XFE13xOiOAobd FZuf3M30IZe54BtIK6Wlh0J1DdJGBbF6uecGKhPO/18gOeD+F2eaYTWx6LGgkTMX0InB 4Dgxn413D9D7IAI3atZSUrst9KGy2dG1lfHOmrjfjf4K22kUJ5eA4UsE9FJbyh/OU2ku 4PFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qSU5CqC+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si6747293ejr.92.2020.10.09.10.13.57; Fri, 09 Oct 2020 10:14:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=qSU5CqC+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733034AbgJIJMV (ORCPT + 99 others); Fri, 9 Oct 2020 05:12:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:54708 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732712AbgJIJMV (ORCPT ); Fri, 9 Oct 2020 05:12:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1602234739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tFEwM9P+2Pgk3Bpz9/Ar38HVU3AgqZXMl54cBXbjv8o=; b=qSU5CqC+xWE7VQU/xG9shjjgjNJbtbp7K0xONm1bzOeyiOaPSomwtre7hK3xMPNEJUY7v/ XUqrDFhVOitju5mowGEhjMpobEcggrp9Yv5ICwH7q3oRCcDZTgj+A5O8Ihn6E8XesV38mp yfu5mi2OgHIbWybw4/f6KbeZZK1Z1Ac= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4ECE5ACF6; Fri, 9 Oct 2020 09:12:19 +0000 (UTC) Date: Fri, 9 Oct 2020 11:12:18 +0200 From: Michal Hocko To: Peter Zijlstra , Thomas Gleixner Cc: Frederic Weisbecker , LKML , Mel Gorman , Ingo Molnar Subject: Re: [RFC PATCH] kernel: allow to configure PREEMPT_NONE, PREEMPT_VOLUNTARY on kernel command line Message-ID: <20201009091218.GF4967@dhcp22.suse.cz> References: <20201007120401.11200-1-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201007120401.11200-1-mhocko@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 07-10-20 14:04:01, Michal Hocko wrote: > From: Michal Hocko > > Many people are still relying on pre built distribution kernels and so > distributions have to provide mutliple kernel flavors to offer different > preemption models. Most of them are providing PREEMPT_NONE for typical > server deployments and PREEMPT_VOLUNTARY for desktop users. > > Having two different kernel binaries differing only by the preemption > mode seems rather wasteful and inflexible. Especially when the difference > between PREEMPT_NONE and PREEMPT_VOLUNTARY is really minimal. Both only > allow explicit scheduling points while running in the kernel and it is > only might_sleep which adds additional preemption points for > PREEMPT_VOLUNTARY. > > Add a kernel command line parameter preempt_mode=[none, voluntary] which > allows to override the default compile time preemption mode > (CONFIG_PREEMPT_NONE resp. CONFIG_PREEMPT_VOLUTARY). Voluntary preempt > mode is guarded by a jump label to prevent any potential runtime overhead. > > Signed-off-by: Michal Hocko > --- > > Hi all, > this is sent as an RFC because it still needs some work. E.g. move jump > label changes into their own patch. They are needed mostly to get rid of > header files dependencies (seen for CONFIG_JUMP_LABEL=n via atomic.h -> > bug.h). > > I wanted to make sure that the idea is sound for maintainers first. The > next step would be extending the command line to support full preemption > as well but there is much more work in that area. Frederic has promissed > to look into that. > > Thoughts? Is there any additional feedback? Should I split up the patch and repost for inclusion? -- Michal Hocko SUSE Labs