Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1343611lqz; Mon, 1 Apr 2024 03:24:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/44k6XD1W+Gf4jOf3erykLQg5myUpsYSRtxpochLj28hIoGxZtoa8nSdkaUkfhuKc80f11O+e3LlIi4kkRP8el4wH5bpUGULyFDNmVQ== X-Google-Smtp-Source: AGHT+IHaNElOBNnWnG76AaRayRwbCtaQb9fBLM+MTMhKcFLOy83rVrVinp0xh38o3uUYArs0GUwm X-Received: by 2002:a05:6a00:4607:b0:6ea:d149:c4e with SMTP id ko7-20020a056a00460700b006ead1490c4emr9040907pfb.14.1711967043444; Mon, 01 Apr 2024 03:24:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711967043; cv=pass; d=google.com; s=arc-20160816; b=HKKJ9BPxyzOOeW26oUpLs3MFZB1U9QEtIjDCauSJGjP5qL1sER/JyRKZ4cdPokdAqv CwV9fcrEzoW3EIwGa6fcnTNzIBb11/uumLmQnCIaddVaKVa6wOWRYYnXBFpqT37tzqXP f/2s7/VeRD3UVxe0xwiFE6rG7HvoDvmHdxJZz8lr0hL2xKo7bicQglhsEEgMhjog20p6 anocKP4Bd0A838qtmZ0q05SMfhsFfyaCNZrLQ/r3opa2mUSlTxxEGz/RRWLBUVrLDZCl Nnu/48PTEsPqV9JW3bQetgt17UZywV67REhGB3o5rNPMVKCJcldkY2cLgglis1i9BgbM rEPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=8EBVVELRlloFUQoXXd2/6rE6F2ZhQRz7Jocir1jRoIE=; fh=LmkWkf/pKqt00bBOQ2ZyGM/2Qe3njHMASMp35JGj50c=; b=ChXwsaSzbAgL4sVwMR48nBHN/uAdFSjdZXq+3crDPD6x05WxqrGB1po75KEiWaVBsB sOuvRpHt4B37oCla9p/MT4uBfaHw2OKLmnqRiPWHOl0oITJSmf+W+btaAb3yS7SxErld jksVx7Ez6UphMNL7QuB5BJHbnAtJLdXgGyWQuCFjnpLjLrUCWAnEhj1nogs6ely/mhwS qDR1L7eZ20ZufBiVPnXT7oQHL/7qSgZ6cmH7TVLKeCctYcGDnmaRjeJozVLQFBsTB24t wAUHdrELnPKnTy/eHIXe7kZ9rLbmEQSrvExoKg8nYnEhsg2i4T7XY/cDkOrY83WWIcPE juKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rMDDXGOM; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-126593-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j14-20020aa78dce000000b006eac04ca890si8541336pfr.352.2024.04.01.03.24.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 03:24:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126593-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rMDDXGOM; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-126593-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126593-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 20EF6281F7B for ; Mon, 1 Apr 2024 10:24:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FB0D17552; Mon, 1 Apr 2024 10:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="rMDDXGOM" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1596171C1 for ; Mon, 1 Apr 2024 10:23:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711967037; cv=none; b=tU/XebRgCFiZPzQfN9OxtX5lCZLggWZ+iwUu4pk16vbC+Yq7nsS23ezDL60dkFUsJuF+jUOs7s2INJNM0LW71bFkO+UwI52yoyOHijVFoa/1/Avo4IZxvx7euotPIscuqpAB88ZQTFSxwRYlltevWwE2Fbljw7+a6gxXTPRIT4c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711967037; c=relaxed/simple; bh=EeWKaS/LZJtZiEm6l6kYUAh03ghALVCWXrf2Zb7Zl7Y=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=G2iGPiShxOTOExtSrK8LCcy5PHexnj1AUS2q42x+Bf/PaCX9oTe6WNsQfO3tyHWv8LCQrkoEiU663eaaKeISJQ/4rE0PVGEoWu2wkf94SI7Cdo6nQ5PF1ODr0sFeIGcbQ9MtLIby5n3j3IFkCqmY5FYUf+Tti5SYB3lxz6ejciA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=rMDDXGOM; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1e0ae065d24so31653235ad.1 for ; Mon, 01 Apr 2024 03:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711967035; x=1712571835; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=8EBVVELRlloFUQoXXd2/6rE6F2ZhQRz7Jocir1jRoIE=; b=rMDDXGOMe1mREj3VVGOUDb0RZILV4LULPo0+S1ZuzqZvnMYBswpOb+W96O7vHSilu9 ek6IMY9FtfbovyXeDzS0IlPyZsF6s4M5WRxly++PSZXMS/OW5NBtDep4RDSwjR2EFkMh m6LjQ0paMuT5qGfcJOouwa67P5yghxUIuBKztGWi1MEKrorUk+xatblwHwXQKSw4o6cA Gto7/TS8Azx6gJsiPMQKepFEBnXlXQy42jT5PXKW4oVMS+u2qTJoe1j92nB79japK4Kb uGtp66LhbbP4WdsuTgc9887Cb5ByMPKb4A14QUOw7mo2EODGf3MP8TAkm1hNYKMQhwn6 CvpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711967035; x=1712571835; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8EBVVELRlloFUQoXXd2/6rE6F2ZhQRz7Jocir1jRoIE=; b=Q8DzURhhSCacD6GhY1b+0Ug0HSPxtNO6TYBpvfrXsoG7GQQvSsx/5QIxNxymfTZB1W 9na0ZuNIA+8RRQJ657alGKzHAsTLrdvINkV4+jdbfsAYiPPO+9Yv3KwAj+0UzHuI1WnS tpf5YUqe+IJCn4HqAzckRhVyKiI2KsfWj+8GA5ceInEAJT0wQZeByzIC4MvVtyIkqwLu KwKGrdF9G6LH3KVGOdyK2UdQzshGmubQHU5kCD9HHGU2dcX/CYsvBNRa3Ok2OaDaU5x/ LO9A6yR3DUqelgL25c0+klEUImIDmHip1ubRV98YiSfR3wIYJOfbJeu0DPEn8i0cq4Ew e15A== X-Forwarded-Encrypted: i=1; AJvYcCUDRjiSIcIQsz8GLdLfo8MTC0cfGteZLUhGW1J9LrlQNoDgyWfUANmpncAdiT2X5cOd0b+TcJ31ylp64kKCSbUfu98/2dlY4rlKa9uG X-Gm-Message-State: AOJu0Yz+SSBh42JbYGmd93Bk1F+Qif3A01YHbn0Ki/6LYiOB7bIawB09 +5gE9Ww5LRZYbdmOF818SOkXOUz4IrRTJP2EQBFNwh2Hn7S3RpIOqKhTLWyitH33AMCcAxAngLJ OcLrcjcvB9Sha+jp9e9URMOULEhbmiE4XR6bvUA== X-Received: by 2002:a17:902:e549:b0:1e0:a7b1:ee92 with SMTP id n9-20020a170902e54900b001e0a7b1ee92mr9362674plf.62.1711967035254; Mon, 01 Apr 2024 03:23:55 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Vincent Guittot Date: Mon, 1 Apr 2024 12:23:43 +0200 Message-ID: Subject: Re: [PATCH v2 1/3] sched/fair: allow disabling sched_balance_newidle with sched_relax_domain_level To: Vitalii Bursov Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Sun, 31 Mar 2024 at 18:02, Vitalii Bursov wrote: > > Change relax_domain_level checks so that it would be possible > to include or exclude all domains from newidle balancing. > > This matches the behavior described in the documentation: > -1 no request. use system default or follow request of others. > 0 no search. > 1 search siblings (hyperthreads in a core). > > "2" enables levels 0 and 1, level_max excludes the last (level_max) > level, and level_max+1 includes all levels. > > Fixes: 9ae7ab20b483 ("sched/topology: Don't set SD_BALANCE_WAKE on cpuset domain relax") > Signed-off-by: Vitalii Bursov Reviewed-by: Vincent Guittot > --- > kernel/cgroup/cpuset.c | 2 +- > kernel/sched/topology.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index 4237c8748..da24187c4 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -2948,7 +2948,7 @@ bool current_cpuset_is_being_rebound(void) > static int update_relax_domain_level(struct cpuset *cs, s64 val) > { > #ifdef CONFIG_SMP > - if (val < -1 || val >= sched_domain_level_max) > + if (val < -1 || val > sched_domain_level_max + 1) > return -EINVAL; > #endif > > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c > index 63aecd2a7..67a777b31 100644 > --- a/kernel/sched/topology.c > +++ b/kernel/sched/topology.c > @@ -1475,7 +1475,7 @@ static void set_domain_attribute(struct sched_domain *sd, > } else > request = attr->relax_domain_level; > > - if (sd->level > request) { > + if (sd->level >= request) { > /* Turn off idle balance on this domain: */ > sd->flags &= ~(SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE); > } > -- > 2.20.1 >