Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2814590pxk; Sun, 20 Sep 2020 18:59:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhImNDevxN+2J1A2P5RxxWyECK6sWXX/1ukbyBxQ+j8EGBXVRB1mkHg2rXurkyzWWxiKKy X-Received: by 2002:a50:fe98:: with SMTP id d24mr49420894edt.223.1600653548097; Sun, 20 Sep 2020 18:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600653548; cv=none; d=google.com; s=arc-20160816; b=ATPQPDQI2FFCQFwRqjWZAawIrl30zl3PLpNktauOwVknohBdQW32ZFFzaDKXr2/b4l HBJ90O6WPkAyExkxu/TIDz1JyVwVy/1X45n2oOkYuxNb9/p2naGl3+wmGA/ABHUEhPdE qLvF12T2BqUoW3JOW5/QKs93MDQvyfDZhLoC5PS3fXK9cVWAbLx0YHDbyvS3swMNwrRY +2lpBzqtzYr5qKRNk3x/YCM7Vu+GKXg3VlygPXUM3i8Ru1CoiwVkNCmGBBaMz5/tYr9R 4uSJhjtm47x15o4AZI9QOsqbQg8CCTlUHKiIrsQbz86IpdgiJ3Va6fJjrWfYtbWnZkRZ E+kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=EP9t/UJdvlpgDPvNb1qqlCEIqwYV5mO8fOTLKhdWN/o=; b=vLI64cjVuy9GKmh/CLDeSkZMO/C5NZkNND+cYGIFXsF84UFTUAmQlvv1pxLNi+J1Cw v3KJKZFDK54cHxkWq9s7Oi2awzKlvzwAxHvvaOiTd4/ItJUKY1B+QTTVkpFDQ0hKLoND nj/ojKVJ45ipy91pKAHUG5QS3oOxYuSA6CUb33oOzdWNgT8Hzc5v5ptl6tgoVq6OY5DB 53fN8pGcAHBOSUfPidpFDOs7WErARVyfhaIbn8xlgtimAxFvHbJ/5wsXjEB5DH1SR/sJ 3oWUtj8BuaAcdgNKX1QL1tkyBS5if1aeFyX6UZNeSOj+wDDXbPPFQjJW3wg2trBXM5V6 cQyg== 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 g17si7687835ejd.140.2020.09.20.18.58.44; Sun, 20 Sep 2020 18:59:08 -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; 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 S1726375AbgIUB5G (ORCPT + 99 others); Sun, 20 Sep 2020 21:57:06 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:50964 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726244AbgIUB5G (ORCPT ); Sun, 20 Sep 2020 21:57:06 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R391e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0U9XKMRq_1600653420; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U9XKMRq_1600653420) by smtp.aliyun-inc.com(127.0.0.1); Mon, 21 Sep 2020 09:57:01 +0800 Date: Mon, 21 Sep 2020 09:57:00 +0800 From: Wei Yang To: David Hildenbrand Cc: Wei Yang , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Andrew Morton , Alexander Duyck , Mel Gorman , Michal Hocko , Dave Hansen , Vlastimil Babka , Oscar Salvador , Mike Rapoport , Scott Cheloha , Michael Ellerman Subject: Re: [PATCH RFC 2/4] mm/page_alloc: place pages to tail in __putback_isolated_page() Message-ID: <20200921015700.GA83969@L-31X9LVDL-1304.local> Reply-To: Wei Yang References: <20200916183411.64756-1-david@redhat.com> <20200916183411.64756-3-david@redhat.com> <20200918020758.GB54754@L-31X9LVDL-1304.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 18, 2020 at 09:27:23AM +0200, David Hildenbrand wrote: >On 18.09.20 04:07, Wei Yang wrote: >> On Wed, Sep 16, 2020 at 08:34:09PM +0200, David Hildenbrand wrote: >>> __putback_isolated_page() already documents that pages will be placed to >>> the tail of the freelist - this is, however, not the case for >>> "order >= MAX_ORDER - 2" (see buddy_merge_likely()) - which should be >>> the case for all existing users. >>> >>> This change affects two users: >>> - free page reporting >>> - page isolation, when undoing the isolation. >>> >>> This behavior is desireable for pages that haven't really been touched >>> lately, so exactly the two users that don't actually read/write page >>> content, but rather move untouched pages. >>> >>> The new behavior is especially desirable for memory onlining, where we >>> allow allocation of newly onlined pages via undo_isolate_page_range() >>> in online_pages(). Right now, we always place them to the head of the >> >> The code looks good, while I don't fully understand the log here. >> >> undo_isolate_page_range() is used in __offline_pages and alloc_contig_range. I >> don't connect them with online_pages(). Do I miss something? > >Yeah, please look at -mm / -next instead. See > >https://lkml.kernel.org/r/20200819175957.28465-11-david@redhat.com > Thanks, I get the point. > >-- >Thanks, > >David / dhildenb -- Wei Yang Help you, Help me