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,URIBL_BLOCKED,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 4B321C433DB for ; Fri, 12 Mar 2021 22:43:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CDEBD64F69 for ; Fri, 12 Mar 2021 22:43:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDEBD64F69 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 44C8C6B006C; Fri, 12 Mar 2021 17:43:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 422BD6B006E; Fri, 12 Mar 2021 17:43:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EB266B0070; Fri, 12 Mar 2021 17:43:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id 146B26B006C for ; Fri, 12 Mar 2021 17:43:02 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 3695A18028996 for ; Fri, 12 Mar 2021 22:43:01 +0000 (UTC) X-FDA: 77912698962.09.AC08682 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by imf28.hostedemail.com (Postfix) with ESMTP id A2ECD21AE6C7 for ; Fri, 12 Mar 2021 22:43:01 +0000 (UTC) Received: by mail-lf1-f45.google.com with SMTP id n16so47798295lfb.4 for ; Fri, 12 Mar 2021 14:42:59 -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=vNFX3HHiQJMdOb9029SXx4uJ49l+AgHck3C0FgRZcTA=; b=QkxFqsK/wpGEqSaZuVpiQAI4chLLzOCi8NwnOOTBxrN+8ogT9JhUCo2aN+PWFBSMJo 0CI2GC4SeHoJIDwxZC4R7gEECvO/yRTK19oBKU5qtS+uS8fEfvbx4OBbUyOKchv9ptWk nK4PbXeh1FEvoiLq70pC59k0UaFTEeBaBdotPUHor7cqqAUxWD0tGnjJz9fashqml2nl ylDJCZgCymGqAcrSVN18Iv7MlXd//42IYbY37tFQDjqwUF9vKBAyonSMwrcmeb8TpqB2 W98MZQPaYYimHG3VGrvZYT1YKGFyM44q4Ie5P55ra/wRBfcE+KXNyHg9sdvUxZBLm6Kt zqsw== 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=vNFX3HHiQJMdOb9029SXx4uJ49l+AgHck3C0FgRZcTA=; b=d3OeKswDvg4VvbAmzRrbHV5QycfJuKGTLUxbPTmCNKqAB4GM3vAb0+2h5D+AlxWrm8 ol8Dqesu9pSdwEIP83drpnTtZ0lYZinDO6leyfto8BIylWsbe9od7SGM/2PsU/70glBL 6HMynnNdZdlOe8ReSkxiLDFXqebNUeUqc1czOt4wv5R81CWRhjum1ITLK0VLYFWxn0GL 2bxkJfOQmWdJByC+8w/nHFBEpt3+p7oHZgnBUMj0wCs1Hu4y1WSW/SMPV3wU4rXIrsUI FaBExDGh4F5YOSTnat2y3ySoeCQ09yq0zI/9LiLr7/roJFgFYLLrchT4uSOLiAWg45fa zqBg== X-Gm-Message-State: AOAM532FqMaPHH3EXmxxurvui9pQtNIccIShTsayWPPKOFfSK756zdZJ 8lzYp5Omag3v1J/gq/j49LzQr9upZcEBS+IOfbYn6g== X-Google-Smtp-Source: ABdhPJy8Uk2cZCYdisKmgw9wh7bIhRLCkr/CF3SBYoLZLt7QghsfwFf14P8v0qSnbAYrgB6mBBjwkELAOf81FeFEBiA= X-Received: by 2002:a19:e0d:: with SMTP id 13mr804184lfo.549.1615588978110; Fri, 12 Mar 2021 14:42:58 -0800 (PST) MIME-Version: 1.0 References: <20210309100717.253-1-songmuchun@bytedance.com> <20210309100717.253-3-songmuchun@bytedance.com> In-Reply-To: From: Shakeel Butt Date: Fri, 12 Mar 2021 14:42:45 -0800 Message-ID: Subject: Re: [External] Re: [PATCH v3 2/4] mm: memcontrol: make page_memcg{_rcu} only applicable for non-kmem page To: Johannes Weiner Cc: Muchun Song , Roman Gushchin , Michal Hocko , Andrew Morton , Vladimir Davydov , LKML , Linux Memory Management List , Xiongchun duan Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: A2ECD21AE6C7 X-Stat-Signature: ejarqs6c1jf4986pn3ef9ck58wttsacn Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf28; identity=mailfrom; envelope-from=""; helo=mail-lf1-f45.google.com; client-ip=209.85.167.45 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615588981-4160 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: Hi Johannes, On Fri, Mar 12, 2021 at 11:23 AM Johannes Weiner wrote: > [...] > > Longer term we most likely need it there anyway. The issue you are > describing in the cover letter - allocations pinning memcgs for a long > time - it exists at a larger scale and is causing recurring problems > in the real world: page cache doesn't get reclaimed for a long time, > or is used by the second, third, fourth, ... instance of the same job > that was restarted into a new cgroup every time. Unreclaimable dying > cgroups pile up, waste memory, and make page reclaim very inefficient. > For the scenario described above, do we really want to reparent the page cache pages? Shouldn't we recharge the pages to the second, third, fourth and so on, memcgs? My concern is that we will see a big chunk of page cache pages charged to root and will only get reclaimed on global pressure.