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=-8.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 671DAC433DB for ; Thu, 4 Feb 2021 17:44:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B1B9960203 for ; Thu, 4 Feb 2021 17:44:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1B9960203 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 094236B0005; Thu, 4 Feb 2021 12:44:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 027BB6B0006; Thu, 4 Feb 2021 12:43:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E276C6B006E; Thu, 4 Feb 2021 12:43:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id C8FB16B0005 for ; Thu, 4 Feb 2021 12:43:59 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 89C213635 for ; Thu, 4 Feb 2021 17:43:59 +0000 (UTC) X-FDA: 77781308598.06.crate91_05144d9275de Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin06.hostedemail.com (Postfix) with ESMTP id 5B39F10042606 for ; Thu, 4 Feb 2021 17:43:59 +0000 (UTC) X-HE-Tag: crate91_05144d9275de X-Filterd-Recvd-Size: 3568 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 4 Feb 2021 17:43:58 +0000 (UTC) Received: by mail-qk1-f169.google.com with SMTP id d85so4140062qkg.5 for ; Thu, 04 Feb 2021 09:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GCBGFufjjtkKM79QaCqD4gnNbGr/Jp0wwB8/7DPDEJI=; b=kNmXSlAAZOA5BA1Nd/FHNTmnZuUl+kBcrKvgz0V3T9PaqZLDkAdiv+vpuvjGJWzgIQ 1JbP6ozldUU5i9up9n52QDgGGYGoDr2vLQPsW3ypPSvSxzf47qEyMaHhjlht+j+pN+Am 0SC3HBoEE2tK35rFDjrbYwH6woQAqVY+EP9KnLUo6SV1bNagCuG4CyFcPPx5AvuoKcPK hlMTyTVcLovypO7oBoPsJ00SQg0EViX0k+ScJ67WU8/8sMm7MpxTfTpmb9HHxGuwY84a 31WQ5Pt3MX0MummZwo7oyY4RA7sqHnFFYctmMseNA4rmTHJTHv75zulDM5FQKOCrxpog rfpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GCBGFufjjtkKM79QaCqD4gnNbGr/Jp0wwB8/7DPDEJI=; b=npDxTYe0lo3coALCUYME/csIYw1O9UrkHpGPLdzvKlp9MsBC0Vb9IrcPNCYtXEOUZ9 gV4qUQ11CtM8OQTX4rGwG0RBkIqeJusVyzmZj8rpfeb4Pi/CZ4U3cuOqhFh+isu3fGQM SkdtySQ5uiwEtbFY+TK7v0wnPhw8glqRYyjZIJTi/NsmAKftcTuSPNbxQvEt0xHWQ/kD Op07u48kTWpJlROyRIl2XcnuCEELy1ZGPHz77O1YYq1L1mY8CcBpTQthRrlwRB7GVn2X 6wwo7I3bN6VlJfn/bvdhH98jj40VkaRhL9tjjUOZufTZn4EkjNgz1gQ1Z4aX6zmrExmC nRcw== X-Gm-Message-State: AOAM531VJmzqvj/dczxCPPNTsjtNlOJkUWGjlab/zQFtvB4uZGhxRNnJ jWApeDPtG40CwgknPEVabcKfaw== X-Google-Smtp-Source: ABdhPJwSWSWJ3qN496EhBpkdEWHOjRYgA4xdU1ivxrfW3e7LvIBSZqrcATMr2s9xqu/1g+yI8+bOMA== X-Received: by 2002:a37:345:: with SMTP id 66mr248338qkd.358.1612460638075; Thu, 04 Feb 2021 09:43:58 -0800 (PST) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id d16sm5443086qka.44.2021.02.04.09.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 09:43:57 -0800 (PST) Date: Thu, 4 Feb 2021 12:43:56 -0500 From: Johannes Weiner To: Muchun Song Cc: mhocko@kernel.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm: memcontrol: replace the loop with a list_for_each_entry() Message-ID: References: <20210204163055.56080-1-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210204163055.56080-1-songmuchun@bytedance.com> 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 Fri, Feb 05, 2021 at 12:30:55AM +0800, Muchun Song wrote: > The rule of list walk has gone since: > > commit a9d5adeeb4b2 ("mm/memcontrol: allow to uncharge page without using page->lru field") > > So remove the strange comment and replace the loop with a > list_for_each_entry(). > > There is only one caller of the uncharge_list(). So just fold it into > mem_cgroup_uncharge_list() and remove it. > > Signed-off-by: Muchun Song Acked-by: Johannes Weiner Thank you, Muchun!