From patchwork Tue Mar 8 01:20:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 12772860 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C03DEC433EF for ; Tue, 8 Mar 2022 01:21:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0966E8D0002; Mon, 7 Mar 2022 20:21:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 045788D0001; Mon, 7 Mar 2022 20:21:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E76888D0002; Mon, 7 Mar 2022 20:21:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id D8D0C8D0001 for ; Mon, 7 Mar 2022 20:21:58 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 9677E182FA95E for ; Tue, 8 Mar 2022 01:21:58 +0000 (UTC) X-FDA: 79219467516.26.380B339 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by imf13.hostedemail.com (Postfix) with ESMTP id 2C0E720004 for ; Tue, 8 Mar 2022 01:21:58 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id y12so8870817edt.9 for ; Mon, 07 Mar 2022 17:21:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=fCsAW2UJBB6c8M7QlLxk/JpB7LFkDqCihtv/AG+0X8o=; b=YNtiEQf2jKNmJlXMfNeoZdWXaEcpCVilMpTG4BBRfrU5l33H8y5awom0neQTkabjSX pBacWDo4xIUCPIHGBfw8yvFDySfav4+5cR+67pRdAYrfHCJG8s8qLWatTR7Ll2Fwh0qF kCRrRu4GRUB9MJiL+tBGkICngiZEf4MCXvacOYMjF/BHDYrwDZf87XL9JqdclDLzultF ynwtsCaghvo7fjOVtIBZ6zPFNE5BcX7AAyrIQinfAEbOknUsm9ZTEhEMWSXCrm+DAE0u YOYYaKv7BMSg0g228arxqpgpLUAwOBwl416q0s5wF5SmYlImMDxL4488GLTUc22hVd0N gTSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=fCsAW2UJBB6c8M7QlLxk/JpB7LFkDqCihtv/AG+0X8o=; b=POTGGEdls+sGI8EHvBT0UjKF7rBJq+NnDMn9Zhl8hI+osY0NUZBjt2xFeQi0XmqCI4 ASLBBBvDKumN4Cir/4ZpHLpM7qUg3nD9eaUtyKmRZqKcvtuuMk2/4AiCuF73PnyphgME Vcr7qARjPnFLvmS2K/1hgP76ae4NKsvyKd+rQZB14FPYWF/PuvRi6OUkDHvHArRJyin5 fObBr4pPOCms/LQmK2b4yLbdW709dO2zBlb7JW0z8hetW0u+knZ2HkOw4+GqcQsattJd Ba05Fgp+Ii61FGsqcUA1CRVXaS9E2DKHhQawgmufsr1lshPu5NgllD5L+t9mRucKBASi tDTA== X-Gm-Message-State: AOAM530Knwbt994giT7KtwORuRjzsirzhbS9q2osbIWKM/OY63F1sMq5 7oXg8eJTyg/AYBrwxhShyKc= X-Google-Smtp-Source: ABdhPJwvisVa5usty4EopQX72ds7IuCAZBihISiLjMF6OJYOeTMKXL6KFhEI4CDbg7FKRvicNQ4X7w== X-Received: by 2002:a05:6402:f1f:b0:415:d1a3:eb4e with SMTP id i31-20020a0564020f1f00b00415d1a3eb4emr13721074eda.311.1646702516733; Mon, 07 Mar 2022 17:21:56 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id q15-20020a1709060e4f00b006cdf4535cf2sm5285490eji.67.2022.03.07.17.21.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Mar 2022 17:21:56 -0800 (PST) From: Wei Yang To: hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, Wei Yang Subject: [PATCH 1/3] mm/memcg: mz already removed from rb_tree in mem_cgroup_largest_soft_limit_node() Date: Tue, 8 Mar 2022 01:20:45 +0000 Message-Id: <20220308012047.26638-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 2C0E720004 X-Stat-Signature: cyh96yu7ckwieqyohrms4pahg6k9a63u Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YNtiEQf2; spf=pass (imf13.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.43 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1646702518-977050 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: When mz is not NULL, mem_cgroup_largest_soft_limit_node() has removed it from rb_tree. Not necessary to call __mem_cgroup_remove_exceeded() again. Signed-off-by: Wei Yang --- mm/memcontrol.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f898320b678a..d70bf5cf04eb 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3458,7 +3458,6 @@ unsigned long mem_cgroup_soft_limit_reclaim(pg_data_t *pgdat, int order, nr_reclaimed += reclaimed; *total_scanned += nr_scanned; spin_lock_irq(&mctz->lock); - __mem_cgroup_remove_exceeded(mz, mctz); /* * If we failed to reclaim anything from this memory cgroup