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 4477EC433DB for ; Wed, 10 Mar 2021 23:01:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D02E464FAD for ; Wed, 10 Mar 2021 23:01:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D02E464FAD 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 5B8C68D024A; Wed, 10 Mar 2021 18:01:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 58FCF8D0243; Wed, 10 Mar 2021 18:01:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4302E8D024A; Wed, 10 Mar 2021 18:01:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0074.hostedemail.com [216.40.44.74]) by kanga.kvack.org (Postfix) with ESMTP id 2A4938D0243 for ; Wed, 10 Mar 2021 18:01:34 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D0B845003 for ; Wed, 10 Mar 2021 23:01:33 +0000 (UTC) X-FDA: 77905488066.24.AA53075 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by imf10.hostedemail.com (Postfix) with ESMTP id DF76E4080F55 for ; Wed, 10 Mar 2021 23:01:29 +0000 (UTC) Received: by mail-ej1-f54.google.com with SMTP id hs11so42192321ejc.1 for ; Wed, 10 Mar 2021 15:01:33 -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=f1OhGlJz2j6YTYfzWFHdwbgV7PiLTTKaD5d9gsHnl1E=; b=lW9tBi577tyTEpO0bVugV0TKRv6FllVdghAXpihF0GR4vMLzn0uSraikC/rbKnuPYJ r5jAHQTZ/EnQknxboJLonWglrqlTh/g3klmXPo/QOGAIz7Y+dk/tISVVbNUAH0KGBpWV iMvXTPXW1c5IcYFETm0fA3JpvbH0vxcicS9CSZaB0aJURFnqEiafMc/4UIKR52neb+v1 jsdVFgZfr8uv99djkzUxiOK5WoctFNNHVaS4Tg8kYlazUr4IiRJIDuZBvlqHaK84Eliy 55YciVi6/r2iVCksW9DMsaQcCYFxhF5JBgazUoPzAmJmd2Lpp502Qpuzg5pLIwvoSxbh FvlA== 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=f1OhGlJz2j6YTYfzWFHdwbgV7PiLTTKaD5d9gsHnl1E=; b=IQAIFezeOhman+BAqenTZJsOj6tgIbkPOpunHInkQPf9bR4p78Ab+VSUDF9sUVUjWX 8Ivw7tlq8dUvjlCjXG7rIvHZD75nlL7jTjlJexj6wpqDCZo50cT4zLjjuwIOgne7J5f/ tMYcuDZ4PwtZnDcPZu7PQFZsc91ZvRBwmSouiImKTdmA93S7ZGSnrPOvULt8XRS/JAbJ 5U0tOatsLaSxrjLGt/57u1L7tUHlbZOiO+kWUlFBErsdP+LJQoMRbXL7EP3T4MbaJ+mW 2WV0Q8YdKV54GK0tkJSQn0sqdGVgzCK0spOII1fmkySkOyVxv2Z2doQ4v0BQWwLHnxNr JDQQ== X-Gm-Message-State: AOAM531MfwJi/OCKyh6+9wvffX2ifrSw43PHWFwRA0kqjeRXuLFadGft MGBIb0FAaigJ2yAVtDW1UBVYYmTXjkXdmVyUit4= X-Google-Smtp-Source: ABdhPJyY+VKalzfc/sF2/xknKh2RDncIBUn9TMdHzcFeNKNt27z04V3g7uqrolj9U24rxex3L59xU3HgbnW/g+ZIOnQ= X-Received: by 2002:a17:906:3088:: with SMTP id 8mr185785ejv.499.1615417292149; Wed, 10 Mar 2021 15:01:32 -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 15:01:20 -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-Stat-Signature: obcpfca4co1fm1ssp6fn89ee56me1snc X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: DF76E4080F55 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf10; identity=mailfrom; envelope-from=""; helo=mail-ej1-f54.google.com; client-ip=209.85.218.54 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615417289-456426 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 2:41 PM Shakeel Butt wrote: > > On Wed, Mar 10, 2021 at 1:41 PM Yang Shi wrote: > > > > 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. > > I am trying to measure the impact of this patch independently. One > point I can think of is the global reclaim. The first 12 patches do > not aim to improve the global reclaim but this patch will. I am just > wondering what would be negative if any of this patch. Feel free to do so. More tests from more workloads are definitely appreciated. That could give us more confidence about this patch or catch regression sooner.