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 X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3914EC433DF for ; Thu, 9 Jul 2020 15:50:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E7B6D2073A for ; Thu, 9 Jul 2020 15:50:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KyWLACne" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7B6D2073A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8EABD6B0005; Thu, 9 Jul 2020 11:50:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89BD26B0006; Thu, 9 Jul 2020 11:50:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78ABE6B0007; Thu, 9 Jul 2020 11:50:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 62DD66B0005 for ; Thu, 9 Jul 2020 11:50:07 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DD6218248D51 for ; Thu, 9 Jul 2020 15:50:06 +0000 (UTC) X-FDA: 77018973612.11.heart68_4a16b5d26ec6 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 8BEAF180F8B93 for ; Thu, 9 Jul 2020 15:50:06 +0000 (UTC) X-HE-Tag: heart68_4a16b5d26ec6 X-Filterd-Recvd-Size: 2216 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Thu, 9 Jul 2020 15:50:06 +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=qoHPbGxG9Oimtt6WoWs+2/LdnzOc61VzELk6X25qiTo=; b=KyWLACnetXhzqn1rE6psvcE3ly lic9T6JORrpdlmLz6S6ifhyzvX1D6TV0+nYFG9qjvieVNp6mlJyk2EsdHIycrWDbA31U8U1jq6DhQ 6Ga502jhNLoYNipU9hDazSe0p1u5NLqtCtiqqqwhk8/LAcPSke0ZA6W7T3sk7b/227LdgtsqqUTXy d3ZG6OSosVhV+BqKnHvu/N+K12tan0C3I2So6KFIvfM49qfE2WYnFSOoMLc6GGueQKn/otEd35970 ub2ZjuxaD1ATWXNu5EklO98i/a6wICm6NXfenTll6YHDxgU6HRBRo8D8AQP/J+6Kwa36c6UEgBJEe mQESMAtw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jtYoE-0006k0-KD; Thu, 09 Jul 2020 15:50:02 +0000 Date: Thu, 9 Jul 2020 16:50:02 +0100 From: Matthew Wilcox To: Alex Shi Cc: Johannes Weiner , "Kirill A. Shutemov" , Linux-MM , "linux-kernel@vger.kernel.org" , Hugh Dickins Subject: Re: a question of split_huge_page Message-ID: <20200709155002.GF12769@casper.infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 8BEAF180F8B93 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 Thu, Jul 09, 2020 at 11:11:11PM +0800, Alex Shi wrote: > Hi Kirill & Matthew, > > In the func call chain, from split_huge_page() to lru_add_page_tail(), > Seems tail pages are added to lru list at line 963, but in this scenario > the head page has no lru bit and isn't set the bit later. Why we do this? > or do I miss sth? I don't understand how we get to split_huge_page() with a page that's not on an LRU list. Both anonymous and page cache pages should be on an LRU list. What am I missing?