From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93FBEC43381 for ; Fri, 29 Mar 2019 03:38:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6246321871 for ; Fri, 29 Mar 2019 03:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728625AbfC2Di0 (ORCPT ); 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