Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1517591ybt; Thu, 9 Jul 2020 08:52:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8EPBctL/YMQLDfK3CehtZBfPa9UcyyWcfWTfDddvyjjU4u5/GGwPCqDTjDjrKYUO1SLEf X-Received: by 2002:a17:906:7208:: with SMTP id m8mr59663333ejk.544.1594309967216; Thu, 09 Jul 2020 08:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594309967; cv=none; d=google.com; s=arc-20160816; b=pkU2BvIQ7vBvqH/cuoUEGoZvnIdihTK8EguqF70kICTA4axJfipPJHZVw3Y3K7c2Z5 ML86vmW7UcUoy3q3BDWKg7yRk1w1zzQLwslBvvQRbRV1r1pgCn+9A03qD9wiofZhiD5X wum56r30gS4zc9y7pHrfN3OEuiT4o5jnGWnG/I8UoaVl+7KvFJ+OE/XFFXk38RE/oKZD a3h2vpoVjPF2Powr4dawETJDnRSMTaWJo+Br3AJTWmeQTOV+lUIQUh+b5PQ3aju7GgiS 3Qhk/2R9Pa528+rlpRCcS3mV7rZyc4p2kIhQ05Pj1pT5rQYPAxjAVI6PWuzK8urqiJ/F C/8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qoHPbGxG9Oimtt6WoWs+2/LdnzOc61VzELk6X25qiTo=; b=l1YzX3nTfJUMFmtMEiVD86WVa23NThnj1yk2Sn+uL9KccEbfj6bqZuMMHt2OY2lQwZ cVc79iWV0vbJfpPUPdHFt0u/R74r+xUj0cODiMIm7+LwkR1LfQ83O3gQOzyV6yj93iDS tzKm5LkNF0Ng1DRMIcPiBxrtU71PhBn0Vt2Vno8wiNRwfYrks9QZypOK+rI6tm4dy6kw 5bZ4AbfLZXIqswFKgB8BfxGJOMTDWGxfxoij7dY5eevkFBN2skR8qy+9MPNBB0F6WOzw 4iKv4Lg4LxzPksWb8k8vXBEqUJXJAoN1vBOzqeMd5Taz/n/qKTRj+JfacFK9E6twq+aG RVUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=KyWLACne; 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 gw16si2086389ejb.274.2020.07.09.08.52.22; Thu, 09 Jul 2020 08:52:47 -0700 (PDT) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=KyWLACne; 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 S1727856AbgGIPuI (ORCPT + 99 others); Thu, 9 Jul 2020 11:50:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726729AbgGIPuI (ORCPT ); Thu, 9 Jul 2020 11:50:08 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 100CAC08C5CE for ; Thu, 9 Jul 2020 08:50:08 -0700 (PDT) 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?