Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4223666pxb; Mon, 8 Feb 2021 10:46:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJypZ0kvffpH43qaBWxjUMSlUi5z6KUR95tpLD8uy98PcDBedeDEan9oPS4OSZMl3MjKzwld X-Received: by 2002:a05:6402:541:: with SMTP id i1mr9834690edx.36.1612809972517; Mon, 08 Feb 2021 10:46:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612809972; cv=none; d=google.com; s=arc-20160816; b=xGYMuqj+iYR1W5Nux6086TNhsGMpT1yjtfSlID07SJjQnT634wKga9TNnLfz711p0Y 4RjudG9gm8ERCq9kLz+xdxXOvipNpqC9hXCUy/y9jRSYOk3rgjPiK66Lz0FCv6Hb6JBN e2qr0ElC10Jz4+TH8bWv3F88Iej3XKYIG4S5v4qEXZuqhXJ5BkPcsNXx8mWIpB8WvED8 0MzmV4IsaB9RSbxpTglTjIqipOvCdujW5sU2CeMHHszCYwUh6xzrNBYpmUW1S1Z35BIZ zMvw5SUl29fu4cAOCnd2DHXB+YKt5ghSD/qrlEg8SGuhG6pqRWQgEddpJKk3zRvjQZ4t x+rg== 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=z4+/UAUxX6/4+nPbgYcfOOvOW20Oi6mUCWX13gHCXgY=; b=oHn7ePCWIAg6Hys4xwzneyGkBf5FNT1k8YJAZpsny8Gvwsn64wl5gD6wvB6jNEbU/v jmRPAqD6XIX9M46I/nJe8HvuKFoAucpk37mO9O8nYqdt5b/hZs8ZVz4a3gL0bsab4FOL DGFljzaeZURoVgudCAoxBVeBGVJxRTKXddbFSRbQgo/ivTbOlCHKW8e24jqLDt3W8gtk /LDDICxb5Ayz3EJJBcD7iJxYutZSiu5Q4IUFxrBW+7wpEKLxI0nKhqs8F8BpkiWwjaEf dLby//ioVhdbf/dSKvcYoe6cBxbz4rC6YixqW2OgJFpBX4cnGDxvCfVD/+I9NerYRzPH OVjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=n+rZGS7J; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g19si10810187ejz.742.2021.02.08.10.45.49; Mon, 08 Feb 2021 10:46:12 -0800 (PST) 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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=n+rZGS7J; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235942AbhBHSna (ORCPT + 99 others); Mon, 8 Feb 2021 13:43:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234503AbhBHQqk (ORCPT ); Mon, 8 Feb 2021 11:46:40 -0500 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06335C061786 for ; Mon, 8 Feb 2021 08:46:00 -0800 (PST) Received: by mail-qv1-xf2c.google.com with SMTP id r13so7204643qvm.11 for ; Mon, 08 Feb 2021 08:45:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=z4+/UAUxX6/4+nPbgYcfOOvOW20Oi6mUCWX13gHCXgY=; b=n+rZGS7J7T6hTq7r5Upn5tvO1h7vkY11CCBAIcmUASxzHtyardQi95qQmpG2K/da4Q si2FUTkAMPjV8JGmwTKCLVCNpZpyt1p3uMPzTgAHV/tM3PfZIBNWwjmR3cNfZEX54BRO qdwLvUjPG+tCppsNDyA210ZE8RSfHpatTzTYyW9pjvkDsVEN41Sqk5KTC+i5DUUcjWzP oSzEllgyYeL5bIM47qNhkl1XXmOOkawKiOYKgofXl+Kpu0whPCYNDj2xkK3us2XFAdAS jK7zVt6pGpPK7fzVc+KKY2oF7lwKTIHbIV6s1C5t+3hYs8u/wW3bNmtnS5UmVJResgSy 0KjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=z4+/UAUxX6/4+nPbgYcfOOvOW20Oi6mUCWX13gHCXgY=; b=J25+3oqez8ca48K8PQ5HB2DnuP7TyFaO8R7TkilaoZ+lzxI9ZImI4f0RpmW1Su2ZVh g4iycx057t9t0W+wy6y/hftMihdZNH0iYLXcDt+pfCoYoKRM5Zgo4e3Kxib3Cfa1bTjN doC0N6ko3h/PPLjzaNXP/t5CMHbWL4GGKUAY8OSJIjphSlR6hb6HsdfN9G9uJ1CpMFLp Dp+fVIjFBuHpDwxfuAgRJQJi8tUNjmiV7ol44cQx/0w+on9nT9dGTW3sTUZXazqv3UPp SqZuQZElURT+Yz6I2Pr3O+iOHCYeqp5j5wttCjnmfDTlzTJHLTZVla+gZf5o9TsGXgF0 fb2Q== X-Gm-Message-State: AOAM533txS0ApiYixcFTZlgqjtsPUvhqo1VNnSDHecpRC7ID+WliEBwU KKmvpsmFicHnno2+XuChL6eAfw== X-Received: by 2002:ad4:40c6:: with SMTP id x6mr16677381qvp.10.1612802758643; Mon, 08 Feb 2021 08:45:58 -0800 (PST) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id t71sm17182587qka.86.2021.02.08.08.45.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 08:45:57 -0800 (PST) Date: Mon, 8 Feb 2021 11:45:56 -0500 From: Johannes Weiner To: Chengming Zhou Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, dietmar.eggemann@arm.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] psi: Remove the redundant psi_task_tick Message-ID: References: <20210207115642.75620-1-zhouchengming@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210207115642.75620-1-zhouchengming@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 07, 2021 at 07:56:42PM +0800, Chengming Zhou wrote: > From: zhouchengming > > When the current task in a cgroup is in_memstall, the corresponding psi_group > is in PSI_MEM_FULL state This is correct. > so we can remove the redundant psi_task_tick from scheduler_tick to > save this periodic cost. But this isn't. It IS the task tick that makes it so. The state change tracking counts MEMSTALL tasks and ONCPU tasks, but it doesn't check whether the ONCPU task is the MEMSTALL one. It would be possible to incorporate that into psi_task_switch(), but you have to be careful with the branches because that path is often hotter than the timer tick. This patch by itself breaks page reclaim detection, so NAK.