Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp128260ybb; Tue, 31 Mar 2020 18:57:06 -0700 (PDT) X-Google-Smtp-Source: APiQypJ9RYLNkzrOWUcAZawlEXnGO/lHHLaaGgmm1BHaGrNvYTfKdPXT1EHSnHnEyorrhKeX1u1K X-Received: by 2002:aca:d8d4:: with SMTP id p203mr1293038oig.39.1585706226345; Tue, 31 Mar 2020 18:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585706226; cv=none; d=google.com; s=arc-20160816; b=EpQ59sCK2ZIPj/u+VqA5k092lbncCyQQW62rAso62M/x0Bbtdj07D3D8qK6ubccFIy SKi2f2ezzg0g6Sdryk+DRFMceZBX/Kb8ZqYDVUQftn4AtF2682SJLo9l5i6/HaRRPocg qnyqxsHTjxwvpxP4YVldqrcDwNqgSg7eGjrgzJyPa5SFyHmODtJe/8UiBxFvjslaB6G+ 1mL9lL0pC10QPZeKWq4Sqde8YOzCDelYC603wIa8ZEV5YMtOiQ1CL2JRXZwbvYgSug55 rQC2B0Lauws2SiNVqaPpHXpxqWxRqoBTXA2ZvJAoYGudnUlIBMv+Of3XKJdBODqm9qoC 6svw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kpTcpzESNPrH0LZvld1mYi37cP1xR490vGjF7yZ6KoM=; b=k4sNEdn3UqU0TB4iubVrBHxNKPQzFeeF/Qk8+rPmbroqtgvj6nCAcy+Oj4cSdPKXRT jS3qHlcu6Y1pfAxeMsLCBt0WT7ACIvlrbAfJrASZ59AOdbBaFtg3nW6i+xi4Art37TpK VbyE0fO8mlSF9+KybZh7huaY9XzO4q3ky7orjX/2a5fH7XKDQuSKiVyJD1qwrGNFzD2w wVV053NJrhxzci49UW2/ibbSxwJN+PausHQ9S0NaD6sbxqg3r1uS5pjfStKxOjHLqAll iuh5aKw683etxBR3RTOhWVUgMwiFrGV54eVL8gpgw9QtEz9iq0c0L7ApZ9SUjoSJkPal JL2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MjoHPFos; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si186039otg.211.2020.03.31.18.56.53; Tue, 31 Mar 2020 18:57:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MjoHPFos; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731735AbgDABjc (ORCPT + 99 others); Tue, 31 Mar 2020 21:39:32 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:37901 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731588AbgDABjc (ORCPT ); Tue, 31 Mar 2020 21:39:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585705171; 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=kpTcpzESNPrH0LZvld1mYi37cP1xR490vGjF7yZ6KoM=; b=MjoHPFoseizw/GoQ/LAah+JTMGN12chJCrA/kYcGgGUmeHTyqO077Cup4AbjYa6ai3QttL GVf179AnBPVC8Ha7CUEBkbtYWf6WAlfKumlsg+oZaxx1aw4MUt/KO5PghxfW0T3waDJ2tu hREl4ZjtltYJxSz0eyHj1gJPpeM+XjI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-390-nTC3C9ADPyeq-Q5O8m01bA-1; Tue, 31 Mar 2020 21:39:27 -0400 X-MC-Unique: nTC3C9ADPyeq-Q5O8m01bA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2303118C8C00; Wed, 1 Apr 2020 01:39:26 +0000 (UTC) Received: from localhost (ovpn-12-73.pek2.redhat.com [10.72.12.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63D4460BE1; Wed, 1 Apr 2020 01:39:25 +0000 (UTC) Date: Wed, 1 Apr 2020 09:39:22 +0800 From: Baoquan He To: Wei Yang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/vmscan.c: use update_lru_size() in update_lru_sizes() Message-ID: <20200401013922.GB2129@MiWiFi-R3L-srv> References: <20200331221550.1011-1-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331221550.1011-1-richard.weiyang@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/31/20 at 10:15pm, Wei Yang wrote: > We already defined the helper update_lru_size(). > > Let's use this to reduce code duplication. > > Signed-off-by: Wei Yang > --- > mm/vmscan.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index f92858e5c2e3..a4fdf3dc8887 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1603,10 +1603,7 @@ static __always_inline void update_lru_sizes(struct lruvec *lruvec, > if (!nr_zone_taken[zid]) > continue; > > - __update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]); > -#ifdef CONFIG_MEMCG > - mem_cgroup_update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]); > -#endif > + update_lru_size(lruvec, lru, zid, -nr_zone_taken[zid]); A nice clean up. Reviewed-by: Baoquan He > } > > } > -- > 2.23.0 > >