Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1023451rwi; Wed, 19 Oct 2022 05:59:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7niJHtwLi0pXegjDkXK4YshO9RnJD/vg83migxGZLKdiHV0ki+fth4pxhugemEN7R1HsoO X-Received: by 2002:a05:6402:f24:b0:45c:d71c:7f62 with SMTP id i36-20020a0564020f2400b0045cd71c7f62mr7479446eda.416.1666184347761; Wed, 19 Oct 2022 05:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666184347; cv=none; d=google.com; s=arc-20160816; b=Q4mfIXH3pgMWbXF5i8D46QmXsTVDcl7/H9bNCHb6kBQv4vj3l+Smzua0PxHZH/6QCe aQYxaxh+XPsqAW9B7R0cEYnRAnZnRsnJ3U7BsH1l0mTQ/5HYD3aoqqBBbJuSbei5QDNa Kwozx+kh+VUaWN9EItQ5IqtBnvC+UIw0Wbq0AhzthnRLvUFuFCqmfflpHDjWMOcVnZ99 AbP0mzabP//lL7D33AIgYO/zSlTk4LtGyidVqwqjrr/EJ/sol7lst2uH2thWIAzdQqyU P4KZ+CtJEbl2T0f8DxgkDzFvdPjdLK5NOXPM91/3EOMnE0Bbmi5uNAoNHGQ1JRHy8qLQ SiDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=veefSpmCEaSzEYZOHgJlbLK7mKiem3jbiT2QhSe/bYM=; b=06tL/OUO2/yE54ghnXhGbVgH0eukttbgVKPKXEQSeUNDxVTh/4ir90e9VBZ6BGSA7X +S7K5OOZVaMsBEt5QVGxD46FuFdmky2Fuwxtu0IFh+O7y9xFqzCBznhcNy934julk9Ii Yj0xHu1u7EUGQ9OfuV1oFnmEx9l/2HMo/w5zNUri1JHTbSMA28T+kaxC+vGBGU+h91wD N8aee1H4puJzzgYOrk0JEYVaUfKo0ahnEPbqsTSI9ksrLAkLTAjsilT0wHWXwjNLs54Y DmDvf3zJGW7DbdEJQ08Sjn2RbfV4QlMK1nk/iirmBwgxOrJcO1YGw3iaIjP9PYo/CpSY hqnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@layalina-io.20210112.gappssmtp.com header.s=20210112 header.b=UtgxVNkB; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k25-20020a17090632d900b007891fd91786si11290505ejk.151.2022.10.19.05.58.41; Wed, 19 Oct 2022 05:59:07 -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=@layalina-io.20210112.gappssmtp.com header.s=20210112 header.b=UtgxVNkB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232732AbiJSML1 (ORCPT + 99 others); Wed, 19 Oct 2022 08:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232552AbiJSMKm (ORCPT ); Wed, 19 Oct 2022 08:10:42 -0400 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D897AC5130 for ; Wed, 19 Oct 2022 04:45:58 -0700 (PDT) Received: by mail-wr1-f48.google.com with SMTP id u10so28696229wrq.2 for ; Wed, 19 Oct 2022 04:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=veefSpmCEaSzEYZOHgJlbLK7mKiem3jbiT2QhSe/bYM=; b=UtgxVNkB5KqW11YYWEnWP275MLheN5JO1hvhm+lkEug9ipvI4NaEqmHwvjC7EEU5ix IlUIEhIlExmMwLfJTfs4PcnCobMquFSCZ3zn+JXJqEPDIhzo4OCosnmqTD9/XY7An0Uw LqfQuK1fIckyr12d6ZwKS1mBbCdAAQu4LvPvoFv7orxnALAmm2AXLydr8JGriFRZbCnq U1npfT24e5b2yU4zphbn2gIofLgp7CN2+2aL2fqRLyTC0Y1P0bNfPKatjBVIf6uPR8ny Ce5rZ5amUrjVnsVVYPgNx2XeivIi3ekz6mMMkpvpGNB3hWUMDfFwJF5tgcJqrotkkWui EX0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=veefSpmCEaSzEYZOHgJlbLK7mKiem3jbiT2QhSe/bYM=; b=NT550axrQaHyfaAjXyhnoYSI9ua+Peo4N4vryQOhYuZm4NmmZpKg2BRIeZIFhGMqUi 7Ozm+/HotfAg9hBc4DIUmgXr/KD3/o1hJUWmp6OWxVVVGsLtWsVdbfcipAC/9k9ud6qo xlqHy9nepjdPNV7gr1TiwIr1cPCYuDLSjc5PVeXHVJ/OCNsiG7s6Q5Jz9cGZ9lg882Z4 azktSH8Rvc56PEJWvbJjYwewvdbeD+fP2pNdKon3HuEyFkBZqUiV/2UXITAptA0dC6ZL 5qKmZFwHbcIX2vQt7BzihFXd115T7rf2hxE3lSwu5SrFZeetEl24VZQu8Ilap7zekHLI 4Xjg== X-Gm-Message-State: ACrzQf0p7fEJtjMinMZEeGSBGjZNISz+TQkZtDaRbm1SfPrZqMuSpHKH 24Q+UlAq3I+x/IbBbC/mpowK1g== X-Received: by 2002:adf:f591:0:b0:22e:504e:fe76 with SMTP id f17-20020adff591000000b0022e504efe76mr4869340wro.553.1666179839455; Wed, 19 Oct 2022 04:43:59 -0700 (PDT) Received: from airbuntu (host86-130-134-87.range86-130.btcentralplus.com. [86.130.134.87]) by smtp.gmail.com with ESMTPSA id o2-20020a05600c4fc200b003c701c12a17sm3044680wmq.12.2022.10.19.04.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 04:43:58 -0700 (PDT) Date: Wed, 19 Oct 2022 12:43:57 +0100 From: Qais Yousef To: Joel Fernandes Cc: Connor O'Brien , linux-kernel@vger.kernel.org, kernel-team@android.com, John Stultz , Qais Yousef , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Will Deacon , Waiman Long , Boqun Feng , "Paul E . McKenney" Subject: Re: [RFC PATCH 00/11] Reviving the Proxy Execution Series Message-ID: <20221019114357.yipijpetxz7ns5aq@airbuntu> References: <20221003214501.2050087-1-connoro@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 10/17/22 02:23, Joel Fernandes wrote: > I ran a test to check CFS time sharing. The accounting on top is confusing, > but ftrace confirms the proxying happening. > > Task A - pid 122 > Task B - pid 123 > Task C - pid 121 > Task D - pid 124 > > Here D and B just spin all the time. C is lock owner (in-kernel mutex) and > spins all the time, while A blocks on the same in-kernel mutex and remains > blocked. > > Then I did "top -H" while the test was running which gives below output. > The first column is PID, and the third-last column is CPU percentage. > > Without PE: > 121 root 20 0 99496 4 0 R 33.6 0.0 0:02.76 t (task C) > 123 root 20 0 99496 4 0 R 33.2 0.0 0:02.75 t (task B) > 124 root 20 0 99496 4 0 R 33.2 0.0 0:02.75 t (task D) > > With PE: > PID > 122 root 20 0 99496 4 0 D 25.3 0.0 0:22.21 t (task A) > 121 root 20 0 99496 4 0 R 25.0 0.0 0:22.20 t (task C) > 123 root 20 0 99496 4 0 R 25.0 0.0 0:22.20 t (task B) > 124 root 20 0 99496 4 0 R 25.0 0.0 0:22.20 t (task D) > > With PE, I was expecting 2 threads with 25% and 1 thread with 50%. Instead I > get 4 threads with 25% in the top. Ftrace confirms that the D-state task is > in fact not running and proxying to the owner task so everything seems > working correctly, but the accounting seems confusing, as in, it is confusing > to see the D-state task task taking 25% CPU when it is obviously "sleeping". > > Yeah, yeah, I know D is proxying for C (while being in the uninterruptible > sleep state), so may be it is OK then, but I did want to bring this up :-) I seem to remember Valentin raised similar issue about how userspace view can get confusing/misleading: https://www.youtube.com/watch?v=UQNOT20aCEg&t=3h21m41s Cheers -- Qais Yousef