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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, 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 E19A7C433E1 for ; Thu, 9 Jul 2020 16:07:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9BFDD207DA for ; Thu, 9 Jul 2020 16:07:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="mrT4+Uij" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BFDD207DA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 192496B0008; Thu, 9 Jul 2020 12:07:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 143226B000A; Thu, 9 Jul 2020 12:07:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0319D6B000C; Thu, 9 Jul 2020 12:07:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id DE87F6B0008 for ; Thu, 9 Jul 2020 12:07:52 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6C764181AEF1E for ; Thu, 9 Jul 2020 16:07:52 +0000 (UTC) X-FDA: 77019018384.07.quill27_41166ee26ec7 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 3EE4E1803F9A9 for ; Thu, 9 Jul 2020 16:07:52 +0000 (UTC) X-HE-Tag: quill27_41166ee26ec7 X-Filterd-Recvd-Size: 3971 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Thu, 9 Jul 2020 16:07:51 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id h22so3001931lji.9 for ; Thu, 09 Jul 2020 09:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5NDVNZtnnxjHdL2IznMhqyyOaM1UEpBRYfaH8/wnyRA=; b=mrT4+UijHeMtAjfWDqqY584BReFIKqdUGRL55LAuh/wgkJjAMTTfUV68ACSvuJRFdh DQGSmM0SQWbj99NdyhvkMwvFU7pUt3HMuk4Fk4HmdQk+PpxOyWLIQGiwMZSzPgzDS0Ny g1BLBl2A6cB7SIlq17kDmdR0xR/GAT4Gw0DjtW3LEjsqqWV5NGg/W1HiiKWVEr8XUWSs Wt/3Q8Nia+nRo/GmBK9Vqu7JzMDjlce+aF8L/pcUpyMbWm3ZNjusdgADGs6Ts2xbZTeN 3hkbBJiLmTpl17KO7+GFcuIJhJxF6N5LMlpuDyh5pWRodiBSuQql6h/P/+XwVn8rq5B2 sA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5NDVNZtnnxjHdL2IznMhqyyOaM1UEpBRYfaH8/wnyRA=; b=rZ4MR0XGlu9sszPRk7VuFd8+D47LquFS6ZZ+A659q3U67F1nTnPD6cHUGTfsg28Npc 7rqZQpD8KPhrv2WV78UH2uAp6iPKXNCOfbDXw7jRAIyHLxurQRWpfm9CkVZsLfPr/iEh 1aAuALI/0aOn078gRu70d7xg5KaTgxBeUFf29TofIYJUoBULPzOpC027a6wOg5wCfWTQ Il2AfZEpCUs8Q3Uxzo0PQwr3uULMaInOyIE30i7WgoKS0XpBGiAt6EGbMzX9CvmxbzZA e94QZppjWRi5lgpFmyvi7/GN+uHl7oqm8KrnhWWCoLcoCJw2UetQ7mB5WnH40tLg8TOs aZPw== X-Gm-Message-State: AOAM530MLE+BgDIzAwCghJoJoCxJK4wFRrPVF0msDsd+rN7vq7f+jsAx OxCboHMlT0Z1N/Rr3ZpVTLgT8A== X-Google-Smtp-Source: ABdhPJyNqFCflNKSSRWKotYhcWShpJYaIkEFcLWrAqbJRcRQMrVhEr9U9utz7KkSedxkzEMyWD8A0A== X-Received: by 2002:a2e:9006:: with SMTP id h6mr26401383ljg.148.1594310870147; Thu, 09 Jul 2020 09:07:50 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id o1sm1070797lfi.92.2020.07.09.09.07.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2020 09:07:49 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id EA65610222B; Thu, 9 Jul 2020 19:07:50 +0300 (+03) Date: Thu, 9 Jul 2020 19:07:50 +0300 From: "Kirill A. Shutemov" To: Matthew Wilcox Cc: Alex Shi , Johannes Weiner , Linux-MM , "linux-kernel@vger.kernel.org" , Hugh Dickins Subject: Re: a question of split_huge_page Message-ID: <20200709160750.utl46xvavceuvnom@box> References: <20200709155002.GF12769@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200709155002.GF12769@casper.infradead.org> X-Rspamd-Queue-Id: 3EE4E1803F9A9 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 04:50:02PM +0100, Matthew Wilcox wrote: > 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? Right, and it's never got removed from LRU during the split. The tail pages have to be added to LRU because they now separate from the tail page. -- Kirill A. Shutemov