Received: by 10.213.65.68 with SMTP id h4csp762535imn; Fri, 6 Apr 2018 08:28:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/P7VmGVTHA13GP1qTfnWPgrm/r5DwGu5f/jSKEtrLOwlHXE68pi9M6dda/WrkjXhFFU0u4 X-Received: by 2002:a17:902:6a81:: with SMTP id n1-v6mr27534441plk.342.1523028538988; Fri, 06 Apr 2018 08:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523028538; cv=none; d=google.com; s=arc-20160816; b=kbTJa7qhJ08KjNd1egw3dGJr5zjn9nqlIlLI7YbmH1+kOSnl1h2mF0pi6URb4p4DuI LAjWWpk7NMTBMitCU4Prvq7uqu7Bbe3BBzrKNfp6f5vl0mxiT8I2u66ySQRikllZ//jg BjJOhGoBGZvSPa7J/zedtNV5vchoDLUHou6raX57v9BOGMchxpu57Vt3TcG+C5XFUNmb FAVuA6l471bTN56C7KmW65YvAa+HiF83JseA0r1wYnL/R94N6MqB+Y2BY18RB6xD2vBx kAcVgDeSPZaqjEHeJz0NkYIQcG4CryKH5kBWiEKo0NgkheNemI9x6LpYwh5iBLfm+ZiZ oIhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=BUQmLZtnp39vZapvX5p4BuXmFhyw2yoDzbypUPuwKIg=; b=Eivu2CDQ2giVtnQqmQFvKWsWBWQ3rJSqjWbQSfe69EkTa9xyON3CUysAsDYNpsMCgl zdbQ0TVXijG2H8A7T2yaKYOZksfDqUGDBu4/HTt4BGT6t7HhZjPQT4YGot8XUAN2pj8g p4iJy8sZO5UJ/ucz+5hx5GDrndDzUW4wI7kjAfetmbLCURHqaPEAEsuro5FbvwizhDFW bp8BUnyNeJx74FzqTqDxmIbfRyxbK3nwQoOhsheS6euYDmHbcjwhQSLd9MFYwUDwAH+Y zPoJkunb6GXFb5Ceo+faDB87+fz3EEizbp7RQVBYGepbwqERtjyxRtOXlH49LjMZ0ctT TRPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qhjj3t0V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si8596575plt.294.2018.04.06.08.28.21; Fri, 06 Apr 2018 08:28:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qhjj3t0V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1754061AbeDFPWU (ORCPT + 99 others); Fri, 6 Apr 2018 11:22:20 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:42525 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238AbeDFPWS (ORCPT ); Fri, 6 Apr 2018 11:22:18 -0400 Received: by mail-wr0-f193.google.com with SMTP id s18so2125352wrg.9 for ; Fri, 06 Apr 2018 08:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BUQmLZtnp39vZapvX5p4BuXmFhyw2yoDzbypUPuwKIg=; b=qhjj3t0VFQdqSq3em4MCgu1c53T1UYLHy+ROij17mOhHTohTUNbvDQ1Y4y0CVRsRhK ocNk3YhxrJsmTppHP9irTxMMU2eIMBcKEb4jhXV1di9tYPPuFzRi4NrJRu8XqDZEY3qw Deaq57d26swc/CvqJH0O2U0GnoZXG5Cv82d44MvfbMrX72F1rJR0q37LpVcrizOvOmhL aO4zFs501ry3IKdKCYH3oF5M/qQHIHOwxX24qbXO0ZawWNL1Bo3dV9Dky3PDl5pQBxJh ahJ8uWmZSg3AboPHZACWYQ3iOSCxyF4+z67J4ZBGrosFDJZV2lrpLZNwkzrmHXS9qAKs ayQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BUQmLZtnp39vZapvX5p4BuXmFhyw2yoDzbypUPuwKIg=; b=RCqb9Mg1jbHYyUfTilXoYmyNUIeDtfWmf2/AlwA/qHEZ6E15BXI8X43ldyy++qdWhO MCo1VHXTP/rGhuhH6pPWFsAOVp3uOofGzSNr2ikRo7Z5B7R9tpdgkUmq+/tn8+hwT6aK vO2MZl4hWsd2QMyRLQgfLXgjBPSLgZ4RFLGg1g2bEuZEGv0hrAdzjICUBtF8FzFED7sx yJO3jriqy3X0/kVEsIWdBeHmZUHoAk+veLGc17vt+59+5Qnd9hIrF9Wkyw0PadTS43f6 Jl9IzmdyFJiV0l8pxpkKommtcjaZdMtiVTsXkbPYLTnfI2xWFDI4d/aLMbLRlwlvTeBM KH/g== X-Gm-Message-State: AElRT7EAccQP+35soLX9STTKeP7VcDGStxkxYAEz/NzUMrK7c8Q5Nw1I /Iam2Jkb9DW0WvY6qElEQNVqdEMlK0VN6rMb0ZKNnQ== X-Received: by 10.223.130.50 with SMTP id 47mr17899631wrb.99.1523028136611; Fri, 06 Apr 2018 08:22:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.156.139 with HTTP; Fri, 6 Apr 2018 08:22:15 -0700 (PDT) In-Reply-To: <406e02a5-16d4-7cd3-de01-24bee60eab02@virtuozzo.com> References: <20180406135215.10057-1-aryabinin@virtuozzo.com> <406e02a5-16d4-7cd3-de01-24bee60eab02@virtuozzo.com> From: Shakeel Butt Date: Fri, 6 Apr 2018 08:22:15 -0700 Message-ID: Subject: Re: [PATCH] mm-vmscan-dont-mess-with-pgdat-flags-in-memcg-reclaim-v2-fix To: Andrey Ryabinin Cc: Andrew Morton , Mel Gorman , Tejun Heo , Johannes Weiner , Michal Hocko , Linux MM , LKML , Cgroups Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 6, 2018 at 8:09 AM, Andrey Ryabinin wrote: > > > On 04/06/2018 05:37 PM, Shakeel Butt wrote: > >>> >>> @@ -2482,7 +2494,7 @@ static inline bool should_continue_reclaim(struct pglist_data *pgdat, >>> static bool pgdat_memcg_congested(pg_data_t *pgdat, struct mem_cgroup *memcg) >>> { >>> return test_bit(PGDAT_CONGESTED, &pgdat->flags) || >>> - (memcg && test_memcg_bit(PGDAT_CONGESTED, memcg)); >>> + (memcg && memcg_congested(pgdat, memcg)); >> >> I am wondering if we should check all ancestors for congestion as >> well. Maybe a parallel memcg reclaimer might have set some ancestor of >> this memcg to congested. >> > > Why? If ancestor is congested but its child (the one we currently reclaim) is not, > it could mean only 2 things: > - Either child use mostly anon and inactive file lru is small (file_lru >> priority == 0) > so it's not congested. > - Or the child was congested recently (at the time when ancestor scanned this group), > but not anymore. So the information from ancestor is simply outdated. > Oh yeah, you explained in the other email as well. Thanks. I think Andrew will squash this patch with the previous one. Andrew, please add following in the squashed patch. Reviewed-by: Shakeel Butt