Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp367599img; Thu, 28 Mar 2019 01:09:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+2uEmVw06wY6/ZHQ6Zxpt4qGwIzTdi1c4o+nHE2kupMt5wigP6g2/QxohXhEAyVj6NtNe X-Received: by 2002:a63:8143:: with SMTP id t64mr39598178pgd.301.1553760577473; Thu, 28 Mar 2019 01:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553760577; cv=none; d=google.com; s=arc-20160816; b=Tv84GJphsDfiCAjxQPrLw7jfXAqC0w1iJ7bXFi0VK1yuwWZujX5koZw7sCEWkZmpRu /iRdal/4Nl7IC9KG/G1AgNBqigosqsk1ESyMT2Kuj7oXZZnA+f/72O4wMh/F6+SlURt3 FBXB2L9anAsDBvuJ3dUXQ+o6Fyzcze06jE30EjPYpn2KvsPEXLYb+UnijG0e/LhkSkgT SuaUI8wnIKf+g3O5QuyyDLhNzyDWKT580dI0uDuqXZuxdPv3uKvORnCWSqAqNdMD/N/I /kAcHH6owtO7/4lFXIPu55JHYkbw2aBU2Az/keqTrKR7SuyS7zr9+hKYyBef1uiQY2+Q Dveg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=GLzekCmXldcdSuO0ybfajyOvaGK5w8KwZTPNrUlifjk=; b=cCnYWtZVcLgt2OL7pTG4bdRQmR5oyQ2v51M46Qpcf6P4IVHXbsfWkJ1W+TGzLJmGhV zJn7KGoqKC8iuJN8p6YlmDUaArRt754ZWJIttdxr8YiYE/EuId2IlWZWqlwLvZhJHjlj Z486L0N4keBWH3VSht32h/rm+iNhi2SyKElfXDFYEgujBQ0HZ28O7RGgG8S7TzY1xzT3 i4uYYHYppdXgO4fYDfZ4TEYvGdJEAjqiyyBPq2QCndo76BJQ70EWCbOsBZ5adcyeKQ1U vyrJ3oKPlr1d98tZLly6i2tgu9a5HG9bMywbEqx5dVL4+xhhe+dOmGaXbyrsrkpj3Rz7 +9Mg== 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 w126si4746244pfb.196.2019.03.28.01.09.21; Thu, 28 Mar 2019 01:09:37 -0700 (PDT) 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 S1726249AbfC1IIq (ORCPT + 99 others); Thu, 28 Mar 2019 04:08:46 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:52441 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbfC1IIp (ORCPT ); Thu, 28 Mar 2019 04:08:45 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h9Q5b-0005Hx-MK; Thu, 28 Mar 2019 09:08:43 +0100 Date: Thu, 28 Mar 2019 09:08:43 +0100 (CET) From: Thomas Gleixner To: Wei Yang cc: x86@kernel.org, linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.or Subject: Re: [PATCH 4/6] x86, mm: make split_mem_range() more easy to read In-Reply-To: <20190328072027.GA6531@richard> Message-ID: References: <20190212021215.13247-1-richardw.yang@linux.intel.com> <20190212021215.13247-5-richardw.yang@linux.intel.com> <20190328072027.GA6531@richard> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Mar 2019, Wei Yang wrote: > On Sun, Mar 24, 2019 at 03:29:04PM +0100, Thomas Gleixner wrote: > My question is to the for loop. > > For example, we have a range > > +--+---------+-----------------------+ > ^ 128M 1G 2G > 128M - 4K > > If my understanding is correct, the original behavior will split this into > three ranges: > > 4K size: [128M - 4K, 128M] > 2M size: [128M, 1G] > 1G size: [1G, 2G] > > While after your change, it will split this into two ranges: > > ?? size: [128M - 4K, 1G] > 2M size: [1G, 2G] > > The question mark here is because you leave the page_size_mask unchanged in > this case. > > Is my understanding correct? Or I missed something? Yes. You misread mr_try_map(). Thanks, tglx