Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp930721pxv; Fri, 25 Jun 2021 01:23:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxokUvM9rb5WhhZMMdy32QV+QahKKme+QVasM00m+v+LBBkR0eIIe7uincjE+xAk83e3r/G X-Received: by 2002:a05:6e02:ee2:: with SMTP id j2mr312038ilk.63.1624609386358; Fri, 25 Jun 2021 01:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624609386; cv=none; d=google.com; s=arc-20160816; b=gCWecIMFQrrJzdqJSdr4dHobIrMS1X36lj/LBLz8maTlaazX4ST+6T5aJlTvOVaWyB EbfbNqLrWfinraSpJgESqW1A5QLULySIgFa3W6fELg7fBiHQv2bkkQiwxx3uDG6ZfJ0V yvsPFf4W1Oz9VJi7wMmGKKACtQcT5tSy8vyGflykUp/4jB5ryKTuGT/G5msRQZEPez+N KRrm6Akcgyye7MSulWAIBXNOrkYMqXUVEC2tqhvoDJZkYU2z5iBBZ3wOdAcvv3SOljFM umD6UNZlB2B/RTZJNiiP2qi3XmH0MrE5zxhnzi+oYmw1JPnOyjsck6izO7YOPxCm1fUH tg8w== 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=jIhYZf/q/ceFYrntsKFSdR8KTn/qUTHv3/eT0mVybbQ=; b=Af32LpdUzG9UPhcWCouPtjJtaHfPOivNx5YJGDiWNCLDgwcDvGdaDuf7zA/77nqJ+e vgkdFBWJ7GNfphSpUXpqjH8SFCdGIifvT7YK+33XIf5a/EuRzbdLnvvBswTAurQYzNS7 OI/pwTMImPrImDgf7rqHAmZEbOCTY1j+Zi+d/LHw3hI+n2uCKGASOjZTbg3hSTtv9I4S V7BpIz0p28Wmzj8zWAIDT1VeYYaam89mgnJUSEN0OLZGtWMI5yMv8Rn+3ZVsaEdzFVvh UxtQc8LUiLZTAZcvsGu/tnyRfgTUaRNTEIb3ROrIWMhbtqmepacr7xwJVbfDJETTupRP wqRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Fie/cVmq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si5470360ilr.73.2021.06.25.01.22.54; Fri, 25 Jun 2021 01:23:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b="Fie/cVmq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229799AbhFYIYK (ORCPT + 99 others); Fri, 25 Jun 2021 04:24:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229474AbhFYIYJ (ORCPT ); Fri, 25 Jun 2021 04:24:09 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFCE8C061574 for ; Fri, 25 Jun 2021 01:21:49 -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=jIhYZf/q/ceFYrntsKFSdR8KTn/qUTHv3/eT0mVybbQ=; b=Fie/cVmq4pzfFKzyg4ceGWYqWo uP+JzVa2no0BsAdW0CcdTkCX72yTOogwpCkQwKF+unMBfwlj51xRj8I0PiBhNtw2XzwAXEy1Q4pB+ Z6RYSWKlQmFim4XbJAxfv/ZeKYkpJtwiqPe0JM5GDnD8BOt3sy/dQarKIMYB5ao2V9MJIswHEZvEk /6GRnmhs32EJJKBwsvvNkjI3EVQ6qqg6HwB09jx0M3lujdZ0EZxuivu7Z3THjYTCI8DTg7ozs4mbK BqEIkclC5M7pIs8NZYGBRJQSVecBTH7B3cTZudijClVp/saptujS4Fa8M4VEk/iMY7tzQrRpf1AYT qzcHVz6g==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwh55-00HSLe-Hg; Fri, 25 Jun 2021 08:20:58 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0A26F300252; Fri, 25 Jun 2021 10:20:55 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D93F520171CE8; Fri, 25 Jun 2021 10:20:54 +0200 (CEST) Date: Fri, 25 Jun 2021 10:20:54 +0200 From: Peter Zijlstra To: Josh Don Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Paul Turner , David Rientjes , Oleg Rombakh , Viresh Kumar , Steve Sistare , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH] sched: cgroup SCHED_IDLE support Message-ID: References: <20210608231132.32012-1-joshdon@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210608231132.32012-1-joshdon@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 08, 2021 at 04:11:32PM -0700, Josh Don wrote: > +static int se_is_idle(struct sched_entity *se) > +{ > + if (entity_is_task(se)) > + return task_has_idle_policy(task_of(se)); > + return cfs_rq_is_idle(group_cfs_rq(se)); > +} I'm conflicted on this, on the one hand, since we want 'idle' to be a sched_entity propery, I'd say, make it a sched_entity field, OTOH, that's probably going to be a mess too :/ Let me read more..