Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp198557pxb; Mon, 2 Nov 2020 18:47:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJx02/Xdsb5ox4iYjmNHNj/yxU6gWwoQd0M/J6uxlpOgcEy5DS/ben5YWKg0oWLrzNjlCScu X-Received: by 2002:a17:906:3146:: with SMTP id e6mr17417068eje.363.1604371663610; Mon, 02 Nov 2020 18:47:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604371663; cv=none; d=google.com; s=arc-20160816; b=TCOcYJaDWMWJ/j+OFdcSorxgMv5xPxAXWgJqdV4YdZyGENRZF8h+0aAv6apOt1KNEC euG+jUqVcXnW9H8QAm749MHC/nhk7yiF8Btuxw/G+ZLcGOpwSXtfqjKorTF3Gdbtg/ti 24YgfRQ9mu93bETu10UdnZU06iZW+2N8uGM3g9yGwZl7yWuq2gMdGmYdAq5NI0wWqHZb tCkGwJfQllFVtAdqCj33rNFwWd1Q2SKw+hl/c9gsXD9sMaGGLU3Q+VLiNSAJ/1oeDghc 3TWHVNPMiEjyOoonyq+gE4xHiv4Ur9/6kcltQ0neT+toxjFcte3/c80iexsnT/hSHkZN W5aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=20BrloB+j5JE/8m5u9HYFDXlvgGZY6YRgOly9NJpmbg=; b=Ti2tX13J5vB7l3+Mx5EguEXk08Js75aroTqqU+LQRh1MqOrBKZ81Bvljb4PfON82ty cE0tI94et5DO4C3PrX3PW9AGrQJm37DxnBwnZjE/BFg8MU/65eRLdJ06Ajq03b3TY0Em FU94e1nYZNXKfsV3nClR+w8hmYwK9fsskMIidRQ1my/Pv7urazGn5UmMYut1snmE0XA7 akM6R3WCj99DKe5KtnQvdEvlFiijQD+I1LlMLhtPqSGU4gzhhhn71/WxN3nINTLpmeU0 NeOEfNqwQAu3ZI4v9ZYtKQcMIpaLDHdY6YVX4Ifck3CzmhgtWrRUgTY2e6L+OxSOsMDQ 0k7w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si1576600edm.279.2020.11.02.18.47.20; Mon, 02 Nov 2020 18:47:43 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726114AbgKCCpq (ORCPT + 99 others); Mon, 2 Nov 2020 21:45:46 -0500 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:42240 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725968AbgKCCpp (ORCPT ); Mon, 2 Nov 2020 21:45:45 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0UE2a0gk_1604371541; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UE2a0gk_1604371541) by smtp.aliyun-inc.com(127.0.0.1); Tue, 03 Nov 2020 10:45:41 +0800 Subject: Re: [PATCH v20 04/20] mm/thp: use head for head page in lru_add_page_tail To: Matthew Wilcox 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 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> <20201102160357.GP27442@casper.infradead.org> From: Alex Shi Message-ID: <374a5d13-e5d2-9f5e-0185-5b0f2a613fa6@linux.alibaba.com> Date: Tue, 3 Nov 2020 10:43:07 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201102160357.GP27442@casper.infradead.org> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/11/3 ????12:03, Matthew Wilcox ะด??: > 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? Hi Matthew, Thanks for reminder! Looks these changes worth for another patch. > > Either way: > > Reviewed-by: Matthew Wilcox (Oracle) > I will take this option this time. :) Thanks! Alex