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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00AA1C433EF for ; Fri, 14 Jan 2022 16:38:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 51DB06B0071; Fri, 14 Jan 2022 11:38:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4CD8D6B0073; Fri, 14 Jan 2022 11:38:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36E986B0074; Fri, 14 Jan 2022 11:38:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0116.hostedemail.com [216.40.44.116]) by kanga.kvack.org (Postfix) with ESMTP id 2473B6B0071 for ; Fri, 14 Jan 2022 11:38:15 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id D3E99181CA35A for ; Fri, 14 Jan 2022 16:38:14 +0000 (UTC) X-FDA: 79029450108.04.5A61076 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf17.hostedemail.com (Postfix) with ESMTP id 5E9D84000F for ; Fri, 14 Jan 2022 16:38:13 +0000 (UTC) Received: by mail-pf1-f171.google.com with SMTP id f144so2437537pfa.6 for ; Fri, 14 Jan 2022 08:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UdAhn1yP8utSK2rJWKDnZNaAaZ8ZXIqz54JjwpJvgpQ=; b=FQVcQ0AcdShPy4qgO3i9uPzOtqze3SVxLhUjkznY3+NjqH5zxeeYYcdHlyORH7YzCJ eaeps+kM4+knX1Tt+p6X+l2Z1osOl+3/oB4Asy3CDb+L/uQjrplvtjr6Or1cmFQ3oMZW +mKI3MVFc3Y4lWRTRk+6hwx03WI4CGPgfjOsWGMMtmzJcFLixgCcJIwY9tIg9PgfhgKz iCm4pDLp9JT59E3Vz1FUfKGDOaj2HF+NOVuIZUQaVBoVd4ZOn9YAowHCHFmw8k7eTZ72 WU/1o6ohDldo/9Dkzqpq2N6wnpSPDqxBWELYegHy6Sm3yvg234/ckkpMlNEfbF7RX66D VC8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=UdAhn1yP8utSK2rJWKDnZNaAaZ8ZXIqz54JjwpJvgpQ=; b=ufgxfEdfgSRcYONcPAZ8Fjb+HuGBmnLLf+qvYViqXfyJzXMyQXistuKte9emHkYEPD lGrYwwhUSxYPGzk3AWlEwvZYPM0D9mE098LiykUOWpWsRISoabgW0jWv73ztjPSl2uTV g8HiNilv5/zg1f3x/aHjbe2yBOXfNbTuTPgrPoG8tqZmsfKPm77U0uqDV9Lm7hZ+O+AC +z01KpkoSwROVUNw6JvMsyku2/koExP8LwvgTFvmw8lI8VL+N3XTmAF4bl1jRKP8q2Zl jubG2zqjMe9eDhWb6j1bcfXBMXHUDsEjF/OVJszdN/p+PpNTvIjmvy7qRFJsxd7ATzkJ wL0Q== X-Gm-Message-State: AOAM532qSD74JArwpth0Liwcan8Xc4z6iqtGxEINYmlFlPdET2Qw+wzU IOhk7LxeeEohJK0UjjQy9yY= X-Google-Smtp-Source: ABdhPJxiT42ScAmY7IPzWzRpYUt/AJjQ0wnb6ujH//Zxut8aB5TCaMGGIE6mc38OJ9xD1Lo5a5NA2A== X-Received: by 2002:a65:6ab3:: with SMTP id x19mr8588083pgu.416.1642178290941; Fri, 14 Jan 2022 08:38:10 -0800 (PST) Received: from localhost (2603-800c-1a02-1bae-e24f-43ff-fee6-449f.res6.spectrum.com. [2603:800c:1a02:1bae:e24f:43ff:fee6:449f]) by smtp.gmail.com with ESMTPSA id w64sm636354pfd.0.2022.01.14.08.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jan 2022 08:38:10 -0800 (PST) Date: Fri, 14 Jan 2022 06:38:09 -1000 From: Tejun Heo To: Peter Zijlstra Cc: Daniel Jordan , Alexander Duyck , Alex Williamson , Andrew Morton , Ben Segall , Cornelia Huck , Dan Williams , Dave Hansen , Dietmar Eggemann , Herbert Xu , Ingo Molnar , Jason Gunthorpe , Johannes Weiner , Josh Triplett , Michal Hocko , Nico Pache , Pasha Tatashin , Steffen Klassert , Steve Sistare , Tim Chen , Vincent Guittot , linux-mm@kvack.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Subject: Re: [RFC 15/16] sched/fair: Account kthread runtime debt for CFS bandwidth Message-ID: References: <20220106004656.126790-1-daniel.m.jordan@oracle.com> <20220106004656.126790-16-daniel.m.jordan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 5E9D84000F X-Stat-Signature: e53cmmmgrq8ihixfqf5tn7fuedookd9c Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=FQVcQ0Ac; spf=pass (imf17.hostedemail.com: domain of htejun@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=htejun@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) X-HE-Tag: 1642178293-550423 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hello, On Fri, Jan 14, 2022 at 10:40:06AM +0100, Peter Zijlstra wrote: > You could do a special case sched_move_task(), that takes a css argument > instead of using the current task_css. Then for cgroups it looks like > nothing changes, but the scheduler will DTRT and act like it is in the > target cgroup. Then at the end, simply move it back to task_css. > > This obviously doesn't work for SoftIRQ accounting, but that is > 'special' anyway. Softirq stuff is not otherwise under scheduler > control and has preemption disabled. So, if this particular use case doesn't fit the backcharge model (I'm not sure yet). I'd much prefer it to maintain dynamic per-cgroup helper threads than move tasks around dynamically. Nothing else is using migration this way and we don't even need migration for seeding cgroups w/ CLONE_INTO_CGROUP. In the future, this should allow further optimizations and likely simplifications. It'd suck to have an odd exception usage. Thanks. -- tejun