Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp771456pxj; Thu, 10 Jun 2021 12:18:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhAjqjN4QYGPQjYvMGX+Ik1GUFCZOCSXSLNGpKoSynDgSnFR77yDC/NvQFbasDO3vFdWBR X-Received: by 2002:aa7:db95:: with SMTP id u21mr65737edt.152.1623352694951; Thu, 10 Jun 2021 12:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623352694; cv=none; d=google.com; s=arc-20160816; b=lUrZSqWEpqnB0rgl7SABJywggLRe48D2s8s+O4/r8Z1OgoTSRDVbLcT6egq0bLug6Z Rj1FlUKKjLmd3kv48eY/DiJOo2fpXFbqrkNapUrXhbSRzy0kx+hpFVB+q8aHZ6Xc2f7b DnTzrmSfAuwKUjUM+fI+lhWZlAXu3as6kiP+9TOmU5k9D3PjuOfKwOmAx7/1uwzUoN7T fOitgR6IcQ8nLQqOh9OfPn9JWBHcCol4pxteyMjmQCo6kynYmqihgYUHTei75SDpUVkJ /fKyveYT2F2sKFKAuRacms2CItFF4KN/Bj1K/IEYUqt6Dkuun09x2S2BLFMMXd0wd3o2 2nwQ== 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=oEUq6PRtk2+KwPWA8PsdACW/flkPVXr2oIuLoBeXcIA=; b=pCfPfjOjDDrJOtVgcvsNYlyqtGDEmoSJzQWrcJ+reO1MsZOxJvUDv/jjHNcq001Jzw 75flfQbB+AvTf2KsL+D+arWspMfB1Ni4jNVgkZrYHCrs9sDtlpp5wuR4u40ZMko4KHrU +2qXQ4DbwLqKleFG//VPznOZtkDrnvRyJAwAVSKdetc+M2vk88iHWDo7pnn8oXGxh5z4 PuPFI6CpiHjAh/XHpdu2mhwVf/GlBC272QmhNckHxlL3/TXMvftHmheDfk+/+fCBUuYB 7fAmhUnTCkH9CDsoh/sSu9atu63zKbEQbHOtjZ7MJKqWOva+sGCaCGe+SejGEjNIhThX 61Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dJmaDHFN; 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 t7si2925389ejj.44.2021.06.10.12.17.50; Thu, 10 Jun 2021 12:18:14 -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=dJmaDHFN; 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 S230281AbhFJTSX (ORCPT + 99 others); Thu, 10 Jun 2021 15:18:23 -0400 Received: from mail-qv1-f52.google.com ([209.85.219.52]:41650 "EHLO mail-qv1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbhFJTSW (ORCPT ); Thu, 10 Jun 2021 15:18:22 -0400 Received: by mail-qv1-f52.google.com with SMTP id x2so14629491qvo.8 for ; Thu, 10 Jun 2021 12:16:09 -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=oEUq6PRtk2+KwPWA8PsdACW/flkPVXr2oIuLoBeXcIA=; b=dJmaDHFNcTY9Iu2JChRODk288p22hR3sXhCHjHxMjLhPtEbWPQyJ9vmXKJPA57RuYw i8D37pv3aqM/VZ4hso039QmU3ZMbpioO+K0f2fV6ofjoDzA6OQm2QsLIa+qnKKyPg0K/ 3007zurkBZnZY2JL1US8aiix2dQyuqODk4+BtUNU9spDwFAxVVraKo+ag13YVNN82B29 aGYozSBbnFD/h6cVuHLrx5X9ngi1h0rcn5BM6PUihLR/CFAdDv/tI34bhhOcMrLR/js+ a0gT/gajJpUPLF2ugnZiYWeEypUI7DF8rrt2s00dsVYFFihZga4yAotjBbuqBlpFC9VS pxMw== 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=oEUq6PRtk2+KwPWA8PsdACW/flkPVXr2oIuLoBeXcIA=; b=ivH4LZadQPFXFlYHSZlq0kU3yCcHaeoUL7on4vBXOsgRML+p8H97dsucKvfQytotg3 +PpKrvyB6CbKLQxHmiY662aFrVMz89RPSA1h2Yk1Uvgj6NMgp2lDar22aw3t/cYRgCcu 8bkR+XF2vmmvzhnlCIAQIwtdY2QCplDzOyaKPm0fURd7pWjTUj0J8zGgoUfoFJwafB3i tr7YhT357rmjBT1kIDHK8Hm+JD4Cr2FpzJ3IS1nKjYRNVo1wUemufQqY75579ctMHLK4 TeTK6oIiKCGzyBV/AU+mcRaSosPH91SYg6J4k0U739KSXH7sRkAYWrw8Ts5NxLiuKqKH z/ug== X-Gm-Message-State: AOAM533qYrCJcjPiRDpzL29wVPN+DEOgHO9abB73J3agGkREWqK7XMjd oKhkT17GGpYJ05X3mHssxCrzypQz5x3n1u/vTeml9w== X-Received: by 2002:ad4:5d67:: with SMTP id fn7mr1178435qvb.1.1623352508999; Thu, 10 Jun 2021 12:15:08 -0700 (PDT) MIME-Version: 1.0 References: <20210608231132.32012-1-joshdon@google.com> In-Reply-To: From: Josh Don Date: Thu, 10 Jun 2021 12:14:57 -0700 Message-ID: Subject: Re: [PATCH] sched: cgroup SCHED_IDLE support To: Dietmar Eggemann Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Dietmar, On Thu, Jun 10, 2021 at 5:53 AM Dietmar Eggemann wrote: > > Any reason why this should only work on cgroup-v2? My (perhaps incorrect) assumption that new development should not extend v1. I'd actually prefer making this work on v1 as well; I'll add that support. > struct cftype cpu_legacy_files[] vs. cpu_files[] > > [...] > > > @@ -11340,10 +11408,14 @@ void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq, > > > > static DEFINE_MUTEX(shares_mutex); > > > > -int sched_group_set_shares(struct task_group *tg, unsigned long shares) > > +#define IDLE_WEIGHT sched_prio_to_weight[ARRAY_SIZE(sched_prio_to_weight) - 1] > > Why not 3 ? Like for tasks (WEIGHT_IDLEPRIO)? > > [...] Went back and forth on this; on second look, I do think it makes sense to use the IDLEPRIO weight of 3 here. This gets converted to a 0, rather than a 1 for display of cpu.weight, which is also actually a nice property.