Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp74600lqp; Thu, 4 Apr 2024 07:28:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDnAlGkUkGjHnA2/jBeKTMAJ5EHNk8chV+XPBmFoZcDDUzo4Exd8SZ1ysuzsy/CeB4K60R5tiK/VDOZXeko2IZ+kVeL/YGR7pVGslmSA== X-Google-Smtp-Source: AGHT+IFlSzWS0UOpuTvSjapIF8kYrbb6jTAcmoKPqqlDg/6W3J+CI03pW9KATfL+fkY+H2choNss X-Received: by 2002:a05:6214:2388:b0:692:494f:f0aa with SMTP id fw8-20020a056214238800b00692494ff0aamr4450115qvb.9.1712240887746; Thu, 04 Apr 2024 07:28:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712240887; cv=pass; d=google.com; s=arc-20160816; b=A7yTIOAZ/2Sy6PXngxpGDmhgoBrtRCDrOJWBRjhAy97UdlNnoIZwRX+Kozj7q/oQhb h5Q0GWaGaChaghZBqVdCePtQyVDo6/tSF/Wz59h97gSg0jligXTy04uMJUsrwHSPgSck 75nKCWpLCdBjDckeEsXW/aOAKjdvDHe9SMbT/V9C+LPDIF2qzIBYJq9KsdPCjR1II4OE IQlzeZ67ICWQlRArrYHgo/mIOUSPP69sieGLCxFuAChqvVSkZ8yxkssMc+JBbftmyJfE x2iPo54/m/kpR00TqiGbqXlhmumqaSCrBFSTa4iGEuSA+H/6zH1lLbKKHHoU1YrQUsYw 5oeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=pcnLrydmfQX8SlteWcvzLWBpNoquMDGK5EArArRbwgg=; fh=N3JtGwxOdcXDbumKe7M4ierlIpP9nnTxp33R52CdU58=; b=om5FUqhmgKNnRhXoQDfQ9BDK1ityxShcdbZJ/FyXCD2M7QPAT3kf4XwrnsJYC8u4iW BLXja8iHaQ5Wn5P1m+9VkLl9C7WO/Agp5cPtLdHa/pAQ0tWkyf7u6YgeTJuU69CO/gtD IEtCap7Qpy13aTuo858xZUW2Ch3rME6CGljfO0akGpFAzEkoyLw+o2Z+DKtKk1LiuZ5E c3ovGQjoJglyNbvL/riHjHfj0Y1eQ8WeTyJfKmyZb2kw7k6ZoWa56v9Wmim7/kqC4xb3 vzeWdAa2AcNI9kIQYh2dDzRBNfiHyA8R7o0Xs6BHP5mmUOJpACNE1v7q6V5ZwDo59kS2 VR2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a+aU6a7o; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-131608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u19-20020a05620a023300b0078d3ac4bd54si3042561qkm.694.2024.04.04.07.28.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 07:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=a+aU6a7o; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-131608-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131608-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C7501C2A18C for ; Thu, 4 Apr 2024 14:24:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5670B12CDA8; Thu, 4 Apr 2024 14:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="a+aU6a7o" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0443312BF02 for ; Thu, 4 Apr 2024 14:22:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712240532; cv=none; b=ojMxlCsrGOa/3vkrR3gOlQThbwqEe1LH0jVoWOjhiDiXExby9+K5VXfKZzKBlpfaqbpJlOXISKdWOGo2CAdUZkoRxMcBPsYC8z3wwEId87iMNkin7+vDtPKH2kRcJ4TeLwzdExavGlD+Jgrrddi1t9gcP/y2PqYPOBU1RFBWEkE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712240532; c=relaxed/simple; bh=2cWTzX0zgJ2dUrcHjDb5nbu03D7jEnE/87jcgSZkCfQ=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=NNvtrDvQAGy7cmjb6WCZPurdcYhj0OCbZVNMW94rSSiTOHItutWc7yAjT5QqayoOhdSwUFwz2ZkF7Kz7sA4L0Y0FcIeyxjvti4He5kS0O4dxnGElcw2uGW79gRtlwjXb7inJnDFMvMHHbWlfppxv2T1vqDbIif2kKHIQvGDrquE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=a+aU6a7o; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712240528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pcnLrydmfQX8SlteWcvzLWBpNoquMDGK5EArArRbwgg=; b=a+aU6a7oJ/m1wLHmrwPf8ituvrgyXTQo9xECRkUzZBNLnua1ykBCjOWcj1zv//9qNa0vHc NtVBJFQvI+8kIcsHpjjQ4q00uTBrmC55OqF23/qO9stdWBJ3+g6aTR6GDYDo1m/LNIAOgS 8NDQQK1XfgjZl7y/uBZAQ7cfvc7e9nc= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-147-8YizbzUrNSeGjimZw0c17Q-1; Thu, 04 Apr 2024 10:22:07 -0400 X-MC-Unique: 8YizbzUrNSeGjimZw0c17Q-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-78a75243bfbso320245385a.1 for ; Thu, 04 Apr 2024 07:22:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712240527; x=1712845327; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pcnLrydmfQX8SlteWcvzLWBpNoquMDGK5EArArRbwgg=; b=PJnlc0kn22pPH8EvTw5SPSHlO36rcx1lFAg6o8fx+yK9Cv2SyDKY21kLJPPqczHDf6 pJjqPEs4d24HubWNcQj0LV+j/2QkJtk4EdUmunSeQGbva/MEDpYTfgAswDYlJfepHL97 8f7liFKoxzv4uwJQsMIr5Hedq2SAWEL41L+m0bYyrKYGS2P0wlJyGgDn3Pkun+3kfh4f /zUsE0UtTSi17WOM+aN45qwxJg3umyR/mpxgLg1/NNyDCnQq1h9DMXxk0XLLZzdkxjTG RRBZITGB0wPnmKGsRQrT3683N2c5SJHhImzPRP9gSLRW3toUQ7iLpqxYIwp2NleXC2rj UGag== X-Forwarded-Encrypted: i=1; AJvYcCV1QTxjBHp2pNSSOp1yUBuOC7qC5BqP7VygWox4brnl4+CJ+OwG54zErcIJbckkK/tVBX5cH1sAvxPxTCNa9YvpVyKyhGFm6sPNU5uF X-Gm-Message-State: AOJu0YwpLaUe2QydHVafPKQDE/i7uTaOBGZoJRpGkX5YYPU4VrgkesF+ YW8NZuvteUmE+e8xkd1HQ/ocV4AtWkIaAmwJ60y9+U/kLeKB651IZH3t/7Q5BNwdahFjXFLM+++ G/pqURrgVGs31wfdALiud/8T9yiiUgYeld/8j16FUxk0HJpmTPe32hB5CzFHhzg== X-Received: by 2002:a05:620a:6124:b0:78d:3b55:21c8 with SMTP id oq36-20020a05620a612400b0078d3b5521c8mr3691965qkn.24.1712240526723; Thu, 04 Apr 2024 07:22:06 -0700 (PDT) X-Received: by 2002:a05:620a:6124:b0:78d:3b55:21c8 with SMTP id oq36-20020a05620a612400b0078d3b5521c8mr3691933qkn.24.1712240526433; Thu, 04 Apr 2024 07:22:06 -0700 (PDT) Received: from vschneid-thinkpadt14sgen2i.remote.csb (213-44-141-166.abo.bbox.fr. [213.44.141.166]) by smtp.gmail.com with ESMTPSA id p11-20020a05620a056b00b0078a210372fasm5931267qkp.86.2024.04.04.07.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 07:22:05 -0700 (PDT) From: Valentin Schneider To: Vitalii Bursov , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Vitalii Bursov Subject: Re: [PATCH v3 2/3] sched/debug: dump domains' level In-Reply-To: References: Date: Thu, 04 Apr 2024 16:21:57 +0200 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On 03/04/24 16:28, Vitalii Bursov wrote: > Knowing domain's level exactly can be useful when setting > relax_domain_level or cpuset.sched_relax_domain_level > > Usage: > cat /debug/sched/domains/cpu0/domain1/level > to dump cpu0 domain1's level. > > Signed-off-by: Vitalii Bursov > --- > kernel/sched/debug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c > index 8d5d98a5834d..c1eb9a1afd13 100644 > --- a/kernel/sched/debug.c > +++ b/kernel/sched/debug.c > @@ -425,6 +425,7 @@ static void register_sd(struct sched_domain *sd, struct dentry *parent) > > debugfs_create_file("flags", 0444, parent, &sd->flags, &sd_flags_fops); > debugfs_create_file("groups_flags", 0444, parent, &sd->groups->flags, &sd_flags_fops); > + debugfs_create_u32("level", 0444, parent, (u32 *)&sd->level); How about reusing the SDM macro? ->flags and ->groups_flags get special treatment for pretty printing, but the others don't need that. --- diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index c1eb9a1afd13e..f97902208b34d 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -419,13 +419,13 @@ static void register_sd(struct sched_domain *sd, struct dentry *parent) SDM(u32, 0644, busy_factor); SDM(u32, 0644, imbalance_pct); SDM(u32, 0644, cache_nice_tries); + SDM(u32, 0444, level); SDM(str, 0444, name); #undef SDM debugfs_create_file("flags", 0444, parent, &sd->flags, &sd_flags_fops); debugfs_create_file("groups_flags", 0444, parent, &sd->groups->flags, &sd_flags_fops); - debugfs_create_u32("level", 0444, parent, (u32 *)&sd->level); } void update_sched_domain_debugfs(void)