Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4062362pxb; Mon, 4 Oct 2021 16:31:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm2gzwJsDF+nt7skN2vPze4230wP/zuSR7ZVBFde0mOvt+kRnVCTftgcx4RGmJer2C4r0B X-Received: by 2002:a05:6402:1b11:: with SMTP id by17mr2143499edb.71.1633390301687; Mon, 04 Oct 2021 16:31:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633390301; cv=none; d=google.com; s=arc-20160816; b=nTD7H2I+X5bvGA3dB0JNZPqvjEz4dJdH2o2OEwsWJOJsepSXA9/9022Q6iW6h09puf T50RHUJLD1kVtakW6v/Mu6qYFwTne1cybVp4O9otyZmr0QNSGmGdt0c0mPpLKM7JyY8z yrsQOhIvCJwwZBoV0BqO+XUCdwxf8lAbPr/+kr/aXKDn0U/r0EfPJ54KRgpOrznwthAZ ZCtMlKsXsSrwubyFk6OUzntu4JTN016mBtG0O/4a7Cf7D4KKEwVgr8WuBS2q562sAB/G kaG/sZxNv+ff4qnlJVC5mBS1YXvBv5lgjol5pR0bNTqos3XL6a/Jy3gRyPONfYVsCR83 c/aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=q3rtjAMF0s155PLuGLifQ498nM8uqHQjjd2W39f9bKM=; b=LM4OCFBrLR66XVyfYyOF3e33mPORyyjHM1tKJy0ljxbwGzGCAjrqsABK0moeHZFQRG FUOqeP4VZseQMUrLm4tJPk35Bs1k9mNhlPtqwWKBohVDCfF5HFsGfTq3SKSaMHySpwp2 EWerYj8E4hJ2axbRazy5dX8I1KywZPPWZSDufILiMyf6/fdqeO/DGXJc2yU4lUeTVnY/ M1+ch/8tkw5ilGpXUcD/Nhgnou7LtSR0vT7X4NZH9PlLgkq/y3PHy6QLwmDJH/P6L5qh Wh0pCF2rDDS032ZtAxUJXRUsAEFUhN4CPKxOxEywulng2NwacGLgFk4o9RGeLRjmsz6r mdTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=dNO+T06b; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp29si15639054ejc.290.2021.10.04.16.31.04; Mon, 04 Oct 2021 16:31:41 -0700 (PDT) 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=@google.com header.s=20210112 header.b=dNO+T06b; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233704AbhJDShQ (ORCPT + 99 others); Mon, 4 Oct 2021 14:37:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbhJDShP (ORCPT ); Mon, 4 Oct 2021 14:37:15 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B574BC061749 for ; Mon, 4 Oct 2021 11:35:25 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id x27so75629607lfu.5 for ; Mon, 04 Oct 2021 11:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q3rtjAMF0s155PLuGLifQ498nM8uqHQjjd2W39f9bKM=; b=dNO+T06bp6n0e4wCqt2yTEMB3F80fM9Vgzh5jpZIO6mwe3DQMRXOaOdLXC2M1lh9Dq mE8zj3N4kaJpFMlMmObQxrMYzYFijF3w/RodiCCzivMxJEkMGTHT9reE2Z2XmAQUHNUB qBSFXy+3wiqJxSgNsmPxHifuceiJzF4H8lZLVfvrvY1Xk8lF8SdxcV9M8EtOmN0tT0c6 LSwA2ZHu9+qtrj9c/MDnNYT3a/aS6l3z3CvSBMjGEDRnzK9LjpdHqL57qmotS9zmJekZ zyiWkTFDoth+KvmXIYzXgu+DnWmUElPhq7/W47WaMfHA7Sj87eZwJEUkCSy+IPjbnlDL ud5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q3rtjAMF0s155PLuGLifQ498nM8uqHQjjd2W39f9bKM=; b=Wk77DFnRsvtHZzgk2Te3VNUtYrPH/peNNru7y3p4McWvjaqDC8waBucNqgnM4udVXE 04F8DXk1YFjS/p8aK5syCsAPh4djOp63JTMHJma3z1RFsOrysPLrbZBkJaHSMu6/fAv+ 7HIYBAqkgUYWHZYH9fSGqG9NNlizUvTJ5I/1y0aDhjWy5FpEJfzlxNgJZtY1gteeDeEb BB9wdCrNTrL4nVD2gLaY9xM1jPiwCm47qBwPDgvo97k8Y8IM4g44beRjsP2Y/KBxj9lG EBMBPmWpjRDHWNrJSl4VU96wkPKDs9w6J5wDMp2lksjGzIAA6d6YsRWAM/bRLxkKBx61 w5Eg== X-Gm-Message-State: AOAM532QX+KcmGA4aoyZV++VWMx+8UtU/R0daBfjLANMy/tUOS89y/6d A/+uS87d8123ETiZj1MkSTUY+Edj4RZG4wxB6icevQ7CxLc4kA== X-Received: by 2002:ac2:4157:: with SMTP id c23mr15601352lfi.184.1633372523869; Mon, 04 Oct 2021 11:35:23 -0700 (PDT) MIME-Version: 1.0 References: <20210929235936.2859271-1-shakeelb@google.com> In-Reply-To: From: Shakeel Butt Date: Mon, 4 Oct 2021 11:35:12 -0700 Message-ID: Subject: Re: [PATCH] cgroup: rstat: optimize flush through speculative test To: Tejun Heo Cc: Johannes Weiner , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Cgroups , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 4, 2021 at 11:21 AM Tejun Heo wrote: > > [...] > What do you think about that approach? While the proposed patch looks fine, > it kinda bothers me that it's a very partial optimization - ie. if flush > frequency is high enough for this to matter, that for_each_possible_cpu() > scanning loop really isn't appropriate. > Makes sense. I will take a stab at that.