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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 B66D7C4338F for ; Mon, 23 Aug 2021 22:45:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 908B9613A6 for ; Mon, 23 Aug 2021 22:45:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233176AbhHWWpm (ORCPT ); Mon, 23 Aug 2021 18:45:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbhHWWpk (ORCPT ); Mon, 23 Aug 2021 18:45:40 -0400 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52497C061575 for ; Mon, 23 Aug 2021 15:44:57 -0700 (PDT) Date: Tue, 24 Aug 2021 06:45:44 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1629758694; 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=IehAjYy8xWpIrZ4zT6FrRFX1lwCljbExJgIF9V68fgc=; b=PQwbnrmxZ53/l2mopfN68KU/jSMZA5mfYhkWr4ocMToNeMLsqAaIVUahFuXkc1bQlhJlLn 3HKtzTA97NpdIcuk/0mxTPonywJKCuREQa3QrjVrS1QPg/f7EsxixVTrTibILzWtW1+CDm K3RAwLpbE6hC3QBDCSWtML5AuR2oU0c= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Tao Zhou To: Josh Don Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Paul Turner , Oleg Rombakh , Viresh Kumar , Steve Sistare , Tejun Heo , Rik van Riel , linux-kernel , tao.zhou@linux.dev Subject: Re: [PATCH v3 1/4] sched: cgroup SCHED_IDLE support Message-ID: References: <20210820010403.946838-1-joshdon@google.com> <20210820010403.946838-2-joshdon@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: tao.zhou@linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Josh, On Mon, Aug 23, 2021 at 10:29:53AM -0700, Josh Don wrote: > Hi Tao, > > On Fri, Aug 20, 2021 at 1:38 AM Tao Zhou wrote: > [snip] > > > #ifdef CONFIG_SMP > > > extern void set_task_rq_fair(struct sched_entity *se, > > > struct cfs_rq *prev, struct cfs_rq *next); > > > @@ -601,6 +606,9 @@ struct cfs_rq { > > > struct list_head leaf_cfs_rq_list; > > > struct task_group *tg; /* group that "owns" this runqueue */ > > > > > > + /* Locally cached copy of our task_group's idle value */ > > > + int idle; > > > + > > > #ifdef CONFIG_CFS_BANDWIDTH > > > int runtime_enabled; > > > s64 runtime_remaining; > > > -- > > > 2.33.0.rc2.250.ged5fa647cd-goog > > > > > > > Cfs_rq and tg define @idle with int type. > > In sched_group_set_idle(..., long idle), @idle is long type. > > Use int instead. > > > > But, you filter idle value: > > > > if (idle < 0 || idle > 1) > > return -EINVAL; > > > > So, no effect here.. Just @idle can use 4 bytes. > > > > > > > > Thanks, > > Tao > > The use of 'long' there is because the input from the cgroup > interface is a 64 bit value. Yes. If the compile align the stack to 8 or other, this will have no effect(I've not check this, and have not much about gcc compile align). I just presume that if the stack can save 4 bytes. But, that may not right though. > - Josh Thanks, Tao