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=-2.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6433CC433DB for ; Wed, 10 Mar 2021 21:41:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D271064E33 for ; Wed, 10 Mar 2021 21:41:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D271064E33 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 600878D0213; Wed, 10 Mar 2021 16:41:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D77A8D01ED; Wed, 10 Mar 2021 16:41:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4A0978D0213; Wed, 10 Mar 2021 16:41:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id 2FF178D01ED for ; Wed, 10 Mar 2021 16:41:53 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DA6378142 for ; Wed, 10 Mar 2021 21:41:52 +0000 (UTC) X-FDA: 77905287264.30.60C31F6 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf04.hostedemail.com (Postfix) with ESMTP id 822613C2 for ; Wed, 10 Mar 2021 21:41:49 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id h10so30403997edl.6 for ; Wed, 10 Mar 2021 13:41:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o/qwFAyd2t4eeQ5y/zr+yw6AQn6TtGLfgsf4qZGMOj0=; b=IuZNGPtOkpq7xi8mg/JCqVEioZf5VKLjRUeEhu6DPobVhI9+q7izx2xlVN0mQCzaL8 HQMk2lWBA/qp+IBC9BQV3Nzc/VH4aRN09q834QPs1M5nhmy6fViT35JVuBYlXot5I5b7 YcwNUonY3kXQfEytf/YWjq0d+Zi3bNMUJ5+6I2HdGfT4sJxdDqL8UzhYJyAAvAcEk0aD rq7ARSvWXJ/2EgAja08AVrkvvdAlik6f4IeHG7WW8aKALJ/9wUZGfyD3x4MGLNjEk3dm abY4MdlSFEZLPt8XSUGrFAk5uOvlHsT5rp0Q2drj+3u+ewgeCkbiciBvAoOzl3K+xACW wS1Q== 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=o/qwFAyd2t4eeQ5y/zr+yw6AQn6TtGLfgsf4qZGMOj0=; b=oB+WTvi8Kw3lTppgG8JJpoPp5n4FhxRpz44OCGRMD2o278NwMiNWQ14nvA0/Y5A1bu GX5C6hWNmF6ImVJVj1FvXVs9i4R+c40QZQXtmLG8E2eQPtATx9/iTTAJ52iGMXYw9Wmh ergLem0oY8hpWjpvrVpXRLNGtFa2ZS9lOQ0GpQEBwmJHAiPugoIHJZ5FPSU1HGRNYPh0 9nhmDq2NPnT3qDhWKmt+UJjydn//fL3lN0+oV07KM6w1Yj6FUSE4Up5xy/odtENa/pLe WHubop90HylHBmmezG6uSUIi20WaGGeHD2jeBuYPLHOb2WTu6Y0gz4h6Ew9mvbc9rOS6 iAnA== X-Gm-Message-State: AOAM530MV46Njey4KFU+9fWg2REALv2QSDcnaeH1wISBKGKLCcsvo96H EjN9wGRMKq7HTd4drGfByOb3yWWK6kLNKzWU/xU= X-Google-Smtp-Source: ABdhPJywjTf6nT0poSBOpWK3Efk08tHVcrEHEq/GIItbAKb6sm9RkAFzPMqFnGoKno2pW+PgllbEO8q516idS5NzHK0= X-Received: by 2002:a50:ef11:: with SMTP id m17mr5428269eds.151.1615412509105; Wed, 10 Mar 2021 13:41:49 -0800 (PST) MIME-Version: 1.0 References: <20210310174603.5093-1-shy828301@gmail.com> <20210310174603.5093-14-shy828301@gmail.com> In-Reply-To: From: Yang Shi Date: Wed, 10 Mar 2021 13:41:37 -0800 Message-ID: Subject: Re: [v9 PATCH 13/13] mm: vmscan: shrink deferred objects proportional to priority To: Shakeel Butt Cc: Roman Gushchin , Kirill Tkhai , Vlastimil Babka , Dave Chinner , Johannes Weiner , Michal Hocko , Andrew Morton , Linux MM , linux-fsdevel , LKML Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 822613C2 X-Stat-Signature: xnqbh18fw5kykiu7m1588x4j7xknnao5 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf04; identity=mailfrom; envelope-from=""; helo=mail-ed1-f48.google.com; client-ip=209.85.208.48 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615412509-706129 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 Wed, Mar 10, 2021 at 1:08 PM Shakeel Butt wrote: > > On Wed, Mar 10, 2021 at 10:54 AM Yang Shi wrote: > > > > On Wed, Mar 10, 2021 at 10:24 AM Shakeel Butt wrote: > > > > > > On Wed, Mar 10, 2021 at 9:46 AM Yang Shi wrote: > > > > > > > > The number of deferred objects might get windup to an absurd number, and it > > > > results in clamp of slab objects. It is undesirable for sustaining workingset. > > > > > > > > So shrink deferred objects proportional to priority and cap nr_deferred to twice > > > > of cache items. > > > > > > > > The idea is borrowed from Dave Chinner's patch: > > > > https://lore.kernel.org/linux-xfs/20191031234618.15403-13-david@fromorbit.com/ > > > > > > > > Tested with kernel build and vfs metadata heavy workload in our production > > > > environment, no regression is spotted so far. > > > > > > Did you run both of these workloads in the same cgroup or separate cgroups? > > > > Both are covered. > > > > Have you tried just this patch i.e. without the first 12 patches? No. It could be applied without the first 12 patches, but I didn't test this combination specifically since I don't think it would have any difference from with the first 12 patches. I tested running the test case under root memcg, it seems equal to w/o the first 12 patches and the only difference is where to get nr_deferred.