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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2402C433EF for ; Thu, 16 Sep 2021 21:05:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B67B0601FA for ; Thu, 16 Sep 2021 21:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239894AbhIPVGZ (ORCPT ); Thu, 16 Sep 2021 17:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232910AbhIPVGY (ORCPT ); Thu, 16 Sep 2021 17:06:24 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D362C061574 for ; Thu, 16 Sep 2021 14:05:03 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id b15so5257406lfe.7 for ; Thu, 16 Sep 2021 14:05:03 -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=23HNxgixZz7HROjNjlGvcSmaUCblTGeHOsIAJ8Co38s=; b=iDY2xncG8BV1STCUKqiHq9fAWVQ7uxUoGme0MVCBxmh0aeyhBCf4QisYop1+EzjZiX JjchHn4ne/4IhtARj18LA568/XiZdt4l6zVCrqpGkeQYafx6Xgb/1KqQuyA8PxpRWTqf sXWiyC06t52sI02f1Xa+skdlNHN06dBwScnhizH1tsPyTfWgY/UUXu7kblbx0w8Q8sS5 KfcoSjEAUHx19x0avJSMHFmkBTMRzcoYeqTeWG7To6tj9p3zVZJzTHliHZq8KrNPzm/J G6vVuoVisa4WrkOoXs4o9llycKGwVEY80vsvzzkEyvL2IFokW+c+/NVjnuuXol2J2kNi jFvw== 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=23HNxgixZz7HROjNjlGvcSmaUCblTGeHOsIAJ8Co38s=; b=zrOe9K4tDm9tjb3gekry8ISMNUvDb1+NwdS84AbD6VaobkboxHXAWfjbkbvBPw2qjM QeoeHXwZA96m2l1B8lPULy/9zB+og8+LlC0d+vAWsEPPvss4napRb6oTQAp1JX2gWZIt QEIO19KvrhR4tdHc6Apb0da6FtxWLxR7+kw4Ul3xeOH7yQtwg5Hnnsd0JP37E5Zpkx2T pRsHQREm9Bg8mnnMe/OfaZDBTGjJnJa8fv2D1kVSXtcz4Da0kq4zP55KWknQeKK5CYCJ cTGqHc0GMc7tZegFXGgq3GKt82Xrg3TgnmU0jYgejFufgVwXixmIER9AXuR5Pd1i/nXj Zlow== X-Gm-Message-State: AOAM532B/TD98i4CTyVLhUZjSVAZkJaIPnk/Q01y4rhrgekRRZ6E4hq4 07OQjD5QcOJX1lN/A2V4zrLda3z/vDR8wdIjz95VoA== X-Google-Smtp-Source: ABdhPJy2MhLJVak4fVGGClbNu8ki6/UdSBfbyC5LLDi2KCOHNV5eRMb85bbEIUmQfPma5wYrcd4boLOFNgfq/5O9DPA= X-Received: by 2002:a2e:9ed9:: with SMTP id h25mr6435874ljk.40.1631826301732; Thu, 16 Sep 2021 14:05:01 -0700 (PDT) MIME-Version: 1.0 References: <64b88941-9ec0-8552-d05d-6503497f6f9d@MichaelLarabel.com> In-Reply-To: From: Shakeel Butt Date: Thu, 16 Sep 2021 14:04:50 -0700 Message-ID: Subject: Re: memcg: infrastructure to flush memcg stats To: Linus Torvalds Cc: Marek Szyprowski , Andrew Morton , Feng Tang , Michael Larabel , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 16, 2021 at 1:45 PM Linus Torvalds wrote: > > So the kernel test robot complained about this commit back when it was > in the -mm tree: > > https://lore.kernel.org/all/20210726022421.GB21872@xsang-OptiPlex-9020/ > > but I never really saw anything else about it, and left it alone. > > However, now Michael Larabel (of phoronix) points to this commit too, > and says it regresses several of his benchmarks too. > > Shakeel, are you looking at this? Based on previous experience, > Michael is great at running benchmarks on patches that you come up > with. > Yes, I am actively looking into this and the discussion is happening at https://lore.kernel.org/all/20210905124439.GA15026@xsang-OptiPlex-9020/T/#u I would definitely take up with Michael on helping with running the benchmarks. We know the source of the regression which is queue_work() in __mod_memcg_lruvec_state(). Previously we were doing atomic addition up the memcg tree. I have to come up with an approach to reduce the calls to queue_work() in that path. thanks, Shakeel 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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F493C433F5 for ; Thu, 16 Sep 2021 21:05:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A9F82601FA for ; Thu, 16 Sep 2021 21:05:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A9F82601FA Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 27E5C6B0071; Thu, 16 Sep 2021 17:05:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 22EA3900003; Thu, 16 Sep 2021 17:05:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F5CC900002; Thu, 16 Sep 2021 17:05:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id 017236B0071 for ; Thu, 16 Sep 2021 17:05:03 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B07E6182AE88F for ; Thu, 16 Sep 2021 21:05:03 +0000 (UTC) X-FDA: 78594666486.19.F0018AC Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by imf12.hostedemail.com (Postfix) with ESMTP id 7C48610000B4 for ; Thu, 16 Sep 2021 21:05:03 +0000 (UTC) Received: by mail-lf1-f47.google.com with SMTP id d42so2217316lfv.10 for ; Thu, 16 Sep 2021 14:05:03 -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=23HNxgixZz7HROjNjlGvcSmaUCblTGeHOsIAJ8Co38s=; b=iDY2xncG8BV1STCUKqiHq9fAWVQ7uxUoGme0MVCBxmh0aeyhBCf4QisYop1+EzjZiX JjchHn4ne/4IhtARj18LA568/XiZdt4l6zVCrqpGkeQYafx6Xgb/1KqQuyA8PxpRWTqf sXWiyC06t52sI02f1Xa+skdlNHN06dBwScnhizH1tsPyTfWgY/UUXu7kblbx0w8Q8sS5 KfcoSjEAUHx19x0avJSMHFmkBTMRzcoYeqTeWG7To6tj9p3zVZJzTHliHZq8KrNPzm/J G6vVuoVisa4WrkOoXs4o9llycKGwVEY80vsvzzkEyvL2IFokW+c+/NVjnuuXol2J2kNi jFvw== 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=23HNxgixZz7HROjNjlGvcSmaUCblTGeHOsIAJ8Co38s=; b=OJvxxTtLIv8WcE3jqvnv1o6lc7I67/eK3yVAEWOo5Zub4b63J7xYME7v7VdxTGsdc/ ZseeTWcLLCfXouavy/k8SKw2uwfkVBTir3g1tiR6vl3yNBMr+/RlGxDmpDEngcyGe9UR HRdFdi1H6qkfx3eDbT42nacQFtXoGsB8Wm2HdGs/XGn56i9T+F8edbAPBY9ackQRyAcQ nIgwUkr11JNxfCf6ja5V8hPho1yMJPPv3FtJ8qroOn2rdhvGr+NaHNcJ4Tl1r79FlyyC m36am8f/63UcyTd1lUGnDLktPDglpmNbOl8pOP7o/0nX5q4lSkum3Lhe0fdY7I1/151w BMjg== X-Gm-Message-State: AOAM533iCCS8jJOEZu/X5vRCc6u3w0sEG2/0TLiD2LL7nQ5lb/L0YdTq aReiP+V9Bww2sVOJKb+lYCAAkTgh16CNVQ9A7RBX8A== X-Google-Smtp-Source: ABdhPJy2MhLJVak4fVGGClbNu8ki6/UdSBfbyC5LLDi2KCOHNV5eRMb85bbEIUmQfPma5wYrcd4boLOFNgfq/5O9DPA= X-Received: by 2002:a2e:9ed9:: with SMTP id h25mr6435874ljk.40.1631826301732; Thu, 16 Sep 2021 14:05:01 -0700 (PDT) MIME-Version: 1.0 References: <64b88941-9ec0-8552-d05d-6503497f6f9d@MichaelLarabel.com> In-Reply-To: From: Shakeel Butt Date: Thu, 16 Sep 2021 14:04:50 -0700 Message-ID: Subject: Re: memcg: infrastructure to flush memcg stats To: Linus Torvalds Cc: Marek Szyprowski , Andrew Morton , Feng Tang , Michael Larabel , Linux MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7C48610000B4 X-Stat-Signature: 1ig6pfp7uwmeheh6jjwcukx8jxc344xx Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=iDY2xncG; spf=pass (imf12.hostedemail.com: domain of shakeelb@google.com designates 209.85.167.47 as permitted sender) smtp.mailfrom=shakeelb@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1631826303-806330 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 Thu, Sep 16, 2021 at 1:45 PM Linus Torvalds wrote: > > So the kernel test robot complained about this commit back when it was > in the -mm tree: > > https://lore.kernel.org/all/20210726022421.GB21872@xsang-OptiPlex-9020/ > > but I never really saw anything else about it, and left it alone. > > However, now Michael Larabel (of phoronix) points to this commit too, > and says it regresses several of his benchmarks too. > > Shakeel, are you looking at this? Based on previous experience, > Michael is great at running benchmarks on patches that you come up > with. > Yes, I am actively looking into this and the discussion is happening at https://lore.kernel.org/all/20210905124439.GA15026@xsang-OptiPlex-9020/T/#u I would definitely take up with Michael on helping with running the benchmarks. We know the source of the regression which is queue_work() in __mod_memcg_lruvec_state(). Previously we were doing atomic addition up the memcg tree. I have to come up with an approach to reduce the calls to queue_work() in that path. thanks, Shakeel