Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp22178pxb; Tue, 23 Feb 2021 16:49:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxRp0hO9v+hKenphrH7HLNHGYTUSCYSGgXWzE8hl/FQWJCnDfXjJgCgdUhDfDjnyz5PRiq9 X-Received: by 2002:a17:906:2b4e:: with SMTP id b14mr9341006ejg.467.1614127755726; Tue, 23 Feb 2021 16:49:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614127755; cv=none; d=google.com; s=arc-20160816; b=VbIfoW3RcHpEJZrv02Sp4jUwmSI/zdgE1KWUMRqt+hEDwMdBxve0K8RaO2ByUfY0Uy LjldO1gwhLcx7xqGppoHFed+x3BXBggiqO5W4Mooig+SXm+wmSS7DjginvFlIG9moMZr 7nPof1EgOipSI91Cu4ReS2G+qiT+MLp0Nqz12H8amOwSZOIC22G8AH0tqmT9wk5sM50U fJMJjc40FXy3GWDkDCwo7aEThKdkJQq7Nb5v4VdgkC+zqM6wveuIr4qEWvYHdZ8k6GfS vl9mVGF+cb4r4+kMuZUfF1yCg0ylN54U7AC8SSGUdryAv2OC2cEID4xnT8QZS2F0sa+n V5vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=wn2pLYGI2xjU589VPMs2RWTeuQBbZ8m0z/YsCMAE9jE=; b=udDZ3uMNs4xi55M10dq+lqx4zRSOy5YvAvOawzkmgwFbnOoAVsICF1lkvFDQR0vqc4 6SiScJGQ7V3d/PbhM/SYxf/WrNRuIMdwUOg0LxvyY9xQErfjqBIoD0/upOXOvp5ouMH/ qrZoF171VlSiPbP3Cgfzxqhw1Sa3ZIiftGRzR8FaS1Ajnt0L3iUAYdkFofIRbgXLLpqU QoeQMvgIQI0J3AFEh/G5QCCPt2NY/nt5KVynLKNxeG2f2fRsA4xI5qRVVkEAMAmnpmeL nGfjmO8vp5xtZ3wF6ebT2jBTcAqbSCVHuZk7mgT0mpBiinG+upQ+4Ox2XghupVxrXgDr ks3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DFjhHr3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si120655edh.201.2021.02.23.16.48.26; Tue, 23 Feb 2021 16:49:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DFjhHr3a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234044AbhBWXAp (ORCPT + 99 others); Tue, 23 Feb 2021 18:00:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:46384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232453AbhBWWuz (ORCPT ); Tue, 23 Feb 2021 17:50:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 14CA164DF2; Tue, 23 Feb 2021 22:50:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1614120612; bh=gCT1COJKg1ZQddedw3a/5/wlGAq6rYRQHc94K4b5n+A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DFjhHr3aj7Ef8DoNg0iZXNKHIR+pb47yvpzZu4hv67auFwt/uK2ykOSCUEBgxAm49 WJ483xaVMdfPfbaD++yrLagZVfz0R5vf70CUhliUbxN+XNm6tKexhGTMFmYwRr8r7l mI1iSgQMBBE0tQn1rqqCqfFupP89zepLcoTomzcc= Date: Tue, 23 Feb 2021 14:50:11 -0800 From: Andrew Morton To: Yu Zhao Cc: Matthew Wilcox , Hugh Dickins , Alex Shi , Michal Hocko , Johannes Weiner , Vladimir Davydov , Roman Gushchin , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/10] mm: don't pass "enum lru_list" to lru list addition functions Message-Id: <20210223145011.0181eed96ab0091a493b51f6@linux-foundation.org> In-Reply-To: References: <20210122220600.906146-1-yuzhao@google.com> <20210122220600.906146-4-yuzhao@google.com> <20210126220111.GO308988@casper.infradead.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Jan 2021 15:14:38 -0700 Yu Zhao wrote: > On Tue, Jan 26, 2021 at 10:01:11PM +0000, Matthew Wilcox wrote: > > On Fri, Jan 22, 2021 at 03:05:53PM -0700, Yu Zhao wrote: > > > +++ b/mm/swap.c > > > @@ -231,7 +231,7 @@ static void pagevec_move_tail_fn(struct page *page, struct lruvec *lruvec) > > > if (!PageUnevictable(page)) { > > > del_page_from_lru_list(page, lruvec, page_lru(page)); > > > ClearPageActive(page); > > > - add_page_to_lru_list_tail(page, lruvec, page_lru(page)); > > > + add_page_to_lru_list_tail(page, lruvec); > > > __count_vm_events(PGROTATED, thp_nr_pages(page)); > > > } > > > > Is it profitable to do ... > > > > - del_page_from_lru_list(page, lruvec, page_lru(page)); > > + enum lru_list lru = page_lru(page); > > + del_page_from_lru_list(page, lruvec, lru); > > ClearPageActive(page); > > - add_page_to_lru_list_tail(page, lruvec, page_lru(page)); > > + lru &= ~LRU_ACTIVE; > > + add_page_to_lru_list_tail(page, lruvec, lru); > > Ok, now we want to trade readability for size. Sure, I'll see how > much we could squeeze. As nothing has happened here and the code bloat issue remains, I'll hold this series out of 5.12-rc1.