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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51881C433EF for ; Tue, 5 Apr 2022 12:30:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8278A6B0071; Tue, 5 Apr 2022 08:30:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D7866B0073; Tue, 5 Apr 2022 08:30:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 69E976B0074; Tue, 5 Apr 2022 08:30:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 57A4E6B0071 for ; Tue, 5 Apr 2022 08:30:42 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 10F7861CE6 for ; Tue, 5 Apr 2022 12:30:32 +0000 (UTC) X-FDA: 79322758704.14.4F1AA09 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf18.hostedemail.com (Postfix) with ESMTP id 06C2D1C0028 for ; Tue, 5 Apr 2022 12:30:30 +0000 (UTC) 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=qYtKbLE3KcgVXwCDPyAH3AFw4/oPxvQ/AFdjrlkvn8o=; b=ngUClDZYV5DHRGshO38tzBRwwP kgkmQQmafKdXh6vcniBVWR9BkF3aRz5tMgDZ4y1kXMoiNuR2SJeLygm/oadP+Vb5f9WZ1Vx9irq01 nODjvyj5N7QWkGvw/xwu43DiZhxD9lwYIwv1pBGYt1DM62/4WLoo9kVdCftpUj0aquChTaLdfvK+h f1+5SdXf/+9UyAk2eOQHdvObJYCHc9dpy9q8Iot/lVbAsznF6sPvZuzv+dz1CRVjevPdFDpCqrgTv pZoDroN9WXADyaQXDRw2Udzs3y2VrR7ARlr2BAKm1FFXnIJmrfXutozq3OpZAHqXzqCABNsu29HzT TORphvAA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbiKI-006hJ0-K4; Tue, 05 Apr 2022 12:30:26 +0000 Date: Tue, 5 Apr 2022 13:30:26 +0100 From: Matthew Wilcox To: Wei Yang Cc: akpm@linux-foundation.org, linux-mm@kvack.org, Johannes Weiner , Mel Gorman Subject: Re: [PATCH] mm/vmscan: reorder scan_balance definition to simplify the scan type check Message-ID: References: <20220405082357.22606-1-richard.weiyang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220405082357.22606-1-richard.weiyang@gmail.com> Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=ngUClDZY; spf=none (imf18.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Stat-Signature: uarr1fwdadasqakwzm9rc9kxteq96yzw X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 06C2D1C0028 X-HE-Tag: 1649161830-691890 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Apr 05, 2022 at 08:23:57AM +0000, Wei Yang wrote: > Even is_file_lru() return bool type, we leverage it as an index for anon > or file. > > With this in hand, after reorder scan_balance definition, we can compare > directly between scan_balance and file to get the exclusive scan type. > > After this, the code looks more readable and save some instructions. This scares me. I would not apply this patch.