From patchwork Wed Mar 30 23:47:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 12796516 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 3B15BC433EF for ; Wed, 30 Mar 2022 23:47:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF0168D0002; Wed, 30 Mar 2022 19:47:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A9F5D6B0073; Wed, 30 Mar 2022 19:47:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93F458D0002; Wed, 30 Mar 2022 19:47:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id 858996B0072 for ; Wed, 30 Mar 2022 19:47:44 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 36221182C784C for ; Wed, 30 Mar 2022 23:47:44 +0000 (UTC) X-FDA: 79302692448.28.747FC00 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by imf12.hostedemail.com (Postfix) with ESMTP id 346954000E for ; Wed, 30 Mar 2022 23:47:43 +0000 (UTC) Received: by mail-ed1-f47.google.com with SMTP id z92so26244705ede.13 for ; Wed, 30 Mar 2022 16:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=9LsSC7UA/+paobOapmA1UTtO12gXoTTx/WztGKAK+nc=; b=fe8eEAxqUkCZXNGaq3RHJrZtPAa7wyQzIypVPUh9xnoN6xe8QrIvlcinUSoQ6IUwhD MsAIu87gT2JCNO2a5tAm6RP/syCmhSmtdFYMrW5HEfNhzGlRxUChrw8BMQWKR289xWnS WjapK7MM2ND4tNqj5/C9UmPFZ+uMsaguZKFcYNppJSJZCtDU+3EnT96GQnXANK0oY0hd 8Z2Wo2LpiGv/0Y4JEKbKMSQdv5CyDm2YYqX6xqZfwtesHHXVylMZBzm6t32Z+B9mp4D8 OA3Qu4yzBCYSpwB24NguEODDVRhh6T5/BFUncycCXkxxqhcmTKHb7PeJ+gZ2nDyTUfxH gAew== 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=9LsSC7UA/+paobOapmA1UTtO12gXoTTx/WztGKAK+nc=; b=79dfBxTMoj7Mp7Qp0/0Mfo75mWvGaor+LCHMWBIlFnTu2EaLTfnwN65sV1Cny3P9sC alXGiCCZn4Lw8l6wD+X98Lc9ySLknXBYC9P6OH8xdqafO1toaP7otTQrnx4LWV0xEZ9u NswbpCqcMPN7oggEQgOKX0JZH/sEb6MWCub0BN7a+EPy4FxBMnbN4GXzRSvCxiF0ANn/ X43lacn1SPHmNzHb8m3yYCbhHiPovz4djYvWRV1QiLU9I7RbAm8jPjjnh+KLwHpnpdZ2 FO+bm4T55dRpDfpJhCUwtoSVeomriusUTg6JeieIi3R/1iavp8UtzISxXNAoaiQ1NK5d k6/Q== X-Gm-Message-State: AOAM532qKLL2vqVcGC2XQEE8S5id/2EKCbnkffi34YZEyfIIrr6aPHQv T4E/+g4PWzlFmpp2ipD18Ro= X-Google-Smtp-Source: ABdhPJzYepoaEpY+Ia1Q3I1JFH/RZTdrqcEo0FxbNDNSw2eXDEbi/BjnIfcPQxEQhVmeV2yIqKUobw== X-Received: by 2002:a05:6402:1e8b:b0:3da:58e6:9a09 with SMTP id f11-20020a0564021e8b00b003da58e69a09mr13737843edf.155.1648684061888; Wed, 30 Mar 2022 16:47:41 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id c11-20020a056402120b00b004196059efd1sm10400924edw.75.2022.03.30.16.47.41 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Mar 2022 16:47:41 -0700 (PDT) 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 v2 0/3] mm/memcg: some cleanup for mem_cgroup_iter() Date: Wed, 30 Mar 2022 23:47:16 +0000 Message-Id: <20220330234719.18340-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 346954000E X-Stat-Signature: upbnn9kfnuwxmyhp8ejmjidzou5rxg8d X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=fe8eEAxq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf12.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com X-HE-Tag: 1648684063-793484 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000139, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: No functional change, try to make it more readable. v2: some adjustment as suggested by Johannes Wei Yang (3): mm/memcg: set memcg after css verified and got reference mm/memcg: set pos explicitly for reclaim and !reclaim mm/memcg: move generation assignment and comparison together mm/memcontrol.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)