Received: by 2002:a05:6520:45c5:b0:135:a20d:b557 with SMTP id t5csp2136462lkv; Mon, 23 Aug 2021 10:32:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTxJ+bmfihC/Arf7uYRRu91xxPAE1JnNCLL5iuMhvUDi3UzLdEPMzdRdDV6ZY4x8CkaEJy X-Received: by 2002:aa7:c7c2:: with SMTP id o2mr38449933eds.166.1629739924938; Mon, 23 Aug 2021 10:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629739924; cv=none; d=google.com; s=arc-20160816; b=kTrBxRWUBqKAAR7+S1bMo5WKLYWlyenKP/KiChY4OtuElRIywJzy2Y8z4r/q/F3IQs jxcXH/h9jipWSDYE1OfNrUcZOO4Nj+2oFjrr5H3/wegsQKzbzf/D/7CryYEY2/ujJusr +1MKIuY/13qdQfGTDQSMKjki+N+CcIt119ItAYIkri1VOXck4MRR9x2/cVk1gNAoM781 Kz69mejSa9e+d70WUd40ure/x1yOkVLym+8Sbfds/JYfAesmqwq94yj8cyYD4ZxpCyTA pJYBfcs27pZYU4mihYzuJP2F8Gg0KvGOmouvoYRv4S4rHZ7fcE/+okEgAyGwe/wACFGm rnUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uoiTwtytui/FJ2TGPLyBq32QZhYO+XcWNyEuhRLGPF0=; b=Bi0CwJaBQAcLFHFO9At/mcbTElKAgCIqs1jflrVkpyy43JIZZyttujBiW+ORBkXd3U j1alnwEMnp4I1RCvqlzR4kIFkobUnd4cYuewR6arT846V3IXLBJaDY+WZnQsJjiRz642 N1P+clD6E/hwZv3Tur9/t1bTqdpVnJ2/YPHryb0m5pB504cOjooWFVdB2+bJt/gHVJyq crFxy8LC7m7Ly/9IeVbnh/uEQdcNa4sA8A1BK6bVgMpQfqvPvc1sEu/zX3MZ8v8mgH3J bF15TkcuiyV5QqFC99sdZzD5czcrQmnJr+PNFgJK4UV+MMaMTtUAVW/aR/oXSHYUie1R 2fiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tHl92LPn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si2340307ejo.259.2021.08.23.10.31.40; Mon, 23 Aug 2021 10:32:04 -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=@google.com header.s=20161025 header.b=tHl92LPn; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbhHWRav (ORCPT + 99 others); Mon, 23 Aug 2021 13:30:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbhHWRas (ORCPT ); Mon, 23 Aug 2021 13:30:48 -0400 Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21436C061575 for ; Mon, 23 Aug 2021 10:30:05 -0700 (PDT) Received: by mail-yb1-xb31.google.com with SMTP id x140so1257370ybe.0 for ; Mon, 23 Aug 2021 10:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uoiTwtytui/FJ2TGPLyBq32QZhYO+XcWNyEuhRLGPF0=; b=tHl92LPnnyvg6NPzbusts/Zntk95o41DRtCGxo9qBxGsUsuq0rP+pdVd+aSeKtSEbI vZJLicHrdOeExwr0DwvrQcGIGhAZYEcoLao0NcVjN5FiIZpdOw1M0Ri4G58S5E3wehaI gGMrWdozzCICmlUrIuFft1GF9mYLkxmROuqq1r24oSwk25N3mCf7s0W7HmLUa+6hDp/u IFPU+sFHwisBPfo49v+Aa+Vnap+awgDd2sUkGFhKs67PH6uNg05tU4zzeRuEWZH9HFvT WTFkOcouZG6cb+QQeCsBC+4uxmr2Mtur6YI609poEdXc5qfRk966k6kB2ejFDhmo5uxb L0Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uoiTwtytui/FJ2TGPLyBq32QZhYO+XcWNyEuhRLGPF0=; b=Fa7o7AIF1QUluJ8ZH4zP5MNeA5hatrDkBerKrudse5sRNKgyMr11kKXA5uiGVRl7F5 Ue6+XyFfkL629WVBzJLIIOLyJ/YlC39576Rq/YeS3DKDK372JpOjHVKNXSiYSF1Pu6Cd 1jaDR9vxBUiDmE96sglEHKuTmMx4NDEFsuy1RuD8WgqZhzRTlFvO8d97Ix84pCeWHDib Fv+B8Scvzdc68IdAj+BQJigxJ90Bn1xWPWjM+VdUaqTvssxmlLNpqYrFvdwAyDIyYWB5 47p297GCqyk4cqBQSTIN7M53PJvoHghzHqFXWs0aYgJ21M0RzGFabCdx3A9DN9MdQM9m EeXQ== X-Gm-Message-State: AOAM532KRSYz2IkQCFiVNd/nRcV7fJF2NhzgUiey/LL2YrJzFqt/GlsD 733yJ2ary3qGQMaW1AIDUtI9eoSbA8xTN2JytDY3mg== X-Received: by 2002:a25:1506:: with SMTP id 6mr44253225ybv.153.1629739803889; Mon, 23 Aug 2021 10:30:03 -0700 (PDT) MIME-Version: 1.0 References: <20210820010403.946838-1-joshdon@google.com> <20210820010403.946838-2-joshdon@google.com> In-Reply-To: From: Josh Don Date: Mon, 23 Aug 2021 10:29:53 -0700 Message-ID: Subject: Re: [PATCH v3 1/4] sched: cgroup SCHED_IDLE support To: Tao Zhou 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. - Josh