Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1617757imm; Tue, 22 May 2018 06:54:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoDR9BBxpBjNcQStZ8epgT4UKcLHnrmzPDS33MTht7gebCqaa+iFlz7EPUcdAw2fLOtGomm X-Received: by 2002:a63:6a08:: with SMTP id f8-v6mr19342195pgc.363.1526997264596; Tue, 22 May 2018 06:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526997264; cv=none; d=google.com; s=arc-20160816; b=sM0SvvZSF6T1TQ4NWaH1ctje8InVKYalT8eL2XGp0anopevQrEoPf7qvdofo5b+aU0 0xhuXHlegEDKCQ/8Qhc9idh7Gzup74AC0r0E5TeGSuNpI5fRUfqJq2FOt/zlkto9Ft0e 3/sqntrhYNQwLPgxUNG5BVeir4VJKX+EldZprG9/H7N4xQtJbxtTmE+wk2bQ4Lf0W/ji UGsk5DCB03OnOKVZ8gPThhaTC/3te5LTJ4JUZAUmewKNxGRZdMfU0zXbgUQnHoFDINGH 99V7MZA6vLxYLIb8GeaictTAzhxl55fjAQ8vWzf6nOF0gMJN7hXTyMCWxEE+ZhrQ8d8r aVWw== 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=xlW2EEmJB3In71duW8IETr1jmg5vnf032sxB7t6mE5Q=; b=Cec/VKGZRxT42G7oxGVGFeBQOr0JxeQKvXqZFGJf3OXnILjyiHhoD0JqJF8UEa5/mV dZIBK6Qj2wYX4NLj/Je17h3h1BjGlTO6tdxKSFNbOy8ZriF2RRuitkIcHZMJL5Ytxc7a 3RIqLHTGVo13cNH8WVXX5cDx5SXb/hFHe97y6Az12Ly6UmFY9++dboxUbSL2J6CYC1rq O2XPuW5FTaZm92ptSj1EmQttS9dR43EOCT9bw6HpMAx4xEWA7hKwJ0Z8CUHn640obYX5 5/cu/86StbPWIZXL1ziPSN6xBjcFbb1Mde/8EW6AuVQpTzvcGK3av+coaZjZBcRZi3CL 5bbQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i25-v6si8680944pgn.433.2018.05.22.06.54.08; Tue, 22 May 2018 06:54:24 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751351AbeEVNx4 (ORCPT + 99 others); Tue, 22 May 2018 09:53:56 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37271 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196AbeEVNxx (ORCPT ); Tue, 22 May 2018 09:53:53 -0400 Received: by mail-wm0-f67.google.com with SMTP id l1-v6so33952068wmb.2 for ; Tue, 22 May 2018 06:53:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xlW2EEmJB3In71duW8IETr1jmg5vnf032sxB7t6mE5Q=; b=NrmMQ/jSFa18kz/2KknKOYGLwk93PpPYcQrMKiaHSVHR81afQpxNmqSnSSJRzo9+Nq cE9qRDStOuUd3EQxJ5BKOHUwzI2kbeSig0KowUKZwIukUKVggDJmcNWVQqGvHchT4H1H tCXubq6PELy5wwV/o76a1bqpZWzyJ+6kS//rG6V9Ql4bzWa/vIR8IudVUw+1jV/hjbSu u9z4kOVmGn8a5mjDvWVfpqhHcMG+v7pz7PQzB0WYao4VdlrBtgnu0wj5e+Hnay6gIrVO Dmz8JP2tA3zCgjNFT8q7wbYpmuPzENcqAHUKetDGgZsrL+h/QpnTpncwOa/3XgJ+CFNT KsJg== X-Gm-Message-State: ALKqPwdgjPvZ7Zp4/VoKSZmrepc4pl+hRd9WpnSccjJykyzhnY3c+s38 7ceRmof12y86LnNfDZk/eMQjog== X-Received: by 2002:a1c:b943:: with SMTP id j64-v6mr1215594wmf.30.1526997232308; Tue, 22 May 2018 06:53:52 -0700 (PDT) Received: from localhost.localdomain ([151.15.207.242]) by smtp.gmail.com with ESMTPSA id d12-v6sm10705453wre.39.2018.05.22.06.53.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 06:53:51 -0700 (PDT) Date: Tue, 22 May 2018 15:53:49 +0200 From: Juri Lelli To: Waiman Long Cc: Tejun Heo , Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, Mike Galbraith , torvalds@linux-foundation.org, Roman Gushchin Subject: Re: [PATCH v8 6/6] cpuset: Allow reporting of sched domain generation info Message-ID: <20180522135349.GB31040@localhost.localdomain> References: <1526590545-3350-1-git-send-email-longman@redhat.com> <1526590545-3350-7-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526590545-3350-7-git-send-email-longman@redhat.com> 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 Hi, On 17/05/18 16:55, Waiman Long wrote: > This patch enables us to report sched domain generation information. > > If DYNAMIC_DEBUG is enabled, issuing the following command > > echo "file cpuset.c +p" > /sys/kernel/debug/dynamic_debug/control > > and setting loglevel to 8 will allow the kernel to show what scheduling > domain changes are being made. > > Signed-off-by: Waiman Long > --- > kernel/cgroup/cpuset.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index fb8aa82b..8f586e8 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -820,6 +820,12 @@ static int generate_sched_domains(cpumask_var_t **domains, > } > BUG_ON(nslot != ndoms); > > +#ifdef CONFIG_DEBUG_KERNEL > + for (i = 0; i < ndoms; i++) > + pr_debug("generate_sched_domains dom %d: %*pbl\n", i, > + cpumask_pr_args(doms[i])); > +#endif > + While I'm always in favor of adding debug output, in this case I'm not sure it's adding much to what we already print when booting with sched_debug kernel command-line param, e.g. --->8--- Kernel command line: BOOT_IMAGE=/vmlinuz-4.17.0-rc5+ ... sched_debug [...] smp: Bringing up secondary CPUs ... x86: Booting SMP configuration: .... node #0, CPUs: #1 #2 #3 #4 #5 .... node #1, CPUs: #6 #7 #8 #9 #10 #11 smp: Brought up 2 nodes, 12 CPUs smpboot: Max logical packages: 2 smpboot: Total of 12 processors activated (45636.50 BogoMIPS) CPU0 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 0:{ span=0 cap=1016 }, 1:{ span=1 cap=1011 }, 2:{ span=2 }, 3:{ span=3 cap=1023 }, 4:{ span=4 }, 5:{ span=5 } domain-1: span=0-11 level=NUMA groups: 0:{ span=0-5 cap=6122 }, 6:{ span=6-11 cap=6141 } CPU1 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 1:{ span=1 cap=1011 }, 2:{ span=2 }, 3:{ span=3 cap=1023 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 cap=1016 } domain-1: span=0-11 level=NUMA groups: 0:{ span=0-5 cap=6122 }, 6:{ span=6-11 cap=6141 } CPU2 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 2:{ span=2 }, 3:{ span=3 cap=1023 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 cap=1016 }, 1:{ span=1 cap=1011 } domain-1: span=0-11 level=NUMA groups: 0:{ span=0-5 cap=6122 }, 6:{ span=6-11 cap=6141 } CPU3 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 3:{ span=3 cap=1023 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 cap=1016 }, 1:{ span=1 cap=1011 }, 2:{ span=2 } domain-1: span=0-11 level=NUMA groups: 0:{ span=0-5 cap=6122 }, 6:{ span=6-11 cap=6141 } CPU4 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 cap=1016 }, 1:{ span=1 cap=1011 }, 2:{ span=2 }, 3:{ span=3 cap=1023 } domain-1: span=0-11 level=NUMA groups: 0:{ span=0-5 cap=6122 }, 6:{ span=6-11 cap=6141 } CPU5 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 5:{ span=5 }, 0:{ span=0 cap=1016 }, 1:{ span=1 cap=1011 }, 2:{ span=2 }, 3:{ span=3 cap=1023 }, 4:{ span=4 } domain-1: span=0-11 level=NUMA groups: 0:{ span=0-5 cap=6122 }, 6:{ span=6-11 cap=6141 } CPU6 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 cap=1021 }, 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 } domain-1: span=0-11 level=NUMA groups: 6:{ span=6-11 cap=6141 }, 0:{ span=0-5 cap=6122 } CPU7 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 7:{ span=7 }, 8:{ span=8 cap=1021 }, 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 } domain-1: span=0-11 level=NUMA groups: 6:{ span=6-11 cap=6141 }, 0:{ span=0-5 cap=6122 } CPU8 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 8:{ span=8 cap=1021 }, 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 } domain-1: span=0-11 level=NUMA groups: 6:{ span=6-11 cap=6141 }, 0:{ span=0-5 cap=6122 } CPU9 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 cap=1021 } domain-1: span=0-11 level=NUMA groups: 6:{ span=6-11 cap=6141 }, 0:{ span=0-5 cap=6122 } CPU10 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 cap=1021 }, 9:{ span=9 } domain-1: span=0-11 level=NUMA groups: 6:{ span=6-11 cap=6141 }, 0:{ span=0-5 cap=6122 } CPU11 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 cap=1021 }, 9:{ span=9 }, 10:{ span=10 } domain-1: span=0-11 level=NUMA groups: 6:{ span=6-11 cap=6141 }, 0:{ span=0-5 cap=6122 } span: 0-11 (max cpu_capacity = 1024) [...] generate_sched_domains dom 0: 6-11 <-- this and the one below is what generate_sched_domains dom 1: 0-5 you are adding CPU0 attaching NULL sched-domain. CPU1 attaching NULL sched-domain. CPU2 attaching NULL sched-domain. CPU3 attaching NULL sched-domain. CPU4 attaching NULL sched-domain. CPU5 attaching NULL sched-domain. CPU6 attaching NULL sched-domain. CPU7 attaching NULL sched-domain. CPU8 attaching NULL sched-domain. CPU9 attaching NULL sched-domain. CPU10 attaching NULL sched-domain. CPU11 attaching NULL sched-domain. CPU6 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 }, 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 } CPU7 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 7:{ span=7 }, 8:{ span=8 }, 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 } CPU8 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 8:{ span=8 }, 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 } CPU9 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 9:{ span=9 }, 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 } CPU10 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 10:{ span=10 }, 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 }, 9:{ span=9 } CPU11 attaching sched-domain(s): domain-0: span=6-11 level=MC groups: 11:{ span=11 }, 6:{ span=6 }, 7:{ span=7 }, 8:{ span=8 }, 9:{ span=9 }, 10:{ span=10 } span: 6-11 (max cpu_capacity = 1024) CPU0 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 0:{ span=0 }, 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 } CPU1 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 } CPU2 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 }, 1:{ span=1 } CPU3 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 3:{ span=3 }, 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 }, 1:{ span=1 }, 2:{ span=2 } CPU4 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 4:{ span=4 }, 5:{ span=5 }, 0:{ span=0 }, 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 } CPU5 attaching sched-domain(s): domain-0: span=0-5 level=MC groups: 5:{ span=5 }, 0:{ span=0 }, 1:{ span=1 }, 2:{ span=2 }, 3:{ span=3 }, 4:{ span=4 } span: 0-5 (max cpu_capacity = 1024) --->8--- Do you think there is still a benefit in printing out what generate_sched_domains does? Best, - Juri