Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp314259lqs; Tue, 5 Mar 2024 02:56:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXSfw9NXqlo3QzOLZiXEdML9aRNPlsUtUehBCcoXfYvMMswj2QkfvF+ON1FmNKAnoMlV1rMO9FBQGVsgm5LSoLYjSaMaSN03Tnt3M0huA== X-Google-Smtp-Source: AGHT+IHSbYw4sc9XGd3X/dGumQn2BMr4gEKFaHA1lIa2XjVYX7BlZO4Y5hMEL+drABvPyribhWJP X-Received: by 2002:aa7:d803:0:b0:566:ff83:bfbf with SMTP id v3-20020aa7d803000000b00566ff83bfbfmr6809814edq.37.1709636186048; Tue, 05 Mar 2024 02:56:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709636186; cv=pass; d=google.com; s=arc-20160816; b=K7oUed4/P1PKwoLxmdypmsAo11cdp+8v6m+FfyUV4fTVLYXIBwsB8pmxxjHFEAp0wO GCKA1mfzGxvyQJk+Kh/qikr203SNKmhs8TBa1ZRQF+/V0wPkGscb6KuNAxsUc6a0nUEe Xt9asFV6kEB0Yn8rlUfCxwCmsr4TO4ztq0wA6bVZPBdGpOmHJAq2ADUJKxb0WWhcgfk0 XcMnWeUd+ZV00+bDhEfKtyMpchqcg+N5rUedTWVuh+l//tgWSgkRnD9K81FxtbgCJIS0 5gMUBLkMQZoY0LhTl0KI6YeE0dpE+inQkkVwEyNRvPhFG6SDGyyYYY2iLyZ8/CNr3Qa/ Xn5g== 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:cc:to:from :dkim-signature; bh=mVYxwMtTQeWVE4Tn/hbP7z3GmeUiFdt48l1PZlAeQnI=; fh=bxisIxCkBfVTx7fKFVk2lk9kT/eq2xwN4oHVHVa7XYk=; b=Vo4JDXgUuCzcVjdmrGGfYUxVV6ERNg4f1kBxCmC2dqZHWFntb+Io+71eJSHWZQrLa6 0JhnRjayDYKzXBiyWaT2isz236TDZPY0J3ieAUYxUCNweXzWs9tFGTtCUl+mja1YyS8V eS/cxVmbu5cy8lZlwTXMpE6DUJWunoYUmMbySlMGEvJpBPNiPGLFmLPFmvIY9i2XJmFX 9CaVxl7XC43KYnCJX4k4gHRuargdGP+irsPMlIclbbJGcUBQyXBsxrSb4la0I2pxrDM3 NgueaqYQfhfLLEdZoZatKqW1TN3DwoIme/Wng5jmQmkGj2RuMe3CIRX82HMC/Og61+c8 xDUw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EKOk9+4W; 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-92180-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v10-20020a056402174a00b005673ceae7ecsi2008065edx.621.2024.03.05.02.56.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 02:56:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-92180-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=EKOk9+4W; 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-92180-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-92180-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C56581F256D1 for ; Tue, 5 Mar 2024 10:56:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97F0E59B62; Tue, 5 Mar 2024 10:50:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EKOk9+4W" 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 5908C5917F for ; Tue, 5 Mar 2024 10:50:45 +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=1709635846; cv=none; b=bI4Gx0r+HdsX8BKcS6dyJ84eps6mIKNG/LO7DRNYiu5H8kMFMOkwf4IagH5fUIaafhJfSjtlw8GNqixVxoVOzFQlH8n+WsON0PhH4UfcsdbIGviVnhC4VWLYK2gxpMMprUk2nNCteVfO/LaP54wjmILvkuKX4gLQ8BBzCjV64+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709635846; c=relaxed/simple; bh=mfZrCRo1Le3xvhlG8sWohmJVn8/2Kh3YDhSk2jiRO84=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=WWxY/cX0rNmHIikpkqpSszdlMmcA+Z0NG6su3EXgGrwvpgNIONPPQc+6FB65MuG58Q8DHfWrjVjc1M45cW43InH8w/NQyUi5yzcwDfA046BSOvyk/4my2h61BLseecHLeIYdgvhbZZ3HIvS2157NZT2MKOpbuBkzKiyo/H4ZS6I= 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=EKOk9+4W; 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=1709635844; 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=mVYxwMtTQeWVE4Tn/hbP7z3GmeUiFdt48l1PZlAeQnI=; b=EKOk9+4WGbO5PJUlNNTC5Uoc75ZXrlravWmPG+VUUCckGSburxCfO03K86mCv2QBWcvA93 8idi9wBlvUvAe5GRihcW3dESrAoh6SL+VlgRVE1tspMFPP96ZHzwgXH0Eo9tzmofLFCWNv AxEZ/jk4lOl1mVBVMhXBaGPHmQw1sfQ= Received: from mail-yb1-f198.google.com (mail-yb1-f198.google.com [209.85.219.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-475-D0SL6x-eNzifmJvg9RXd1g-1; Tue, 05 Mar 2024 05:50:42 -0500 X-MC-Unique: D0SL6x-eNzifmJvg9RXd1g-1 Received: by mail-yb1-f198.google.com with SMTP id 3f1490d57ef6-dcd1779adbeso1004762276.3 for ; Tue, 05 Mar 2024 02:50:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709635842; x=1710240642; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mVYxwMtTQeWVE4Tn/hbP7z3GmeUiFdt48l1PZlAeQnI=; b=YXpfTqv2dGAg/AS0Nzsn2OP7uDXyn6dSb5htOXakryD3OtE/8VssuMXrfGucLK7YN7 lMSs5BMtKqDrOwuxqQFTJZApy1vVj29/u52O+RsXoACW//DADmkp3Y5jdzvz1HCQ1KYH wuYF5qaTb2Y45arwtPwIPmgEIjPTIQpTpvdzAqMOS8V4VdNaakj77RX2F9Kd+qCzGXAD PQh6IPqpbZ1iTa7hVONh6tuu8or8CFlwsIl1ks1PDr1w3MymM6BbSEJThtROwLiAw9FO 8AcciJlrAq6jeyGcBj8y77v2XY44dJOhi2326WX36JN9yf5G2W9qaoMNEAJu+5jYUmvg k2zQ== X-Forwarded-Encrypted: i=1; AJvYcCVarcWEi8vsTTtTbKbtsNwC8ohU282DAPu0DAPKtON3vAXEyY2/VdLWvEfPjJuYTYHl5HMDTCHcRGhJh4Cv2wqTRaTTJmt+dV0KO+LF X-Gm-Message-State: AOJu0Yy+XZJ7VLQoL1SRgPzSYBctXiib5luKyOGAQrDdTfMQogktWRgt D9+TXuxGgnRINpa1V8efZ0PX4WSO8oWrmgU0YLVAXHvsC/Q3ANkr9/F/9FMVjinyLwaOoKuXcoq dh++6Bfsu+zx87SeSyWYLVBrZ1JDKGaEnPSKx/L+dm7kjZohIGLf4HlwMeR+IIw== X-Received: by 2002:a25:5102:0:b0:dc6:d738:1fa6 with SMTP id f2-20020a255102000000b00dc6d7381fa6mr8621713ybb.6.1709635842249; Tue, 05 Mar 2024 02:50:42 -0800 (PST) X-Received: by 2002:a25:5102:0:b0:dc6:d738:1fa6 with SMTP id f2-20020a255102000000b00dc6d7381fa6mr8621700ybb.6.1709635841978; Tue, 05 Mar 2024 02:50:41 -0800 (PST) Received: from vschneid-thinkpadt14sgen2i.remote.csb (213-44-141-166.abo.bbox.fr. [213.44.141.166]) by smtp.gmail.com with ESMTPSA id q4-20020ac84504000000b0042ef5b8b697sm1455107qtn.32.2024.03.05.02.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 02:50:41 -0800 (PST) From: Valentin Schneider To: Ingo Molnar , linux-kernel@vger.kernel.org Cc: Shrikanth Hegde , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Linus Torvalds Subject: Re: [PATCH 3/9] sched/balancing: Change 'enum cpu_idle_type' to have more natural definitions In-Reply-To: <20240304094831.3639338-4-mingo@kernel.org> References: <20240304094831.3639338-1-mingo@kernel.org> <20240304094831.3639338-4-mingo@kernel.org> Date: Tue, 05 Mar 2024 11:50:39 +0100 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 04/03/24 10:48, Ingo Molnar wrote: > And gets rid of the double negation in these usages: > > - if (env->idle != CPU_NOT_IDLE && env->src_rq->nr_running <= 1) > + if (env->idle && env->src_rq->nr_running <= 1) > Yes please :-) > Furthermore, this makes code much more obvious where there's > differentiation between CPU_IDLE and CPU_NEWLY_IDLE. > > Signed-off-by: Ingo Molnar > Cc: Peter Zijlstra > Cc: Vincent Guittot > Cc: Dietmar Eggemann > Cc: Linus Torvalds > Cc: Valentin Schneider Reviewed-by: Valentin Schneider