Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1625908pxf; Fri, 12 Mar 2021 14:45:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxPkxtYINHgnbD6kyZSsY3hdcDf8dDRr/uwUAsuoECK6xNVRdet3ma3WCLmowDUlMmHZaZu X-Received: by 2002:aa7:c1d5:: with SMTP id d21mr16490607edp.167.1615589116560; Fri, 12 Mar 2021 14:45:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615589116; cv=none; d=google.com; s=arc-20160816; b=O24s+amiu79jAUyNknQ84ThThs6awZ+hhuL3iti8XlCFzz4YbZfNCO73zlgi+xTwUo 4eFRYaws/L4F9gy6nIP/DnkwNygf1Coe/0nHj4pilm0uMTe/DMWrNgecQBVDIUXHTUEm oGiRx4d44mltFhdgWEMXCRq2xMFMpnAQyyUYFhwiHDeGLif3kbDc/eTdieLDDVsLk1Pc Gfel8ACQQaZEd5LVwwGmpsJShC8BlQivtVA/3HQ8+uQfiNkiF0acqh/k6PYktRqilQwM KLlQln7toFGMLcPropc6WHcXVQB0w2L8lfJAirhLnAmhLPUwftGM/SzlXuq3xtdiaJy2 zkxA== 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=vNFX3HHiQJMdOb9029SXx4uJ49l+AgHck3C0FgRZcTA=; b=KWuCSOpNwh0M61q9PNqG8iTIvqz5VM9U2M4rRIbR1u4yVMEuyxsubBoz99/TnbcPUz ydtWjizHL8uLp5vyZ05TMQwsBo85ZZ8pbc51WFvrVbDTQQfZkG1Qr+g221EchWIFoyXH ADuX9wn5pi9jty6hN6EqI3D22LmVtaViLFZzqHnbvDT1a6XkzWIaU8nBwNmrZSkV//fz J6OG87tDmbMml8sNoGQ9f60dUDzHFA23yLCvGNBTl3IV8M3YS5LZOvyWhWZLl74QXehQ 23MY3RY6zJLKO28/tj//C6ydmAoqXP6aUO38I5gD/E1LUzRjnqpUxkfKNLtH0liCC2/4 zHcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="QkxFqsK/"; 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 v2si4708151ejw.670.2021.03.12.14.44.52; Fri, 12 Mar 2021 14:45:16 -0800 (PST) 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=20161025 header.b="QkxFqsK/"; 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 S235633AbhCLWnU (ORCPT + 99 others); Fri, 12 Mar 2021 17:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235640AbhCLWnA (ORCPT ); Fri, 12 Mar 2021 17:43:00 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4200C061574 for ; Fri, 12 Mar 2021 14:42:59 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id v9so47787532lfa.1 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=ClgwLm5yJ4t7ExBTLc8yTJ0HTpNzCHZ90JEBpX0bhV3E1TJ/qn16wqYq303e/2c528 YgtqI/xcSPQXqzUZA8lfbB1yKEUAMnqOzFMhBXlz67uaEZEbhsLXKN5YQpcntXxSDJL8 A/6aTmLKwQZBzUC+PLWwE2UlaWbRaOg3Vbjhdp+/RrKw92yDVGgz0bcOKKCm15WTZxce HQEawBv3vx63rpd4yGerOO67+Rb+LvIVRpLjl3mmbAYBGplXJwZBlXFg/VxXCXgva3fs FmEnEWb2OkcNb5OonZ1tHoE/0MXQ9CyReqp2F+OtSKFlNR/ITDp48v3zf5EiRQgCXePn sMtw== X-Gm-Message-State: AOAM533gQz3moHtWW7OZo0aTbJFdIvfHG0SnU2SyRSE//gncOrrqY+nC sKpm6B7oJ3F56d9CUVxMkjHs0bn9XKXDmMGnSelA4juQ3QY= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.