Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1221316pxj; Fri, 4 Jun 2021 08:56:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw89EdaBuM1Q+jcMlhFJJwR0fMp29A8qKo26bqFbDci4VoFoOQjM1QtB+Vat9ukUNS6TsN3 X-Received: by 2002:a17:906:998c:: with SMTP id af12mr3566838ejc.510.1622822186133; Fri, 04 Jun 2021 08:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622822186; cv=none; d=google.com; s=arc-20160816; b=k9M6tK75ON5wiA6CeLAZMmf4FElg0TYJvir9yT9+jrdk1/PV3zH0r/YsIbwT4Z9+eg ez7FK2ENHgyCLNR2SwcelKpH2j+z0LXxagrSKkwp6P4i2o3R5bWWvfL4tYvlaYzpNsaD f0miqcjnvR0RAOvFUupjHHHSQ17q1Agis7uWi1v5dRxacFFQb4dzSL7J0tGsBw/r1lNX aMHOLoDFgVD2jvYScz+zAthcvztlPHckJT+gQUa9chzGBSeHT1Cv8QENb/wmbttwMFyj nR5di4BOtuCe9spz+Dk5pPGLbxMpaS2oiSLFtbr7OUg1amMW1myS+6Gxk77ZZ/LHd2HL QbMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=BFNJl7w5MoErGTGxa0e9M8jpquhBhJupY2y4JLWlRpA=; b=JctIi+B5h7Vu93JfrXj994pBu0m5pHhfKMzbjZeBr1qdPA3U0s/KS1kvlembFtMq8t 228cvOzZBqa+pDU5LdJqqa/pVL5LTdfOxXZHS65rDNAYiZXzv4flgQq+wVNnCMlyxJar Ym+hO3H7UdzeT3F+4vuCTn7BOqhSsZCshvLxdxyudH41w6nAeDy//I1NN6lwGydPLPET F6LBFrtGwtKHkhWjlTxNKPi7sD064omzd/LdiZBVoyuPALUtFhsSOuvJXbhnsOFN0Svq 9KpK+lEDV7HgmIcZUBDpVwZUZ4MhtCGjz4hDQu0Pw5MjZ96qewnQoUlzsO7rE1BMlbia 2YlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ndbmBpyR; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si3413985edc.561.2021.06.04.08.56.03; Fri, 04 Jun 2021 08:56:26 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=ndbmBpyR; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231211AbhFDPzu (ORCPT + 99 others); Fri, 4 Jun 2021 11:55:50 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]:33402 "EHLO mail-qt1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbhFDPzu (ORCPT ); Fri, 4 Jun 2021 11:55:50 -0400 Received: by mail-qt1-f176.google.com with SMTP id a15so7370813qta.0; Fri, 04 Jun 2021 08:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BFNJl7w5MoErGTGxa0e9M8jpquhBhJupY2y4JLWlRpA=; b=ndbmBpyRMTLo5CTZFU0wHBaAV8AcbKUUW3wG9R46rMAh3CrQ1hVUUPP25ttvbRpN5o tzg1EVk7iJYeWLL9TkNIKhnL68/IuJUA8JefbrY+j5Yr+gY+PkxpC73fwdZxDTl39brw 8VW6u1tyl9X8HLTnoUG9+DAxVN9btvcDVIFIvPX9yH9JaMAvif1QtFm7fgJOZUSJ/G7z jtDqjiWbOCcSGpQV6exeuZ7PKG5nlr5tdEj2NZJaDwDpmf2yLpkYSiEtIAHa2ia0nuTp 5seoXqQ4jqBpSjrtbSX1eEsbSnhajLDfiC3QmTj+A/RSwe+Shj4BWgpBNYpOsJmCXAWI PX/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=BFNJl7w5MoErGTGxa0e9M8jpquhBhJupY2y4JLWlRpA=; b=SRSlUGJ9oz9u8g+KhOec1jOFeKIAPtNzNY8NmRYmuHVwOcJOPZi6aXURxlohhWo3LH mWmYhaXVAY4+9t10wa3Ry8xFLMGcOH2cAXV0/K/FVG6vC2E28EzRaWgx5A2mzf1DdtYT NizJ3lTMxH1+VnnYwIZ52sTWgN5Hys0AhhJv4lIaopyfto1Fz5ChelVz+9u/ZWUMV2qZ dGW5gD9HPgCdQT3Sf+fqV2xRdLkXVC80/XcGsyluXKx2kHMjdwj9YBLW/s2qWGcmc4xV 57ADfAiLQM1Etmnq4VuAZ3pSNAye2Oh86Jsn4hShNKKTuk5POHikZQGf/uEnTToziefx KBdg== X-Gm-Message-State: AOAM533WagopA/Er4Gjg97Li/NrdtDzWw4wzJQQA41iHx0lmdGdTDyyt cdgmkf+wk8foHSJr447zhziIOhs0iDSqTg== X-Received: by 2002:ac8:67d5:: with SMTP id r21mr5254832qtp.92.1622821983655; Fri, 04 Jun 2021 08:53:03 -0700 (PDT) Received: from localhost ([199.192.137.73]) by smtp.gmail.com with ESMTPSA id 17sm3687916qtw.44.2021.06.04.08.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 08:53:03 -0700 (PDT) Sender: Tejun Heo Date: Fri, 4 Jun 2021 11:53:02 -0400 From: Tejun Heo To: Roman Gushchin Cc: Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , Dennis Zhou , Dave Chinner , cgroups@vger.kernel.org Subject: Re: [PATCH v7 0/6] cgroup, blkcg: prevent dirty inodes to pin dying memory cgroups Message-ID: References: <20210604013159.3126180-1-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210604013159.3126180-1-guro@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 03, 2021 at 06:31:53PM -0700, Roman Gushchin wrote: > To solve the problem inodes should be eventually detached from the > corresponding writeback structure. It's inefficient to do it after > every writeback completion. Instead it can be done whenever the > original memory cgroup is offlined and writeback structure is getting > killed. Scanning over a (potentially long) list of inodes and detach > them from the writeback structure can take quite some time. To avoid > scanning all inodes, attached inodes are kept on a new list (b_attached). > To make it less noticeable to a user, the scanning and switching is performed > from a work context. Sorry for chiming in late but the series looks great to me and the only comment I have is the migration target on the last patch, which isn't a critical issue. Please feel free to add Acked-by: Tejun Heo Thanks. -- tejun