Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3286710imu; Mon, 17 Dec 2018 17:13:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/UNoAJuCyQea3Y7bWemn30yWA8MfHuNteE508n4FVYWvqFthJunQSeTRk9f1ditOkzn7u2j X-Received: by 2002:a63:902:: with SMTP id 2mr1104129pgj.219.1545095582422; Mon, 17 Dec 2018 17:13:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545095582; cv=none; d=google.com; s=arc-20160816; b=Vt6T4ejmnUNMv90184KmbF9qB7PJt5AXuBYhn2selJ3aFBBnR9Q66c9YISaCNzji1h 1wvQOeED9/kear+yUWfJRVQMTBnruI5PcHSenp8zNfH5rPdZukvGn/jOWHCErzkSSqgP gE9xfo2tmmHV8o6WiLw5jaB3BJfX9XCcL1v2bIbUxDpv7uj/SkXqtHUFidUcnACj6gP8 a/Z/qFazxMQeZ/u+VMPPQMJv9jeQtQQ4MGp+ozGuJYtV3zkTcKlnpiZuRqAXTmu7pQdq CeP1hsODmBaP12QJuC64a4+OytihEHLmQNBGEMg45wv9llBHpS09WjwtCMFwuMQi/nzb eSmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IWqTg7e7BySNj9lmjGI7lNLIjnRegZYKQ+my+yKGfqs=; b=mMqzBLUgwk3VoiaIsX/GoyGG2KstWXagZAPRqCUvisGdRKgS1W/90KvXN5z/yBiacR N0P37Utp9mzkISFHqztdgwRnpf0/ACQQxB+EwobcsuPHgmAEZGU0A7foInnazb+ePNXb LfiIzamMklJynUxZNcY6BmbSdo0mZBfDF3GpKGhrxDwrkT45ahKqvxJfGTOLRmbiDH1l L9kwKqXYVFvC4+LahfBEuMTFzCgZc/DszwUzOcRnuzPGKjhXEbEkxB4DHa314zUOWPO4 aWrb6GQ2pgrZA8DrKsdizWcxFV5iY6qJTqX91zUSduEU93OxgvIVEg04cxeKvLhGPQa9 FagA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=S2Egdtpy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si1029813plt.356.2018.12.17.17.12.46; Mon, 17 Dec 2018 17:13:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=S2Egdtpy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbeLRBKP (ORCPT + 99 others); Mon, 17 Dec 2018 20:10:15 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45888 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726276AbeLRBKO (ORCPT ); Mon, 17 Dec 2018 20:10:14 -0500 Received: by mail-wr1-f66.google.com with SMTP id t6so14003716wrr.12 for ; Mon, 17 Dec 2018 17:10:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IWqTg7e7BySNj9lmjGI7lNLIjnRegZYKQ+my+yKGfqs=; b=S2EgdtpyJLHPh2GZK2JRSXX2DuPbm4Qa8TB+iKtlgxbHhbVIJOfJR+VQ7xFKBBziQr vjjazB7I+4dLyyswD3fy+9bSCL5llq+20jnJ1Qa7oFlnhTP/3HGph75JlcvgwZ7+6IZJ 1s/b3UYNLpenPmORnuzkDmSfiuRODv7l0zt7vQT1ed9PGwj7X3zvF/aIiyvh119ZkM6R WbFTiU56mQLwJRANDgm+/i22iIe8nwVZrsGkDAjFlBYL4utfVJnfyQDkHG6lWx5x+CqR eK2RWXHiY7x5TpCWK/8chwBirg0TbkUQLBdgJeUedmLxWEbLlEjOvZGBzF/32lZcWE9P gE7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IWqTg7e7BySNj9lmjGI7lNLIjnRegZYKQ+my+yKGfqs=; b=OPuJVS7PWWSPtJO+/Yui1s/UF8j0/FdUJ9f/Lh+nLFhG5FbaTysNGwtZ1oJOnlDsUy EtsIZydeeJcEEJxXyJjYxmAl+Ax5xkKUv4KkfvW8E7/TL+ylXDAFG+wxmNoGPdR+YxN1 npPkB2BBobpN9xcFdYYSlKKVC3flykhpPp0CZr21POZTTI1egs9Z8yK0aNZJIzHV/kT9 LFq2FIqH1VkyLevMqsXYPmSuHyEBfb0aYHP4e2e4ko++yiXDqgUlzVKtWJXcz3A9awqZ 14iJJNJipoL5bPuOGs3zaHiW+Hkb5n1tsalz3tixIotswz/QYITAmYhupnwqXP69KyqD 3k1g== X-Gm-Message-State: AA+aEWYD4Cb0a7aafx1zMGU23C4SL9ZiXaCXpr/+6NSR48CG7om4xORX NFPObVCflKeA9Wdh1SDX9VtJwMiJCbVtMFNx1WuQsQ== X-Received: by 2002:adf:ee07:: with SMTP id y7mr13108042wrn.187.1545095412728; Mon, 17 Dec 2018 17:10:12 -0800 (PST) MIME-Version: 1.0 References: <20181214171508.7791-1-surenb@google.com> <20181214171508.7791-4-surenb@google.com> <20181217145754.GB2218@hirez.programming.kicks-ass.net> In-Reply-To: <20181217145754.GB2218@hirez.programming.kicks-ass.net> From: Suren Baghdasaryan Date: Mon, 17 Dec 2018 17:10:01 -0800 Message-ID: Subject: Re: [PATCH 3/6] psi: eliminate lazy clock mode To: Peter Zijlstra Cc: Greg Kroah-Hartman , Tejun Heo , lizefan@huawei.com, Johannes Weiner , axboe@kernel.dk, dennis@kernel.org, Dennis Zhou , Ingo Molnar , Andrew Morton , Jonathan Corbet , cgroups@vger.kernel.org, linux-mm , linux-doc@vger.kernel.org, LKML , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 17, 2018 at 6:58 AM Peter Zijlstra wrote: > > On Fri, Dec 14, 2018 at 09:15:05AM -0800, Suren Baghdasaryan wrote: > > Eliminate the idle mode and keep the worker doing 2s update intervals > > at all times. > > That sounds like a bad deal.. esp. so for battery powered devices like > say Andoird. > > In general the push has been to always idle everything, see NOHZ and > NOHZ_FULL and all the work that's being put into getting rid of any and > all period work. Thanks for the feedback Peter! The removal of idle mode is unfortunate but so far we could not find an elegant solution to handle 3 states (IDLE / REGULAR / POLLING) without additional synchronization inside the hotpath. The issue, as I remember it, was that while scheduling a regular update inside psi_group_change() (IDLE to REGULAR transition) we might override an earlier update being scheduled inside psi_update_work(). I think we can solve that by using mod_delayed_work_on() inside psi_update_work() but I might be missing some other race. I'll discuss this again with Johannes and see if we can synchronize all states using only atomic operations on clock_mode. > -- > You received this message because you are subscribed to the Google Groups "kernel-team" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe@android.com. >