Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1124247imu; Thu, 20 Dec 2018 10:29:53 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wr+VL1Nb6ZwZBuVfpN3khrx79mldXzkkEbWZNCIOkkWfLYnPnLGAZyAJUGd0fH87saecb0 X-Received: by 2002:a63:65c7:: with SMTP id z190mr24090167pgb.249.1545330593835; Thu, 20 Dec 2018 10:29:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545330593; cv=none; d=google.com; s=arc-20160816; b=sKb03RNj6BEFOqIQ0356eAXR0cASGHEJdvQsV2Beg9ZE0lnDRqV+c0gWocIm3JU/Bo P49hAVELmLvy1cU341sIjl1qwwm6p7EbqtqQRJdYoAxBlliCoVXkKY/lN94LMntX6GKX +U4XoTSMztsxUCsEGa5kanNJ8OYJbmSzZ4+d4ZO4Exur+d3AN6XfsJjkuBfpVLRgt8o+ 4Em6b1rccHkR3BeqSiYawr1Zsr2mhYb1YQ+itxJAN5eyzE466kV6nAF852CgG72DvTxv p7eakKkKF6fzzTqjjurNNnl2GVRJu6/0qHMyxbcOaOBy9ARh8FxU7wAiTtdYT+NbSyEN iOPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nbhWvYR1XQyyLM84oC6N/Iiue8wMQK1GZDy4bUrLP8M=; b=yBPeI/3lEN6qVj7hbfqxK6P0hb1r/AM5KP/icRGHQrn3ZWO8b9/Fl+XLxX6j21fvGc dCPFdhaS9JsK9DLNcqEYQdDnaKEtkpXVx/C6XP+5RbWbYNLBfwujTHnFEoeHn+epzSvM ZGtY6JiHsIqcMPEzL2jpVPv7r+ovIQ6GjELXjkjpcizyA/n2TP6ZngdkLsmiLSBPhpXA PCdShXnFm3q4JRY55a0jr+tm6BC5W6L7KznnDqmNYUFq4CmEtZYfv5a1qLGr35Lb8vBI jwmFAXhUacZXdURYqRyOY/9r1V1HBX90M/pOinqoy05dDKL/G0Nt1a0/k9knJOg14UYI 7GXQ== 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 u5si15725315pgi.146.2018.12.20.10.29.35; Thu, 20 Dec 2018 10:29:53 -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 S2387436AbeLTNtD (ORCPT + 99 others); Thu, 20 Dec 2018 08:49:03 -0500 Received: from charybdis-ext.suse.de ([195.135.221.2]:33927 "EHLO suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387421AbeLTNtC (ORCPT ); Thu, 20 Dec 2018 08:49:02 -0500 Received: by suse.de (Postfix, from userid 1000) id AF5733CA9; Thu, 20 Dec 2018 14:49:00 +0100 (CET) Date: Thu, 20 Dec 2018 14:49:00 +0100 From: Oscar Salvador To: Wei Yang Cc: Michal Hocko , akpm@linux-foundation.org, vbabka@suse.cz, pavel.tatashin@microsoft.com, rppt@linux.vnet.ibm.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mm, page_alloc: Fix has_unmovable_pages for HugePages Message-ID: <20181220134900.zk4djsoenspltdx6@d104.suse.de> References: <20181217225113.17864-1-osalvador@suse.de> <20181219142528.yx6ravdyzcqp5wtd@master> <20181219233914.2fxe26pih26ifvmt@d104.suse.de> <20181220091228.GB14234@dhcp22.suse.cz> <20181220124925.itwuuacgztpgsk7s@d104.suse.de> <20181220130857.yrzv5wzmiw7jbycb@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181220130857.yrzv5wzmiw7jbycb@master> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 20, 2018 at 01:08:57PM +0000, Wei Yang wrote: > This complicated the calculation. > > The original code is correct. > > iter = round_up(iter + 1, 1<