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 F2095C4332F for ; Wed, 12 Oct 2022 15:40:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F8BC6B0071; Wed, 12 Oct 2022 11:40:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A8AA900002; Wed, 12 Oct 2022 11:40:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8BA26B0074; Wed, 12 Oct 2022 11:40:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id D37EB6B0071 for ; Wed, 12 Oct 2022 11:40:30 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 4A2B61C6B78 for ; Wed, 12 Oct 2022 15:40:30 +0000 (UTC) X-FDA: 80012709420.30.E6B362F Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) by imf21.hostedemail.com (Postfix) with ESMTP id DC7A01C001A for ; Wed, 12 Oct 2022 15:40:29 +0000 (UTC) Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-35befab86a4so158907527b3.8 for ; Wed, 12 Oct 2022 08:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ivMZDopBydPz/wE+y//4HcN78R6tls33wt70oMeZZfY=; b=I0klZrTKxVSMv4twVpPFUgddLbVcA4lpsbbESqRG8zjXN8l9SRrK1XSkQhNmVwrAv4 fD+LKjbjNFZJgM+1cgbLQCexiXptvB/H79dwd/KsORIFbVEMy/3yNc7B8YMZKXA1kcGQ A4KHjZ7Th7x9EVCveIq0qhNZSZSbj3wfrxAeL1rXyZXJEOEmRfkv7WPqjaXtX0DN6gYo XNDLwf7P9BJJPBjWWHstjzcfHsURbWMfzxQG1A6O1NmDmrsqWkQjtojYKrOklii0ysd5 deOd/XT1kRWj+Telvutbv+U6MWUp59KD+12Qm/s3aJLcYPoq/RNvj9FWYTlYmQqBrNtv n3NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ivMZDopBydPz/wE+y//4HcN78R6tls33wt70oMeZZfY=; b=q47++BMuOvhpbhf1jy8GXDhRHkXVQX9isvTvT/TIWaJKFGg6hsuf8zR5QOQfvuAz7W hUSwnYCqElyfbgzX1X9bGkbyY55uFn+cq2mhUFAwmYNfyAnAdPqKFc9Ode5+ia6I0Zdd Zb8e72dS8QnaMvN7lixLUha0yrpr6F5KFQpxTvhGfYE6zaeH8XjksDm7qI1roF6uhgEP QB2paJQKcbhmbxim2MuN1CO9uyQWt71zem0CLrzQ/jIPgFtHNPd4XJjwtwev/izgeSTw 2Ke+xZLqoK9sXrUIb+2uVXQ25G2mFRpOejmAuZNifirzfc+hwVQ6nMHJToqrcdONLFq9 aVAQ== X-Gm-Message-State: ACrzQf1Yza2qPXL5bygRny7lsFhr/3Q57LKKAtovVOryxx75d4f5SsQR Aw6LksBU3xBN3hlcvKdYZ5Ah+ddRFSjz2f0hG/eTH86rjnnKxw== X-Google-Smtp-Source: AMsMyM6M4G8fMIeFkk1YSGBq294rxa2P74/9tGWBLFApkQ+EPdaSBq9DI8yQ1Dp0OwvgH1s+z2BjTGNoThcrLxrKuPg= X-Received: by 2002:a81:cd1:0:b0:356:e01d:269f with SMTP id 200-20020a810cd1000000b00356e01d269fmr27341436ywm.263.1665589228895; Wed, 12 Oct 2022 08:40:28 -0700 (PDT) MIME-Version: 1.0 References: <20221012062034.486-1-hdanton@sina.com> In-Reply-To: <20221012062034.486-1-hdanton@sina.com> From: Suren Baghdasaryan Date: Wed, 12 Oct 2022 08:40:17 -0700 Message-ID: Subject: Re: PSI idle-shutoff To: Hillf Danton Cc: Pavan Kondeti , Johannes Weiner , linux-mm@kvack.org, linux-kernel@vger.kernel.org, quic_charante@quicinc.com Content-Type: text/plain; charset="UTF-8" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1665589229; a=rsa-sha256; cv=none; b=ZBnBQnu0F2H9Pk7mQ62IZxcwxjeysKvou9ABUT1USafi4oU8sx5CLPPeHkoYwCvcNYgdpM cHrcRN98Bkw2hynNcmhXSRrLDcW4LtMK8q8FHwrlYu8QRgJK5Tfh530WEXJAU+Xbl2Kp4C tFnRcyk4cyVdP32cNVStVdYJPcKwq+k= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=I0klZrTK; spf=pass (imf21.hostedemail.com: domain of surenb@google.com designates 209.85.128.174 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1665589229; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ivMZDopBydPz/wE+y//4HcN78R6tls33wt70oMeZZfY=; b=NpiIQ7gGrNPsevm0d92VXN+230NuKKmoH+F7wEavGmYxmNWHbJkYFjzzTze3iSbh8sVu6M jCXUrEw3oHGf5BXup4omefoj3Ggyr5QrAT9cT9D6eZHyGYsg5dWDHB7IQmgrvRZv+ve5Ps QAqwp7TVyEaJajaUGgZPRcSBoQDWFz0= X-Stat-Signature: riad1sqdc7kwaskot63t6z7bs5aqb8st X-Rspamd-Queue-Id: DC7A01C001A X-Rspam-User: X-Rspamd-Server: rspam08 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=I0klZrTK; spf=pass (imf21.hostedemail.com: domain of surenb@google.com designates 209.85.128.174 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1665589229-236737 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: On Tue, Oct 11, 2022 at 11:20 PM Hillf Danton wrote: > > On 11 Oct 2022 10:11:58 -0700 Suren Baghdasaryan > >On Tue, Oct 11, 2022 at 4:38 AM Hillf Danton wrote: > >> > >> Given activities on remote CPUs, can you specify what prevents psi_avgs_work > >> from being scheduled on remote CPUs if for example the local CPU has been > >> idle for a second? > > > > I'm not a scheduler expert but I can imagine some work that finished > > running on a big core A and generated some activity since the last > > time psi_avgs_work executed. With no other activity the next > > psi_avgs_work could be scheduled on a small core B to conserve power. > > Given core A and B, nothing prevents. > > > There might be other cases involving cpuset limitation changes or cpu > > offlining but I didn't think too hard about these. The bottom line, I > > don't think we should be designing mechanisms which rely on > > assumptions about how tasks will be scheduled. Even if these > > The tasks here makes me guess that we are on different pages - scheduling > work has little to do with how tasks are scheduled, and is no more than > queuing work on the system_wq in the case of psi_avgs_work, I must have misunderstood your question then. My original concern was that in the above example your suggested patch would not reschedule psi_avgs_work to aggregate the activity recorded from core A. Easily fixable but looks like a simpler approach is possible. > > > assumptions are correct today they might change in the future and > > things will break in unexpected places. > > with nothing assumed. >