Received: by 10.223.176.46 with SMTP id f43csp192912wra; Thu, 18 Jan 2018 16:04:11 -0800 (PST) X-Google-Smtp-Source: ACJfBovC0iqVkil56TGdYCnofev5w/9/XcHcLALJjcRBgiHVLlXTNwJnXcxEQLsBCetS7gWt7glV X-Received: by 10.98.133.193 with SMTP id m62mr31215142pfk.18.1516320250894; Thu, 18 Jan 2018 16:04:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516320250; cv=none; d=google.com; s=arc-20160816; b=E8GDGSZKt+i9/gi4cx5xCroksjcGpRejqLjeQGTa5Q58BhKsvS1u87KJRZs+v2b9AN 8lyu91GRjzhwyvoiS5IEwgOSWufHT+2fyHK6UwO2VxnehhoYOJEyaY8BPrOKZQZLBIDB O3irdcsebV3dytOblEQrDu5dUwLfjUp57x1CoRJNoOyCKt6qUom8YuLspLFZw1TVBhJQ v9NnGH/Hc7Hpx8Odplv/koIRKkmTyhgOXsmFbkwEEMLWdIYho1BOsDrChzkoHG52aq/l D2BBEU/LZATFBbqk3f1f4tIdutnuzgCoRW9Njz48+CdWorKjhrbNU9x3pahspxVkTJWA Hg8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:arc-authentication-results; bh=bvfKZRBkU6e0UUXOW+yAh5wtUYS9Bp03MHjRx1yFuF0=; b=dAfHoFtG7NF7u529R8Moh8s1G8DkzJTa2qfbniTQUMPK3CVN4hw+b1UQivC5bSurcl CfEQB7Gm4Mv+U7e7LgtkWiGFnXrLF08TzbnqY7MFOeU65T2iIngT/k0EcnfmRRJ089U/ uUu72Pv0uLEJZocyUFFwgj5qsf6PrQdusabmvmQ82RgvDnpize3wH3gyKDlSbKCdOI/8 wNrN4RlSNOS8krnUZ+nXcZLCgHL4FR6BQC/iG1DsTkNSa0FOsZ0fINtIJupgWwgwpy4c /Nh9tn49J1t8CNdD++HRpA/2xgtGIIO3eRLjkH35bZaxJU3+Q2cJIcl4fek+wf939PlN nG2w== 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 q184si7191197pga.242.2018.01.18.16.03.57; Thu, 18 Jan 2018 16:04:10 -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 S1755093AbeASADE (ORCPT + 99 others); Thu, 18 Jan 2018 19:03:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:39132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754860AbeASACs (ORCPT ); Thu, 18 Jan 2018 19:02:48 -0500 Received: from localhost.localdomain (i16-les03-th2-31-37-47-191.sfr.lns.abo.bbox.fr [31.37.47.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A516E2175D; Fri, 19 Jan 2018 00:02:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A516E2175D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=frederic@kernel.org From: Frederic Weisbecker To: Ingo Molnar Cc: LKML , Frederic Weisbecker , Peter Zijlstra , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Wanpeng Li , Mike Galbraith , Rik van Riel Subject: [PATCH 3/6] sched/isolation: Isolate workqueues when "nohz_full=" is set Date: Fri, 19 Jan 2018 01:02:17 +0100 Message-Id: <1516320140-13189-4-git-send-email-frederic@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516320140-13189-1-git-send-email-frederic@kernel.org> References: <1516320140-13189-1-git-send-email-frederic@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As we prepare for offloading the residual 1hz scheduler ticks to workqueue, let's affine those to housekeepers so that they don't interrupt the CPUs that don't want to be disturbed. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: Luiz Capitulino Cc: Mike Galbraith Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Wanpeng Li Cc: Ingo Molnar --- include/linux/sched/isolation.h | 1 + kernel/sched/isolation.c | 4 +++- kernel/workqueue.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h index d849431..4a6582c 100644 --- a/include/linux/sched/isolation.h +++ b/include/linux/sched/isolation.h @@ -12,6 +12,7 @@ enum hk_flags { HK_FLAG_SCHED = (1 << 3), HK_FLAG_TICK = (1 << 4), HK_FLAG_DOMAIN = (1 << 5), + HK_FLAG_WQ = (1 << 6), }; #ifdef CONFIG_CPU_ISOLATION diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index b71b436..8f1c1de 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -3,6 +3,7 @@ * any CPU: unbound workqueues, timers, kthreads and any offloadable work. * * Copyright (C) 2017 Red Hat, Inc., Frederic Weisbecker + * Copyright (C) 2017-2018 SUSE, Frederic Weisbecker * */ @@ -119,7 +120,8 @@ static int __init housekeeping_nohz_full_setup(char *str) { unsigned int flags; - flags = HK_FLAG_TICK | HK_FLAG_TIMER | HK_FLAG_RCU | HK_FLAG_MISC; + flags = HK_FLAG_TICK | HK_FLAG_WQ | HK_FLAG_TIMER | + HK_FLAG_RCU | HK_FLAG_MISC; return housekeeping_setup(str, flags); } diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 43d18cb..c296dc9 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5546,7 +5546,8 @@ int __init workqueue_init_early(void) WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); - cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_DOMAIN)); + cpumask_copy(wq_unbound_cpumask, + housekeeping_cpumask(HK_FLAG_DOMAIN | HK_FLAG_WQ)); pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC); -- 2.7.4