Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2866640rwb; Fri, 20 Jan 2023 08:16:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXsx90lztTxfYH67g16TRXg9kQNM/Xx9wDkZlfPnL4ncJeWOKQQ/cBAhf3ATMKK2S/Z5Tbp8 X-Received: by 2002:a05:6402:159:b0:49d:a87f:ba7b with SMTP id s25-20020a056402015900b0049da87fba7bmr14949154edu.39.1674231400048; Fri, 20 Jan 2023 08:16:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674231400; cv=none; d=google.com; s=arc-20160816; b=GFcUYFki4umrrAuaZ+j6JsK2KqkUnVLvSwMTIU0bu5Q9Tk+pVkhOO0eepaPDkluWAp ZvkaGHZwv95TAUESDRWjfR4GZzMLbH4G8ledSwIOdIajLKMELC6lzY3NgHCsHnzQrLTs U17k679s49jcNNzlrF3zwPZ28zDM1OcH6bGGMohkTjCEUGHgZRHsqtx/pl/Nl+Tv8EBr /bsyXBVSCmI+ypLCQbeQ8tQtH6EgHiL2sRfuEsajwt8RV8EoR51RFxtjH2KpGW3mcGYk zcRbnKVFsIXPaJRfbD43VZRiEu7pt6i8C62xThbfpCUDFbxHm4BsSNnEOPvQaImZlfU8 P3gg== 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=h34pQaaNc3Py6uCbKcESZyQQ/4GYsCvU9GfSkH8JUgE=; b=GhDI+QJbVdIYTu/TPelqFF8s3UAVjynTROx49Dfd6cCoZkL5WG7xA/ttE/tj9L7WbD X4FJQndYuvDD9M8CMw03C7eEsoj9fN82izFRFL4qgTImMdIcEi1g4QE1Snl9JLt4rY/O Qrv2ffb84Wyh+GW6dI7KBUa5loAucYioFkrrzUbrIRzaRIN3J7Z8KuHTPJPpZk2wxhwC MgPZvP0hWHkjmn2L2IgF5MG0B5Hyeujv1lWm0DaqKVzW3VijoLd4fqIcWqnqglFrogay B4knJDulmxJuUufOPj7HgyxyOG22ZXTaoKqZFan5d2uS9m5P7FL1Xm29ivVCvI8Z8soB VBUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AMGLwJ2z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w22-20020a05640234d600b0049ea0e7657asi4137745edc.11.2023.01.20.08.16.25; Fri, 20 Jan 2023 08:16:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AMGLwJ2z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229906AbjATQH0 (ORCPT + 50 others); Fri, 20 Jan 2023 11:07:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjATQHY (ORCPT ); Fri, 20 Jan 2023 11:07:24 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F0393929A for ; Fri, 20 Jan 2023 08:06:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674230801; 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=h34pQaaNc3Py6uCbKcESZyQQ/4GYsCvU9GfSkH8JUgE=; b=AMGLwJ2z+tVg2+ulenhbIY/Diaw/VmbtRyx+YzU3xSf370fWI4s8ta7Q8Niu8GsDEeMdy7 qW6wFNQv5ylGp5cOH7ON9VH0nW2Okahqj6kqokFtm26VmMrxut6FwCx7FFGwFMkJK8MUGQ VDPVbaSVsroqZ0WoSTDTBtWnqx2FTOY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-107-7y_Iflm6NJGEHzm2ve_kwA-1; Fri, 20 Jan 2023 11:06:38 -0500 X-MC-Unique: 7y_Iflm6NJGEHzm2ve_kwA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7144B3C1834F; Fri, 20 Jan 2023 16:06:37 +0000 (UTC) Received: from lorien.usersys.redhat.com (unknown [10.22.9.201]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 08558C15BAE; Fri, 20 Jan 2023 16:06:36 +0000 (UTC) Date: Fri, 20 Jan 2023 11:06:35 -0500 From: Phil Auld To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, mingo@redhat.com, vishalc@linux.vnet.ibm.com, peterz@infradead.org, srikar@linux.vnet.ibm.com, sshegde@linux.ibm.com, vincent.guittot@linaro.org, ritesh.list@gmail.com Subject: Re: [RESEND PATCH] sched/debug: Put sched/domains files under the verbose flag Message-ID: References: <20230119150758.880189-1-pauld@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 20, 2023 at 03:52:55PM +0000 Valentin Schneider wrote: > On 19/01/23 10:07, Phil Auld wrote: > > The debug files under sched/domains can take a long time to regenerate, > > especially when updates are done one at a time. Move these files under > > the sched verbose debug flag. Allow changes to verbose to trigger > > generation of the files. This lets a user batch the updates but still > > have the information available. The detailed topology printk messages > > are also under verbose. > > > > Discussion that lead to this approach can be found in the link below. > > > > Simplified code to maintain use of debugfs bool routines suggested by > > Michael Ellerman . > > > > Signed-off-by: Phil Auld > > Cc: Michael Ellerman > > Cc: Greg Kroah-Hartman > > Cc: Ingo Molnar > > Cc: Peter Zijlstra (Intel) > > Cc: Srikar Dronamraju > > Cc: Valentin Schneider > > Cc: Vishal Chourasia > > Cc: Vincent Guittot > > Link: https://lore.kernel.org/all/Y01UWQL2y2r69sBX@li-05afa54c-330e-11b2-a85c-e3f3aa0db1e9.ibm.com/ > > Small nits below, other than that: > > Reviewed-by: Valentin Schneider > > > @@ -402,15 +440,23 @@ void update_sched_domain_debugfs(void) > > if (!debugfs_sched) > > return; > > > > + if (!sched_debug_verbose) > > + return; > > + > > if (!cpumask_available(sd_sysctl_cpus)) { > > if (!alloc_cpumask_var(&sd_sysctl_cpus, GFP_KERNEL)) > > return; > > cpumask_copy(sd_sysctl_cpus, cpu_possible_mask); > > } > > > > - if (!sd_dentry) > > + if (!sd_dentry) { > > sd_dentry = debugfs_create_dir("domains", debugfs_sched); > > > > + /* rebuild sd_sysclt_cpus if empty since it gets cleared below */ > ^^^^^^^^^^^^^^ > Nit: sd_sysctl_cpus > > > + if (cpumask_first(sd_sysctl_cpus) >= nr_cpu_ids) > > Use cpumask_empty() instead? Heh, I didn't find that when I looked somehow :) Yes, that's what this check is doing. I'll fix these in a quick v2. Thanks! Cheers, Phil > > > + cpumask_copy(sd_sysctl_cpus, cpu_online_mask); > > + } > > + > > for_each_cpu(cpu, sd_sysctl_cpus) { > > struct sched_domain *sd; > > struct dentry *d_cpu; > > -- > > 2.31.1 > --