Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3370838rdh; Thu, 28 Sep 2023 09:38:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKqoihrxcgQ9tZxLWCAo3Z4vi5iQRquANnIw4eNi+z2FW5SbQK/BgyI4Ukxz3fNWjIEVcD X-Received: by 2002:a05:6300:8004:b0:13d:5b70:17da with SMTP id an4-20020a056300800400b0013d5b7017damr1839753pzc.26.1695919122140; Thu, 28 Sep 2023 09:38:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695919122; cv=none; d=google.com; s=arc-20160816; b=LOGOnyEHpFkhN3GNuk2LjghKWwQpJ5IOqkGS4akuYR7C5R6mM0MPx8807Ovl85gZ1D V1GlcY2XGodXruRro7z+GtYU3G4qrBjN8iA3WKcDGF8By7wLDgjjUN9ifaazU4QXFo8T PBQXWtbxS/JDbTdeftRl4rzGG2jv12thmfhUDZN8L89OduugodcjQzi4nPBmVbMwTDXt A7/WaGyM9LqLB1zCjDM4DgBDmDjRZ2GJvbB3mCCTqKSE93CimPx7qbKzz9TlRluGDLu4 fk9Ywm4FYvrMR59X98Y2ciXpywd1dZuSGAryfbsoRbYa3qyHjk+PBdQZ/XqScamR0r6s VG7g== 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=eZZIRmbykj6lZJFrbafxkvsz7c/SMH/v8aop+Z7+jMI=; fh=ieUoaKiSzKVBHFUU67WiEsvOKASQGdzAnrUqVqhkpN4=; b=b8lZI3gWFtNUnipSiNtFAbHtM5YrMTHT/1ploVG/hi3vLwFsghsmLt7xFhnFxqBway gZEFHcxq8lrVKUqF0WE9GDRtB9Ct9flZOHw3dbYZ/GvkqBEv7z8EaEkHdYnMgrUcxUyW octlxPUZ2ddY52ntYsp8N2iKajwKyGnJ/ZXad7jj58XPG+9okCCT6bds2llfPn+b13y7 5gOcSRZB9O32kGK00wfwzny4m/7Kl4lUSDVHTPn93Ds1Jtlcic2wV5YK4TYkqtNTQ34e b7sC/LASIE7ahsi7MFEf+rA7rSKpT19C0Ef/naMEL6rKagDBx9XQfGoqsLBuwPE/JKcw ZBYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fgWGkPIT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id cj15-20020a056a00298f00b0068a3a2984ccsi18654477pfb.236.2023.09.28.09.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 09:38:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fgWGkPIT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5DEA880278D0; Thu, 28 Sep 2023 01:02:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbjI1ICa (ORCPT + 99 others); Thu, 28 Sep 2023 04:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230338AbjI1IC2 (ORCPT ); Thu, 28 Sep 2023 04:02:28 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 410F59F; Thu, 28 Sep 2023 01:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=eZZIRmbykj6lZJFrbafxkvsz7c/SMH/v8aop+Z7+jMI=; b=fgWGkPITWVxOArycgApDVciz+J K+kGiKtzVvqr13NT/4KeBp6eSnk+4zwrLXPlS8y8olVjeRz2tOVD/G8rXlg8u2jPaW3NKJmyNakAr dW6He/jfIr4d3LGIjOD93zUXrLgXjXlBpFmY2OF+QfbTotElEM9Bzj+5hRwVqM5xCQbjXoy9+/gla avFWxdcxkVV99b946W6m9D+YKh9/mZC4X2/OPIQVxqCMeLAlacaQ3b9lMiaVc+QW6ECI5wD/OtSJ2 c0+ay2QBfHl/6fKxw5oP7AUWHlmvdIUdBKSIejgXWpnbArmNZRpsfaSEM64gbWaJzt68fDdG68DnP pwSpuWZQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qllyQ-001JlQ-2B; Thu, 28 Sep 2023 08:02:14 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id B8B433002E3; Thu, 28 Sep 2023 10:02:13 +0200 (CEST) Date: Thu, 28 Sep 2023 10:02:13 +0200 From: Peter Zijlstra To: Xiaobing Li Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, axboe@kernel.dk, asml.silence@gmail.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, io-uring@vger.kernel.org, kun.dou@samsung.com, peiwei.li@samsung.com, joshi.k@samsung.com, kundan.kumar@samsung.com, wenwen.chen@samsung.com, ruyi.zhang@samsung.com Subject: Re: [PATCH 1/3] SCHEDULER: Add an interface for counting real utilization. Message-ID: <20230928080213.GD9829@noisy.programming.kicks-ass.net> References: <20230928022228.15770-1-xiaobing.li@samsung.com> <20230928022228.15770-2-xiaobing.li@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230928022228.15770-2-xiaobing.li@samsung.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 01:02:41 -0700 (PDT) On Thu, Sep 28, 2023 at 10:22:26AM +0800, Xiaobing Li wrote: > + for (int i = 0; i < MAX_SQ_NUM; i++) { > + if (sqstat[i] && (task_cpu(sqstat[i]) != task_cpu(p) > + || sqstat[i]->__state == TASK_DEAD)) > + sqstat[i] = NULL; > + } This coding style is horrific, please don't ever use that again.