Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3407111pxx; Mon, 2 Nov 2020 08:06:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcaV89lqOdcVDDcFd12rtovDQYOCivY3aYgQda+TKpawjNfflKRAsDFQQ4xpP74FaUQY5q X-Received: by 2002:a17:906:1183:: with SMTP id n3mr15778917eja.188.1604333187363; Mon, 02 Nov 2020 08:06:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604333187; cv=none; d=google.com; s=arc-20160816; b=U5R7VEwXo+wWxfvv3oSm6OyHkdgsLyCdiOtClc7xuUqFTlpc/ktM+uzU6ZG9xfhCHT 9wYdvX1kuhd0JBoqBuoABMhqxIH9bujDvWVBcwYcGbBC9Jtk90Aw0Pjm82HVoFbaEii9 fLtnQcqwxg/7i3FUdcTR5qjQJ8OKAAFhGwEyWCJlqT7eWSi+i2EmuvrS/Errjf/r17SB JPdXYLSavMzQ7kj7e3/MbbCCK3ai8BbdNSTmAt4OQLcCxIMKKGAG+bU6jUuoD/PM9z0d if9FxgkMEAVFa61EWtMbcafaRCfWHebNbTOFk336FnowRPvHPYHJCq8wvwJgJ5GD6tEQ MZvA== 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=ById62lxNkbzmGe1y6sEW9CH+Xn28r08JtKiwHI4ZFE=; b=sHxtohs63G78NZLNjpFCnJvEBPJ6xwNWpUzWYSwVHRSbWx1M0x48M8QJRd7uacKmta GC2bBuz2mePUOuZAzl7AuVjI1zy+d/iBFrt3TFFZA2P0YxfwCFKG280YzIOCJ9GfYwFp JNjSjKeSgTi6gA5UqgswUx9mJ7Ra2VFzH40Wp6tSQBN2loesZQ67wkSxIAHvJWoPh+d8 g1GojwUozntdjMWpD2I1iBYtT4TizMl4cl6zQCdfPcSrjvt5a7bW2zqFAtQraodhZmHW X69uyYw3cGQpUHNN2msRcUgX00vUIM3Asot9NZqGDXgqoUB5Nk0HWikp5dVhqBov8D8G Pt4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eXXZJcEJ; 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 a4si10137880ejc.628.2020.11.02.08.06.01; Mon, 02 Nov 2020 08:06:27 -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=@infradead.org header.s=casper.20170209 header.b=eXXZJcEJ; 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 S1726751AbgKBQE3 (ORCPT + 99 others); Mon, 2 Nov 2020 11:04:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725852AbgKBQE3 (ORCPT ); Mon, 2 Nov 2020 11:04:29 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9472C0617A6; Mon, 2 Nov 2020 08:04:28 -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=ById62lxNkbzmGe1y6sEW9CH+Xn28r08JtKiwHI4ZFE=; b=eXXZJcEJI37a+/rq1NcdCftKu9 1w1qhi7JK4Le0V6NXiB4NVW+gvn9ySrTjTmOENM8vLHMoaZsenii71Nci4qAeWZ0mamhK8a35JlQK J6cojCg0ge0utPapk8k+jZjA6fWe4Fy6jHXiyGPgdfX9BY6C+qR/NI+aInfubiQUD76BE/6AuMWf6 2rZwOBSfaFCGmbL4e9iS4ymkQ4uuSmJgbUmrZEe7AuPpgfqxeEoNWiItbK37ZJp7oIKQTDRWtkIfD RaNYRb+6U8KoxF7lQmMkTuC3Lqs1i1WIXcnj20sKrUrkN/yGwYgCfwn+13jRLArwa8HrkX306cFP0 r5FYl46Q==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZcJJ-0003kC-UX; Mon, 02 Nov 2020 16:03:58 +0000 Date: Mon, 2 Nov 2020 16:03:57 +0000 From: Matthew Wilcox To: Alex Shi Cc: Johannes Weiner , akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, lkp@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, shakeelb@google.com, iamjoonsoo.kim@lge.com, richard.weiyang@gmail.com, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com, mhocko@suse.com, vdavydov.dev@gmail.com, shy828301@gmail.com Subject: Re: [PATCH v20 04/20] mm/thp: use head for head page in lru_add_page_tail Message-ID: <20201102160357.GP27442@casper.infradead.org> References: <1603968305-8026-1-git-send-email-alex.shi@linux.alibaba.com> <1603968305-8026-5-git-send-email-alex.shi@linux.alibaba.com> <20201029135047.GE599825@cmpxchg.org> <06a5b7d8-bbf2-51b7-1352-2b630186e15f@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <06a5b7d8-bbf2-51b7-1352-2b630186e15f@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 30, 2020 at 10:46:54AM +0800, Alex Shi wrote: > -static void lru_add_page_tail(struct page *page, struct page *page_tail, > +static void lru_add_page_tail(struct page *head, struct page *tail, > struct lruvec *lruvec, struct list_head *list) > { > - VM_BUG_ON_PAGE(!PageHead(page), page); > - VM_BUG_ON_PAGE(PageCompound(page_tail), page); > - VM_BUG_ON_PAGE(PageLRU(page_tail), page); > + VM_BUG_ON_PAGE(!PageHead(head), head); > + VM_BUG_ON_PAGE(PageCompound(tail), head); > + VM_BUG_ON_PAGE(PageLRU(tail), head); These last two should surely have been VM_BUG_ON_PAGE(PageCompound(tail), tail); VM_BUG_ON_PAGE(PageLRU(tail), tail); Also, what do people think about converting these to VM_BUG_ON_PGFLAGS? Either way: Reviewed-by: Matthew Wilcox (Oracle)