Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2242778pxb; Mon, 23 Aug 2021 15:46:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6MvH/zW1UB2Xtm4Q7CoTZI7ZsjOcUmOdIKjxgl1tGewVngZfpfsPusqY8m9VgUTdn/cnu X-Received: by 2002:a17:906:4c89:: with SMTP id q9mr38105497eju.118.1629758797939; Mon, 23 Aug 2021 15:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629758797; cv=none; d=google.com; s=arc-20160816; b=VOaEXGBp+eT4AUKLLa+SwpVrjrIryOh4fo+lhR0pOxLjAUxbUiDv9z8thMkzh9rwLb qJXb+46XTPtZ+mdeytrgfloWRVZr5l8fpIUyuaVmiBQg4wNy8o+pjCnOxRH3VUbdGCls f1M5YXUH5J0P/wroL1REKa98+ZIeQ407YnKGWUMvsD0z7blLR+DHrVTwD+8eV8LGqDFl V12yRRkAGSN3qcvppv1jl3vxvkh2m6aK5E43PAZcm4tT/fBXVAhCZr30NvkWASPLuLIZ DCF1cYAeW9ZfgoMaO2qt1BPMw3IxpJSXM83VD13znK0VTClqSiuYlcuExnVdQl77x/MC 6Cow== 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:dkim-signature:date; bh=IehAjYy8xWpIrZ4zT6FrRFX1lwCljbExJgIF9V68fgc=; b=AO/huQbzVTrPHRNwLYsPHvW7/hc5iXNY7ykpv5TmeLmg52hZHD4wAkQzogYM8kusPb BqX+pBrlovIGyYvmen+aX+H6LgxyTF2BKJ/TtjxDbofoz+oFF13KcML4KyegFF9RSwVO XrC0Vn6+RzI51ljqzx0PQJVpIBqaj5kpg+XSrufSa0RBv8EMxS6QlgMQ31A7O3MTIi9x 8K4qbgF4Dmbd2AlaArOj1JFTHQZXHGC9KuSWE3SAVxo75a6Am6Mwngz5gq0ANsAJ2Ya3 BRm4iRXCxWZhDSIOOkpM2qGS61d/5I9TMCrhw6aMFKg6SBYHnJyWIi6CAWy262zvAbuM nuag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=PQwbnrmx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b66si6964120edf.69.2021.08.23.15.46.14; Mon, 23 Aug 2021 15:46:37 -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=@linux.dev header.s=key1 header.b=PQwbnrmx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233126AbhHWWpl (ORCPT + 99 others); Mon, 23 Aug 2021 18:45:41 -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