Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp379272imi; Fri, 22 Jul 2022 00:43:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v+XHH87rbXk2r81TPZTZblweWhTHUeM9+vLEVbIE4rLp84r9KMLHMZPJM5yrzNQwsfxhTo X-Received: by 2002:a63:90c9:0:b0:413:9922:1eb1 with SMTP id a192-20020a6390c9000000b0041399221eb1mr2074456pge.360.1658475794178; Fri, 22 Jul 2022 00:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658475794; cv=none; d=google.com; s=arc-20160816; b=xOTv1KRO5at7PuXke3AERXqqVcnv5W0qaaP8APWczYIBl3Oj3sRqMIwO3Hye3TPPiq 7BvrJO8io8zVpxPCWaAOq9gt9a0Vrm+RZ9UwdmjU/ZGpq0QjFXR3C01MDBuRkDhwt6Sq WUK7W1No49XEyfclau6y7F44speBBxbNdDI23cwASWzH3qJDE6STYPWfmFNPlOi8ceiT Et8++Q9vWq7t0f9lsQwYmUq405aDH1pLfOYKDlDNeW/UBcPWPPrziDqJEWHV89q2GwSg t1Yfep9PVKyQktP5qJv0oyEcDaw/yzxl6TF6Z2XfDEExv2yKuiezyAkJ52EFJVDIC0f9 YV5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=aBbLSX1JockKc7+DXzMhzivNTlzRCnKzS9NOsdu1GjE=; b=hfjhdWhDzZeJFqSU9sKPQ9CYMyJhWlbbov8YhHywvCDhPPKh5t+j7ww8KJH+HJEkye WuJo//zRvxZh/OppLbpKuyJLX/OBWhXSY3EQ3Uw/DbyD43U1ngbesd/oi4GCMyQO4/0f E63M36hLFeTSV4ZZSrWV13sP52Qi2rA+XeoFnYb56Fl9grJOm/CYnjDfFDlptN+S2VCa J3lrezEvQYzGaVfLChjbaY8B6+dzXHgEZrhoBFHvdGwWqSf+ASMR+OSCTubIaehw39ii DaL6fV4oyzDYXIC996lnvGuaSVnz8o0XGD9R8x1J1X5KWNINKDpH2JOfmAbPHJQuITZn XMow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=FH5lfoYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh4-20020a17090b4ac400b001ef86a75778si5492557pjb.151.2022.07.22.00.43.00; Fri, 22 Jul 2022 00:43:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=FH5lfoYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234370AbiGVHd0 (ORCPT + 99 others); Fri, 22 Jul 2022 03:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234243AbiGVHdY (ORCPT ); Fri, 22 Jul 2022 03:33:24 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0253797D79 for ; Fri, 22 Jul 2022 00:33:23 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id 72so3813156pge.0 for ; Fri, 22 Jul 2022 00:33:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=aBbLSX1JockKc7+DXzMhzivNTlzRCnKzS9NOsdu1GjE=; b=FH5lfoYy5vxWwh++51JNpjlucwlsQS4ixmz+0B3NZkoe7RPCjTMHjThSddtl0swkZl 9T4ukJZEb1V3D9PIKn1QSBahL4OsSxSyt8Ev8RV4nP+gW5w5H2fIC/DbwpMSiWPA2ABJ 9FSCGJfesuGhbecSsxNaGU78fp4xK1ZtEG/Np1qnnavUKZQATQlqlnvHMnPQ00jbhhsT ZaIaZWJolnaAzbuXrVkj8YgfeHBhH8cSKbNy7isQ8DnR22sFEzBY+JDKCN7FQU7X7pO6 9kesoGgKTzbUtS+7SlzHe9ECnLkHLRESFh5vhGRoZ0tXFvogf0IDqb82FrSDH0kDDKH0 +zyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=aBbLSX1JockKc7+DXzMhzivNTlzRCnKzS9NOsdu1GjE=; b=3v3V29E8u8HUpcTeca1XJXZRKzhXvC0XMVjlbz4ZQznXm6szoq9WNkeC4qPx4Jy3DX 1+idvrnz67shSziTxgtYzeAOzyXRc+24fK+cNbgHbrngudmWQ/XchOhBgnYQZIhWDAKa 9Ad7JYT/ZHq/jBoXaNBhCFkylCiGmbNCpV3uMhZ+NVq6RQk15w1a4lF9dYKD4Uc6i9F+ WZIx7YzdoiFj0sU6VYFPdpq6qh8jBETmCmqLgbBjAXt/rUJC4pGmsngZglKlkye/+iOG suyZBgQQ1xAM1fLgjcAwvc0xIgemMhCaaRz0P5JhdkwBQsrYlwe7v/zxYs3cEKo4rxnx PA0A== X-Gm-Message-State: AJIora9Hk+8LyXuJQz/o1vHskiUfmr2pIbj6GmothaVpW+9QJAPCkYaV MTRHztIEUE2+/VN2uruyp8e27A== X-Received: by 2002:a65:6a05:0:b0:3db:27cb:9123 with SMTP id m5-20020a656a05000000b003db27cb9123mr2047983pgu.497.1658475202162; Fri, 22 Jul 2022 00:33:22 -0700 (PDT) Received: from [10.255.164.21] ([139.177.225.239]) by smtp.gmail.com with ESMTPSA id 193-20020a6307ca000000b0041a27e7284bsm2763448pgh.48.2022.07.22.00.33.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jul 2022 00:33:21 -0700 (PDT) Message-ID: Date: Fri, 22 Jul 2022 15:33:14 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.1 Subject: Re: [PATCH 9/9] sched/psi: add PSI_IRQ to track IRQ/SOFTIRQ pressure Content-Language: en-US To: Abel Wu , hannes@cmpxchg.org, surenb@google.com, mingo@redhat.com, peterz@infradead.org, tj@kernel.org, corbet@lwn.net, akpm@linux-foundation.org, rdunlap@infradead.org Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, songmuchun@bytedance.com, cgroups@vger.kernel.org References: <20220721040439.2651-1-zhouchengming@bytedance.com> <20220721040439.2651-10-zhouchengming@bytedance.com> <65d9f79b-be9b-e21e-0624-5c9f2cc0c0b2@bytedance.com> <5e5d41e2-5f89-8c52-11e5-0c55c5595a88@bytedance.com> From: Chengming Zhou In-Reply-To: <5e5d41e2-5f89-8c52-11e5-0c55c5595a88@bytedance.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/7/22 15:14, Abel Wu wrote: > On 7/22/22 2:13 PM, Chengming Zhou Wrote: >> On 2022/7/22 11:30, Abel Wu wrote: >>> Hi Chengming, >>> >>> On 7/21/22 12:04 PM, Chengming Zhou Wrote: >>>> Now PSI already tracked workload pressure stall information for >>>> CPU, memory and IO. Apart from these, IRQ/SOFTIRQ could have >>>> obvious impact on some workload productivity, such as web service >>>> workload. >>>> >>>> When CONFIG_IRQ_TIME_ACCOUNTING, we can get IRQ/SOFTIRQ delta time >>>> from update_rq_clock_task(), in which we can record that delta >>>> to CPU curr task's cgroups as PSI_IRQ_FULL status. >>> >>> The {soft,}irq affection should be equal to all the runnable tasks >>> on that cpu, not only rq->curr. Further I think irqstall is per-cpu >>> rather than per-cgroup. >> >> Although IRQ/SOFTIRQ is per-cpu, it's the rq->curr who own the CPU at the time >> and pay for it, meanwhile other groups would be thought as PSI_CPU_FULL. > > I don't think rq->curr pays for it if you mean consuming quota here. Yes, it makes rq->curr's groups look more productive than it actually is, which are clearly different from other groups. > And it doesn't seem appropriate to let other groups treat it as cpu > stall because the rq->curr is also the victim rather than the one > causes stall (so it's different from rq->curr causing memstall and > observed as cpustall by others). IMHO, we don't care who causes stall, instead we care about what affects workload productivity. > >> >> So I think it's reasonable to account this IRQ/SOFTIRQ delta to rq->curr's groups >> as PSI_IRQ_FULL pressure stall. And per-cpu IRQ stall can also get from psi_system. >> >