Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1122651ybb; Thu, 28 Mar 2019 20:39:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEZ6x2IeCt9DqIu3q3gaVjx4u95hs0to4+zEAgWItrj1O6GLGscNpdc4l3UeI/Yla2P2Ig X-Received: by 2002:a63:fb16:: with SMTP id o22mr42517673pgh.209.1553830761516; Thu, 28 Mar 2019 20:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553830761; cv=none; d=google.com; s=arc-20160816; b=AzIOTcjBk9+xnVjWvmxRcwPL/vsqvzXez4aE4+eJy5eI+oFcPGhBdqQgLFMKDoet94 sbZaDP7MV9Kj6smfLbaEeRSudb3TZKRRyQJfXiw9sk4TP6yMffhnie91Zux0396fONT/ VbnaUohXi/QCE7TcwOt7CUnFnMt6h2PNkwbolfqGfYrefLzRJ60ArIt4x7hlF3dWAa4/ vauS7LDZmq08oDAWbLF1AW3UA8pcRffNDsncJn4NFQuExBRKQGFkNo37JkIn1w+FyubA MVhpFInfay4AfPss9FRvQ/DYGXVxtT5GrBM6bRwg8y/4Y3RzgGq5ahUrPEYvPlDS8xQn Fp8Q== 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:reply-to:message-id :subject:cc:to:from:date; bh=PvDwQwVYOw76cX8YbNjgnDuwpaE+OfOBXGB2PzeV7r8=; b=bEKqLObUqUIEYOUjUJtyybVFMgh1KiIsbtR5vm0uzFwpcRl+/19VdO5Dzk5fk9QcEX m7r11O5knHAgEtwl1oKjpVhI4yZzwYkzaGBqvhD6yLojFjK4VlF2QNQh9f0u4nv6fi+f 8yU5E2rWjAlWNb8qO2cBsJhH3vGmNCXL8xVzBUjniJ4/9sAg7HFD1f/38NIKML59TVCt HQ0L00XUdNpqEL6D/a+i7ghWHAEeaTv5UlTZPhxnJ4xzt81464B6MPylQveAPT99Djgz h/RCN9OIp4RHSKbQ8SpR6swXaFSY4xXcaT6iP3r6uPNpbVdHZ00MRBu3cTjGUsM2GWOI +AxA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si869930pls.46.2019.03.28.20.39.05; Thu, 28 Mar 2019 20:39:21 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728582AbfC2Di0 (ORCPT + 99 others); Thu, 28 Mar 2019 23:38:26 -0400 Received: from mga05.intel.com ([192.55.52.43]:21023 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727654AbfC2DiZ (ORCPT ); Thu, 28 Mar 2019 23:38:25 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2019 20:38:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,283,1549958400"; d="scan'208";a="138223793" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga003.jf.intel.com with ESMTP; 28 Mar 2019 20:38:22 -0700 Date: Fri, 29 Mar 2019 11:38:04 +0800 From: Wei Yang To: Thomas Gleixner Cc: Wei Yang , 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 Message-ID: <20190329033804.GA17676@richard> Reply-To: Wei Yang References: <20190212021215.13247-1-richardw.yang@linux.intel.com> <20190212021215.13247-5-richardw.yang@linux.intel.com> <20190328072027.GA6531@richard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 28, 2019 at 09:08:43AM +0100, Thomas Gleixner wrote: >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 >> > >Yes. You misread mr_try_map(). You are right, I misunderstand the functionality of mr_try_map(). I went through the code and this looks nice to me. I have to say you are genius. Thanks for your code and I really learned a lot from this. BTW, for the test cases, I thinks mem-hotplug may be introduce layout diversity. Since mem-hotplug's range has to be 128M aligned. > >Thanks, > > tglx -- Wei Yang Help you, Help me