Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3892785pxf; Mon, 15 Mar 2021 23:48:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8stsNrr1s9iN2zZz+GAUigYo4ubtxW1xmktZcQDivHwmI3bkuOs4fLKpYh6LZduSD7gSl X-Received: by 2002:aa7:db53:: with SMTP id n19mr35157277edt.330.1615877292784; Mon, 15 Mar 2021 23:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615877292; cv=none; d=google.com; s=arc-20160816; b=wQ9GtoFGvE99++LAES/JOhD+ntQoW/a/xHpWCn6KKn+yyaa1Q46MUESGIDM5pwp77x lLp7jEa7fcmiZKEB5fEEoYFKANWB1lEqGbmbCdNwSSjnyW04awuoaek9JFP9K8eWghbw rDDZdY0p0JUDwrluMbuAyGtR1fz41JTuPQLUwd8ClbRDrU9H55Su2ytTayoBs1BwDy7/ eq/XtMpeAk8YQMfTsXqL+wHxITuMWXrIId7OQ2V4wj8HkvC+ESG08mMetTSIEi4BW/7I NTQFrMXQ49k8eB4Y8FkI8atNx3VCtNjO4KQAjNHm/MeAza1pumRRMKrybNheHxNKo9+u 85iQ== 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=GiWLaJ6JfRY7D2fjAEheSS/CI6En0Tfjr7NfpaLRaUg=; b=au/l7ql138OXyPL6TJUJXZh09AbA9uNpaOdKY5XAuLov1eAS3ZCwTpOjXxSF4nzvlX SF9iDBx1BA1mUFWepxjrr4EbWemXIv9INSNgODIDXpaFhgak0C8CvaUZh8RSI5s6PFso lqCvOzCtMCUVOdOeR1N7MJBXLOMQ+91JUIYIp65HWGKp5N0LH6NWsNusN7W8056VVJSX Og06HH8x5FUA4sR2PoFAXzfcIDJ5cZzS7zTLVXu1A+b69V4Fk0VUbQKdYspbnmWJ6MR1 6iMA1+bf0BiNdvoCjiuv+fyBC4z5Ce1jVhFmqESYjNeX5OwkYqaDH+/M6fJP50009VM5 w3UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=el1U4yM7; 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 p13si13087054edt.516.2021.03.15.23.47.49; Mon, 15 Mar 2021 23:48:12 -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=@google.com header.s=20161025 header.b=el1U4yM7; 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 S232941AbhCOX7f (ORCPT + 99 others); Mon, 15 Mar 2021 19:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232311AbhCOX7D (ORCPT ); Mon, 15 Mar 2021 19:59:03 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20468C061756 for ; Mon, 15 Mar 2021 16:59:03 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id 184so18371974ljf.9 for ; Mon, 15 Mar 2021 16:59:03 -0700 (PDT) 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=GiWLaJ6JfRY7D2fjAEheSS/CI6En0Tfjr7NfpaLRaUg=; b=el1U4yM7KpXL5g8A1suug3kzC4jqMxihYzAe6idzQvWFnWS91NbuSI/u+c6mo6cRnV SPei+MME4J69H5g9v4345POnj6DndSypgXQdfUHFQYb7eJNzCDNSvw/2JxkV/MfzWtOC kf4IBHDbVcqItf9trvNPu1tywIQIXWuoKwXmyEvHMidR1r5dkG0r+DYt+noifqymr/al NOpBuSOhXUfkxXzujUrmtj6SfPf704YxzLSaRzU5iJInw3d/wh8k5iOLjeOO/M+5KmEi LJh2OEaMvZRv9JdvA6or3g3XBQ1bnr8Uu6YnH5VpChJ/5QuJgx7O/g/j1G2ONUuw4djx N5OQ== 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=GiWLaJ6JfRY7D2fjAEheSS/CI6En0Tfjr7NfpaLRaUg=; b=WKFqhgzeRsMRZK3NZZgnxpzCl9i85Y6cjLwU3Ru5sEMs1S86wZmApFcJ6F9rPyjmkd mlth+x52xEGzQ9eNYvaMzFUTcQ+RmCVkM1XJQCmq+0adL6W9r7PgBMMBekIAYJzG4PRo QoOWEzQkddlhEL2cTIvYMfhV0DSKVYz/U33RI+MfyezPkpUp7wINeHgckYN27k3A/XYE lRsnQffJJEYyEszecxxlGS2bzzaLuYFyrzjnulQIMZd5p+qMK0v2Ey0f74dJOjvcv2Eb Ukme/GQorDfBGErZelzhH2fVQSfJGTWH7aKX2RgJAixWrY5fF1wltTqQ7X3PHAaF1Yve rM/Q== X-Gm-Message-State: AOAM5329rNJj2HqT6970fY3/9AoMXVYYKM/xzkU5ONTF11WltDJ1BvqD yZlk8MImQVzWXzsbkb6lnnswQHmDX8b5yUqSNktsOg== X-Received: by 2002:a2e:7d03:: with SMTP id y3mr922776ljc.0.1615852741307; Mon, 15 Mar 2021 16:59:01 -0700 (PDT) MIME-Version: 1.0 References: <20210315234100.64307-1-hannes@cmpxchg.org> In-Reply-To: <20210315234100.64307-1-hannes@cmpxchg.org> From: Shakeel Butt Date: Mon, 15 Mar 2021 16:58:49 -0700 Message-ID: Subject: Re: [PATCH] mm: memcontrol: switch to rstat fix To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , Roman Gushchin , Tejun Heo , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Cgroups , Linux MM , LKML , Kernel Team Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 15, 2021 at 4:41 PM Johannes Weiner wrote: > > Fix a sleep in atomic section problem: wb_writeback() takes a spinlock > and calls wb_over_bg_thresh() -> mem_cgroup_wb_stats, but the regular > rstat flushing function called from in there does lockbreaking and may > sleep. Switch to the atomic variant, cgroup_rstat_irqsafe(). > > To be consistent with other memcg flush calls, but without adding > another memcg wrapper, inline and drop memcg_flush_vmstats() instead. > > Signed-off-by: Johannes Weiner Reviewed-by: Shakeel Butt