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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE192C433FE for ; Mon, 28 Mar 2022 18:37:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245246AbiC1Sir (ORCPT ); Mon, 28 Mar 2022 14:38:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241852AbiC1Siq (ORCPT ); Mon, 28 Mar 2022 14:38:46 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39F091CB38; Mon, 28 Mar 2022 11:37:03 -0700 (PDT) Date: Mon, 28 Mar 2022 11:36:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1648492622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=h9MsA+GclozGfTkyz42oHeJp6VqOMhntLWNp3G32vsA=; b=UJbaFFfOQmizKMVOaoqPioI2HGGuGtUMezMSWJbhRnuH1/3nZZnfcB29o8OE+4UDzrn3Gl JsLwZZdLt4ZDZ49HMbnXHrHNVXh9xHJf/PH759+MEmoofsgzw16STYBz9FT8RUNZOkf7cK KGDBEBSa3xTF2jqt4u+RmzC64sP3uRw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Miaohe Lin Cc: hannes@cmpxchg.org, mhocko@kernel.org, shakeelb@google.com, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/memcg: remove unneeded nr_scanned Message-ID: References: <20220328114144.53389-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220328114144.53389-1-linmiaohe@huawei.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 28, 2022 at 07:41:44PM +0800, Miaohe Lin wrote: > The local variable nr_scanned is unneeded as mem_cgroup_soft_reclaim always > does *total_scanned += nr_scanned. So we can pass total_scanned directly to > the mem_cgroup_soft_reclaim to simplify the code and save some cpu cycles > of adding nr_scanned to total_scanned. > > Signed-off-by: Miaohe Lin Reviewed-by: Roman Gushchin Thanks!