From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED6E3C2B9F4 for ; Fri, 25 Jun 2021 08:21:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6AFB6140F for ; Fri, 25 Jun 2021 08:21:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbhFYIYK (ORCPT ); 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..