Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2463837pxb; Fri, 5 Feb 2021 20:13:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcQDA7BYLzY/qRnWX5jV2fUEW6MAyGdJ0z157Pu8Ac7PNGaivx7xAgvAgfA6FKn9SufuoX X-Received: by 2002:a17:906:364b:: with SMTP id r11mr7162367ejb.447.1612584804174; Fri, 05 Feb 2021 20:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612584804; cv=none; d=google.com; s=arc-20160816; b=KtOz3SRZc9oxHpmjX5l3zuz2w8eg4lo60iO5jb/BTcUvhv+t2nK88ln6IXOw0M7gjQ AZr5Oq2Qv+cKvjh6Qti09+r/i6mbH8xwL/NrYWrJIMdYjsvbFLERcC3S5TLJd9OFoz/8 Orel4LGmDAIMWoqZ44x9a0fwos2yz7rDiNx3DrqgMT63U25i8kqfp4Y5TsA5gRxal2f2 npo12VCHgmt36VYyUZqgXQbqgzvdTC4a+d9au7GtXQLG7lZTp19EqYHZAGOXJjOS9YTs qq7ReBTk398rV+Tpp6SraWiPtrMbHaGvmrvRuBQ3vJmizNFCZf/9puYGB7txwEOm0lyo HkZw== 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=Fb95oN2pGx3nj+Eb9wyweMoS+j1I5Uh71GzG+Sz5oEM=; b=VLXVXQSeu2p2ZDBdHMD28T0lRyPRmdHiccpDITMyFZ2i+H2xcvnRE0t7M713qbj/Uf 15I77SmRCguFxf4mtWTbHeKVnLVDYWkhccmSoFKH/dB75hhc9LyxiOmgQpyd3FU25x7O kwXxM8dEz2aeFrtGv/KmGMFqgV1Ms/kNnylhNdDdHFNRGDDIWAOWb1qUvjyfUJqmUqBC 1MIJegJkY1oD7jjlr7q0/6i+amjWUwT+icz36oKuIcuXQRxqoGRhgzhnR+7M7VR7VTzM 870WibeFjGxWnAslSd+7ne4sucBQQxxc6xHybgSQwIg4B2Ed7l8IjsKZdOIV7GdXBvlA FG/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rmxoZUiS; 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 s8si6332773edd.534.2021.02.05.20.13.00; Fri, 05 Feb 2021 20:13:24 -0800 (PST) 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=rmxoZUiS; 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 S230051AbhBFEKg (ORCPT + 99 others); Fri, 5 Feb 2021 23:10:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232231AbhBFCzl (ORCPT ); Fri, 5 Feb 2021 21:55:41 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1854C03326D for ; Fri, 5 Feb 2021 17:00:20 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id m22so12725547lfg.5 for ; Fri, 05 Feb 2021 17:00:20 -0800 (PST) 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=Fb95oN2pGx3nj+Eb9wyweMoS+j1I5Uh71GzG+Sz5oEM=; b=rmxoZUiSYkE8WfcgoGpH7IesJ19msP/HBOrSblBil1jDywKKNf0JAOM/ZXWZUbHylE ZC3ZwMo8GNEAQB5DwMZpU2qre6bGCokTjqEtWwoGcnoQbvNYKFvMNBxN7n5bth2tqddl jmseJ5ITj1AUUqey4rvVJJY1pFpw/ZMB+uIMqEwX1S0n2zl3xv9Z4/ve3yPhU7VwNabe 6zD1LGmW7sV8jwByfF3vS8tVg14Cx2jqVW9wQCcQWsHcvraZsvbtriBpxYOr89geqVgw S5rAqh/fXXn7MLD7GG1OqbukEsSXVqs+Y9uQyfp2tZiDJ0cl9RhZ5jngWRQErTthIzRj q/UA== 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=Fb95oN2pGx3nj+Eb9wyweMoS+j1I5Uh71GzG+Sz5oEM=; b=CBKJ7LxI7HMdaxOMflzpIbIRRaYcDsRAtGKWHJXwNQ/22lBMR9D/LRO2DykRVXwvgo s6Lt7awRJW/glNfZVFuFXTIQnonf3LUMnpV6kJBgWzS52FNU+IQFM1lgtpVPbQhsMhRE 12euWJgpH/AemygUyHGoVmOPxTSxhVk14HzTBBGFgPkHrdgNdd5OieIeLTvfdA6MclgY jfykHzFmwZclBlYVhnAUTtymfBh7bFV2PLOR17D/UJE41iQ2yEfmeCEbHOxJZii5mEOr nPy4beQB8/4AkJE5aeZknxnO2QAnFeuwlhlPf8hQf15Nyv8JyGRaai9HU5FE2G/MCP5w ZhMQ== X-Gm-Message-State: AOAM532iDMXWCOCs2Va76WNnBvY6d6C/hwHhDfCfjrRIOkHN57B/BkBa nFMKCQStZRMJMPwo2M2lIH3Xwkjh9nLBtgua4khHZQ== X-Received: by 2002:a2e:8541:: with SMTP id u1mr4306946ljj.0.1612573219209; Fri, 05 Feb 2021 17:00:19 -0800 (PST) MIME-Version: 1.0 References: <20210204163055.56080-1-songmuchun@bytedance.com> In-Reply-To: <20210204163055.56080-1-songmuchun@bytedance.com> From: Shakeel Butt Date: Fri, 5 Feb 2021 17:00:07 -0800 Message-ID: Subject: Re: [PATCH v2] mm: memcontrol: replace the loop with a list_for_each_entry() To: Muchun Song Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , Cgroups , Linux MM , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 4, 2021 at 8:39 AM 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 Reviewed-by: Shakeel Butt