Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7577480rwb; Tue, 6 Dec 2022 07:26:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf4wl8HhxoueCg0S/NtRyhepmannwKKjHMjuC7KOpk+xpjnjAp0MDEkrMb3RNh9mBznJtM1n X-Received: by 2002:a62:1b87:0:b0:577:3126:7060 with SMTP id b129-20020a621b87000000b0057731267060mr5204234pfb.38.1670340377141; Tue, 06 Dec 2022 07:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670340377; cv=none; d=google.com; s=arc-20160816; b=SV87Vj569LzO+HI2ANqZA4HTS/u/dMLa1563yOKcbom3X1oX8gJrqRbllw+N/fvxDm TqwqivTBHxOmhS4tHSMx7ZOqJ//KQixBWbwV2lOSCv4adlJT8XBGvVuxHIEGdHfWnYJY iZKHbn1FyeL4ghWxvM72Aed0hMCDXJ1JM7pKJuv5d1FtiEllsWqIdyewewDeU6mealP6 /uHKMie2Z74cqb8ikuwDKaJUU/iujquCTpCiDe4+sH6k+dxzWRbrH9bAQDs1ciFC5ZdB fx/EzyISiM/TzTEQ2mzo3q+ZKwjauFIb2XprxSiYRaQr00Ue8NLojbNdHPlHC+QQHBcQ QnSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fTpI119qpAktFn4Vs6O2yNBbMwFml4YlPvJPmAmi3aQ=; b=UV+nYyBv0LEMDGOrG9SiEC5A5nGWDki6NqXMHuV35F3P9gjwiWU1LwlCWosWT+Llgj BuiE5V4p8cbY1DNbLhIseZGUBvo0IeNXsv9oyVgHzHvv3plcJ9WYrUTSm9W1P7vGgR0G f6trXC5aRNncXUyE0Yvv0rGhA819DKP0PAg21LgDoOnA+nzMCDzKaKIPcBLPdQXZ9lu/ NHeY7Yy7r8Oki0QjWNWlcexYMbngQhuPjfLhZhGKPn7twUIsYIYrk1SEEjiic0hznz5i +/U2s0Bs1RllQeCZGKdxnNs9Um4pL3Twc2zk6BnwQmZjiOpLa/juc9tIj6x5YM8Lhcpi WbFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=AYjmlDG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k4-20020a170902694400b00188f0ca258asi16472592plt.388.2022.12.06.07.26.05; Tue, 06 Dec 2022 07:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=AYjmlDG8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232037AbiLFPXG (ORCPT + 79 others); Tue, 6 Dec 2022 10:23:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234621AbiLFPW7 (ORCPT ); Tue, 6 Dec 2022 10:22:59 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C149F9FF8 for ; Tue, 6 Dec 2022 07:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fTpI119qpAktFn4Vs6O2yNBbMwFml4YlPvJPmAmi3aQ=; b=AYjmlDG8052I3kahPR+g0qZmH2 +coxrBOeRY39OnxIO04C4VQrhUTCUOcoP5az3beBkRgr0QbUq6JvhuC3pr2MVq6xmpFPQbG9v/pd5 kSWuL8I01GNZ6W/SV4YKZUJCji1Cm3/ansK5NUk3o1CypnSTjl7re57SGJFaoA3VhuVJOUEE2kG/x OT4LbZAHluuSuXdMVrQeBrj2ZGPLyNploV30fzfK0x9jjWcK4eskqurrCYn98Qp3NMZCZ9gUyNEro Gs/ksxo6SVig7m8m6gftWQ+DOSVfp/G2uK5GaJBxLTXkDaHnbeIN/sjGAxODiRdUGEOykBim1EzOQ PVS+LRTA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2ZmZ-004YCv-Ak; Tue, 06 Dec 2022 15:22:55 +0000 Date: Tue, 6 Dec 2022 15:22:55 +0000 From: Matthew Wilcox To: Nhat Pham Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, bfoster@redhat.com, kernel-team@meta.com Subject: Re: [PATCH v2 2/4] workingset: refactor LRU refault to expose refault recency check Message-ID: References: <20221205175140.1543229-1-nphamcs@gmail.com> <20221205175140.1543229-3-nphamcs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221205175140.1543229-3-nphamcs@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 05, 2022 at 09:51:38AM -0800, Nhat Pham wrote: > +static bool lru_gen_test_recent(void *shadow, bool file, int *memcgid, > + struct pglist_data **pgdat, unsigned long *token, bool *workingset) This line needs more than one tab indent. I tend to use two tabs, others try to line up the parameters with the opening '('. But one tab is too visually similar to the body of the function. > rcu_read_lock(); > > memcg = folio_memcg_rcu(folio); > + > + if (!lru_gen_test_recent(shadow, type, &memcg_id, &pgdat, &token, > + &workingset)) Similarly here. &workingset looks like it's part of the body of the if, not part of the function call. > + goto unlock; > + > if (memcg_id != mem_cgroup_id(memcg)) > goto unlock; >