From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B501018A6A6 for ; Wed, 29 Jan 2025 04:48:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738126099; cv=none; b=AyWS+GuUyc10xKPX5dZn1JNHUsbYLMv3+lr6YWOO73kNv106jX8Z2kY7S4myusBVJMjramfJvYwpPrvCI/enFTvcdvm2y9/xSvtxBtFaLN3YNzbnmI91EPUM8G9d7xa6YLvpjKRYz8jJb+lU6EUS61wm1xF2b51kbJuBX9PBI3w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738126099; c=relaxed/simple; bh=gTUI/poBGUa4PGe9KeuiWxZj7DwD2823ZOFRNGEZjxA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sOAYbMD+oE4VUL6E88Q5jhATj8ZJ2RHjCSKbj04Y3rQ2Fkx37z3kaVi5IdU7rjl6gdg6D+wwvOt1eV8UudAYQ8WZzdaW3OQSs+M07O0S0oVEhtVHX0dfj7Mi0oWP6aNz4029clOm3uGMBp4tFirSV4Ei3QHO5wNJlaHhI6eeNj4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=iDtyWtTK; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="iDtyWtTK" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2162699e0ccso11577695ad.0 for ; Tue, 28 Jan 2025 20:48:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1738126097; x=1738730897; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VqmunIpKWBlPQClE3jp80cOJ1ikHtuUrvUz3QQSshEM=; b=iDtyWtTKqx87DrXtpP5OgDlTcza3K4/YMYLGUypQ0w5flR1ZM1QMo+CAk2dn8UPo6v zpS4GNtbP5Dc00DE40drIBTTlTbi4GPye1VmlIXWXYAgZauk0HxAS/QjUc1rfo+VYxmg M/ioAg6DGi/0loJ3AbbyDGyBpROnFUeFFyIqTj/Vu7A4ExN8wjQ13Jy0p4jItFf/UQT/ 1RorCYZ8sHinD9Wn2BppXOMJTo1IV+RswhqDeI1fCay3NaRBAlW6PwDurZvVpM650QZZ P2aaXZ11izWtizPsS0F9cCBxuWTl2S/pJfJ2YG4lVm38RE26d9/atteABIzM6Bj9kVVG WpAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738126097; x=1738730897; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VqmunIpKWBlPQClE3jp80cOJ1ikHtuUrvUz3QQSshEM=; b=ufEN0la1TruvB9DGjuspNjK85y+654ofNzy9J8EYe+UGk5jHNLqNXOEI07xtmNuORA 3LyI7Ods9qMWTpfUb7FSlx7ptUmyYshmwx9TcFZ1JlIzRsGHbYdoRijizkiTP6sybnE7 rwtWpKm+FuvXNsd+MwtGLvOTZDl4m2qQP3i8sdI0quXPc1wqiB3koDAB+7i+tThThFGs 7imrCwBPj31kVueEGXTWLPH7nnd/Q1BZH0LHCC78tcrdlLKvLkwBURYW9PQjDzS2MPk2 cRyQTj5eQPWtW4kVP1UeiDoSWAfkcQYRQDxM5q04DS7mx1ypIkLhe2vvbzVuZCKksl9e 15dQ== X-Forwarded-Encrypted: i=1; AJvYcCXHPD0pEy/ZGIiwMm/c8/F0MHrowR1zLv18EJuwgQAq+oT0F5Eiv2CZplu1c70toMu2m7SwufX/5QkRLqw=@vger.kernel.org X-Gm-Message-State: AOJu0YzB9bZGicPB59lOM7KCKQ/LtSQvCJZqt4Ym3sKCQ9I7Wg3ONHfK wqWhUGZZS/xPAUuJOVBzDtn8v8vzqmTro3ZQ2lk9ggQe2sWmgfVwHLcMsoPObYM= X-Gm-Gg: ASbGnctu5EhZ1H9om3aeIgr4FqaOORZn4KRXDoMMcOjPB56Rig8KklnhXDVJz0ugLTZ bqtpZi9ir3+YLzhOfvhwbOVj7GApVAJ9IwRnNl4JGEgGgQ272X/W3Ugljsp9Mc1YYkOU7vRTTan y9cAOzEOk0pe2LeKZtS4ajvmR8/DmINn7cJXyes3hLwHZTLIP74O4PbZst7dYPXBjEMMSZimMu5 lHUapoqX1ArkMVCs6RnSBXXFFNV9c+WdMlmjEThM16hTZX4IDcilrscXLsaiWmCIX0DzGd2pUrc oDxKnLNsIdgE+NPb/oiAY0qtAxR6nguiguYHQZS5 X-Google-Smtp-Source: AGHT+IELS4KQ6Wvh+0VxMOQajNbXjiLISlc86qwEtSS6xVbj4i8kpeGIQZX4jNt1xWTUhKUd2xdyaQ== X-Received: by 2002:a17:903:2282:b0:215:94e0:7 with SMTP id d9443c01a7336-21dd7d6f76fmr10500975ad.7.1738126096927; Tue, 28 Jan 2025 20:48:16 -0800 (PST) Received: from [10.254.209.208] ([139.177.225.253]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21da424f39fsm89622785ad.249.2025.01.28.20.48.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jan 2025 20:48:16 -0800 (PST) Message-ID: <9515c474-366d-4692-91a7-a4c1a5fc18db@bytedance.com> Date: Wed, 29 Jan 2025 12:48:09 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/3] cgroup/rstat: Add run_delay accounting for cgroups Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: Tejun Heo , Johannes Weiner , Jonathan Corbet , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Thomas Gleixner , Yury Norov , Andrew Morton , Bitao Hu , Chen Ridong , "open list:CONTROL GROUP (CGROUP)" , "open list:DOCUMENTATION" , open list References: <20250125052521.19487-1-wuyun.abel@bytedance.com> <20250125052521.19487-4-wuyun.abel@bytedance.com> <3wqaz6jb74i2cdtvkv4isvhapiiqukyicuol76s66xwixlaz3c@qr6bva3wbxkx> From: Abel Wu In-Reply-To: <3wqaz6jb74i2cdtvkv4isvhapiiqukyicuol76s66xwixlaz3c@qr6bva3wbxkx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Michal, On 1/27/25 10:10 PM, Michal Koutný Wrote: > Hello. > > On Sat, Jan 25, 2025 at 01:25:12PM +0800, Abel Wu wrote: >> The per-task and per-cpu accounting have already been tracked by >> t->sched_info.run_delay and rq->rq_sched_info.run_delay respectively. >> Extends this to also include cgroups. >> >> The PSI indicator, "some" of cpu.pressure, loses the insight into how >> severely that cgroup is stalled. Say 100 tasks or just 1 task that gets >> stalled at a certain point will show no difference in "some" pressure. >> IOW "some" is a flat value that not weighted by the severity (e.g. # of >> tasks). > > IIUC below are three examples of when "some" tasks are waiting for CPU: > > a) > t1 |----| > t2 |xx--| > > b) > t1 |----| > t2 |x---| > t3 |-x--| > > c) > t1 |----| > t2 |xx--| > t3 |xx--| > > (- means runnable on CPU, x means runnable waiting on RQ) > > Which pair from a), b), c) is indistinguishable via PSI? (Or can you > please add your illustrative example?) PSI tracks stall times for each cpu, and tSOME[cpu] = time(nr_delayed_tasks[cpu] != 0) which turns nr_delayed_tasks[cpu] into boolean value, hence loses insight into how severely this task group is stalled on this cpu. Thanks, Abel