Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7173761imu; Thu, 31 Jan 2019 06:13:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN6wz1AfguBqEN9UeIbPjL+0QpnTgkVHHYUgy/2iU9r9xUiM/j6qYKxEiBSNJR0bNhYrF8XU X-Received: by 2002:a62:1d8f:: with SMTP id d137mr34676763pfd.11.1548944010668; Thu, 31 Jan 2019 06:13:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548944010; cv=none; d=google.com; s=arc-20160816; b=YOJYTEKeoJAdmEhKzlyqrBdqYvD3528Tnj0vZtN7Gik4JSKcbNvykXUiPmKTYBYU2P HeaMdecCS2D1UsMqcjPpUNPdHmYRBuegg2t7uYbkyiFXg5v0ptEL9kIQzBbgbyMK/v/i YMwiI1Nht9Jutu8nXWnc4HvhDKCH20wvI9dSL01o1PMwIQLlELusFvziFeoH2I2ZQwR9 L7R8RK44/lnESm11U218Buvni8A6OiPMvztegXP4A5RCoXtpzmQxEGa2n1KDwD082rZt 7d5A9fQhAKLo6RrErX+6Eh3vXVwo8O4OUfXPdLv8QBcq1pahg+QgAzYAgJKt5Qp9i2X/ Q03A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:references:cc:to:from:subject; bh=WOG8yS61eZRlaMGuXWzm0wKx6OHtutKRQnUtajgEYVA=; b=S0Yskbio2Sz9azXNTiMakEsdvlp3w6SW/BofReDi01FiQra1KXNujWM028LwFPCnnl wVTaAx2VjBOeGLALUWnms43ubm6fqVyJVNWGWukERwp4cavN/vSlleL8azaDA2Ylwxnw RygZY0jftVNKcO/PvGmXpynMlQpIjdCxyS735rc+wFoY4h1lrKr+/LnIJ1Qo7yvcABfp RIJynYCk1tEHkYiF/dZ8GrzvT9W5fSe9Kz+4Iw+pC8c/9vqiyM7yZl+ycYO4YO7rA4ls oVtWGmUuM8WjbRi9M5SgnlM89i0EcPdpXkathwnHy8a8drOf4Ya1Oxvvdfcc6cisLs5L BpWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z38si4169292pga.193.2019.01.31.06.13.14; Thu, 31 Jan 2019 06:13:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387613AbfAaOM0 (ORCPT + 99 others); Thu, 31 Jan 2019 09:12:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:33584 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726977AbfAaOM0 (ORCPT ); Thu, 31 Jan 2019 09:12:26 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 86EE6B02F; Thu, 31 Jan 2019 14:12:25 +0000 (UTC) Subject: Re: [PATCH 09/22] mm, compaction: Use free lists to quickly locate a migration source From: Vlastimil Babka To: Mel Gorman , Andrew Morton Cc: David Rientjes , Andrea Arcangeli , Linux List Kernel Mailing , Linux-MM References: <20190118175136.31341-1-mgorman@techsingularity.net> <20190118175136.31341-10-mgorman@techsingularity.net> <4a6ae9fc-a52b-4300-0edb-a0f4169c314a@suse.cz> Openpgp: preference=signencrypt Message-ID: <3fbf3abc-0196-9e96-3760-266395362f00@suse.cz> Date: Thu, 31 Jan 2019 15:12:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <4a6ae9fc-a52b-4300-0edb-a0f4169c314a@suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/31/19 2:55 PM, Vlastimil Babka wrote: > On 1/18/19 6:51 PM, Mel Gorman wrote: > ... > >> + for (order = cc->order - 1; >> + order >= PAGE_ALLOC_COSTLY_ORDER && pfn == cc->migrate_pfn && nr_scanned < limit; >> + order--) { >> + struct free_area *area = &cc->zone->free_area[order]; >> + struct list_head *freelist; >> + unsigned long flags; >> + struct page *freepage; >> + >> + if (!area->nr_free) >> + continue; >> + >> + spin_lock_irqsave(&cc->zone->lock, flags); >> + freelist = &area->free_list[MIGRATE_MOVABLE]; >> + list_for_each_entry(freepage, freelist, lru) { >> + unsigned long free_pfn; >> + >> + nr_scanned++; >> + free_pfn = page_to_pfn(freepage); >> + if (free_pfn < high_pfn) { >> + update_fast_start_pfn(cc, free_pfn); > > Shouldn't this update go below checking pageblock skip bit? We might be > caching pageblocks that will be skipped, and also potentially going Ah that move happens in the next patch.