Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1530423ybt; Thu, 9 Jul 2020 09:08:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAIJwoG3kjS5RT/ZuEBszrDl2M0j0ZoeFifGz0XSoVSgIKhgZZdTE5f9iZhuStVDfOgLON X-Received: by 2002:a17:906:53d4:: with SMTP id p20mr56274935ejo.472.1594310934218; Thu, 09 Jul 2020 09:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594310934; cv=none; d=google.com; s=arc-20160816; b=VTIWfTqGoyppO7kAynda1kZUyIttkflQdgJIljvpdkjXPe4/zvrNnQ7j9xnbtFMoce YIQi83X6fK00coSuFMfqsMgufp4wr30RSsRC2lfpu3bVAjSNxT6TKfiw115FnUcN/3Os VxtzrFVrdjB+76uZ8D8hunpqcS8ZBJGB5m6ejhWQNl/PKYXaP5tKHa+tB0dbS116wMYh 0ZNC/itgjfEW9x+qv8wi+XVTE90j+VRiKDV/7Irn0yVrG3gQoRZq0kH7GRs4+wCtyuGr KTA1GEkBy2sO0KD0mepEyGPImrcSFHcq2MLxYzoLJZeQQD8+Y1XQCFUwkZJqqhtS7Jb8 WQCA== 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=5NDVNZtnnxjHdL2IznMhqyyOaM1UEpBRYfaH8/wnyRA=; b=Nu9YI6adW3SjxwphJY7r7eWTCQGmUxAPZ/FlH86yZ8oMJSQvDgQNQVHmc1fF7WncnS 9dNX0xKdkUFCu0GG/v3oJj5c6O/ej3sykrerv7zLmokPnyOEPCTQTAkr3ePJpTRLIIEy HfiAXLg3dtuFfbS52JsG+ezrnr1L+EQn5s6sCMCPWiPNvNv9XjnfODnWFj+xGIuDw9hx VlT4rSYSL9Xt4k4wOZ6+OAZv/RAEGOieshJMW7ZKjnM28qFOouIaTuiWeB4TS+XDs2IH crs3wiXa6ZUwihGMyNBEhiDpaxIDlKmg8XJSzVtu0LmuNN6JleTNZnObK/uLphWkXAKQ 6oWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=mrT4+Uij; 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 dp14si2800405ejc.412.2020.07.09.09.08.28; Thu, 09 Jul 2020 09:08:54 -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=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=mrT4+Uij; 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 S1727074AbgGIQHw (ORCPT + 99 others); Thu, 9 Jul 2020 12:07:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726357AbgGIQHw (ORCPT ); Thu, 9 Jul 2020 12:07:52 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB98BC08C5CE for ; Thu, 9 Jul 2020 09:07:51 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 9so3010495ljv.5 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=mOpXa18Fa01xxrKd2b+z5akQOXFsYXntg6XGPm/YBD+pjFV2tYDZESYu3NYezAjEpH q9Tb7bpPaNNhvJQO5rmqocNe3M7LikgZ2zuLwe/Hqfu9MqTuyErSgUGSKcTFRCuXvdul ILhKGT0+IfprvR5N7NkEPQqYn+Z4hrLJS2QFsChGbkowMHTQ2Q0HW4TSDoSa6nABH1pB UdhHqGKo7p/4h5vC7SeqKxGwmU8Vq2GV0Xkjunjz/JnUiJAI3seFPBEzxxNM1WP7ishv rpcGQhCcQ+E62HJDg1NUgnfFWEB8wgLVJneiq1zeRyAukmO7ni4JOC+7j7wpUboYPHQ/ Jo8w== X-Gm-Message-State: AOAM531PghqJYtXXZw3cJv1AsB51WoD2s1ohWDYVlU20iahohECHku8Q DzCb92Eo+QHXgNsf4kAupTKCBQ== 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> 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 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