Received: by 2002:a25:fc12:0:0:0:0:0 with SMTP id v18csp14767ybd; Thu, 11 Apr 2019 20:10:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnxxv0w6LOhE6wPGCKqmPWRVOsqDqBm9K7qPUT+tSHvfeaUEgwcTFQyraQQ5EMiiut7otl X-Received: by 2002:a63:1247:: with SMTP id 7mr50323087pgs.352.1555038647714; Thu, 11 Apr 2019 20:10:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555038647; cv=none; d=google.com; s=arc-20160816; b=hvrh1WX22qR0SF42sAJTuUKQDolZB5Pd1VJMNzOh43RazVWbwBg3K9zfdY9hbLx1zG sGSaxY5A0x0ZYmJuLrjUcI56UU9TVn+28hDDl4bKILddQRq1ujqKMx0ziVLXKF02QMJj OPRwzQH9vNuqOqvSMrztMeXj6qzFBuVs0F3ZVPkAVVt/q1BO61cYyCmK/xOf8YB+RhJx P1SG027rqWUl4Uu6KrrZ1bbKjb0p5EaPbHugAObaKyzrizBl6ep/wZ87ufcDAUws1W2+ jQ02CK3OqW2SOsOM8ZnoZ7nx9Uni/+RnsZb5J1NiIwxiGQOIMxnACg/kSlf++Rjg0jsa /WSA== 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=urzkeocp9TIqIuj6pfVj9swO1wyqNDFy76axE1/rY1Y=; b=mUSNb7PWR+ChAisXJbPafvw/J/KPhbHxJ6Xtt/Y5Ji++x1Fgf9EB/rezffax1N4/hM Hol4pn5EO8HSkQ8ZZCjsXqP6VYjA53SpS2KWypLvSslmlNyrSK8ul8NUjuPzJuJartBE SvXxvgvQqMdEldDYYq0jKcu7AHm0sS2wQ+cgBue9sV5WSelNfd8J2io41JsJh4YUzw+h YjCb6OLGA4Ag4UHysRv2Hk0Kz1WwJSihtwMhBhmEfABAnEitrkhzKUXF8tEGzItucf7d h6k+L5d06I92hNLVI2/eGmdNjTf+EriaFKivCaBpx3NubSUvJEDN9vVc7to0lcnOxPLs GsUA== 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 c10si35479073plo.216.2019.04.11.20.10.31; Thu, 11 Apr 2019 20:10:47 -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 S1726777AbfDLDIj (ORCPT + 99 others); Thu, 11 Apr 2019 23:08:39 -0400 Received: from mga06.intel.com ([134.134.136.31]:64695 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfDLDIj (ORCPT ); Thu, 11 Apr 2019 23:08:39 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Apr 2019 20:08:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,339,1549958400"; d="scan'208";a="130695233" Received: from richard.sh.intel.com (HELO localhost) ([10.239.159.54]) by orsmga007.jf.intel.com with ESMTP; 11 Apr 2019 20:08:37 -0700 Date: Fri, 12 Apr 2019 11:08:18 +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: <20190412030818.GA29324@richard> Reply-To: Wei Yang References: <20190212021215.13247-1-richardw.yang@linux.intel.com> <20190212021215.13247-5-richardw.yang@linux.intel.com> 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 Sun, Mar 24, 2019 at 03:29:04PM +0100, Thomas Gleixner wrote: >Find a mostly untested patch which implements this below. I just booted it >in a 64bit guest and it did not explode. > >It removes 55 lines of code instead of adding 35 and reduces the binary >size by 408 bytes on 64bit and 128 bytes on 32bit. > >Note, it's a combo of changes (including your patch 1/6) and needs to be >split up. It would be nice if you have time to split it up into separate >patches, add proper changelogs and test the heck out of it on both 32 and >64 bit. If you don't have time, please let me know. I tried to test mem hotplug with this applied. On x86_64, this looks good. It split ranges well. While I found some problem on testing mem hotplug on x86_32. I start up a guest memory and trying to plug 1G memory. The original memory split range looks good: [ 0.004260] ywtest: [mem 0x00000000-0x00100000] [ 0.004261] ywtest: [mem 0x00000000-0x000fffff] page size 4k [ 0.004268] ywtest: [mem 0x37200000-0x37400000] [ 0.004269] ywtest: [mem 0x37200000-0x373fffff] page size 2M [ 0.004271] ywtest: [mem 0x20000000-0x37200000] [ 0.004272] ywtest: [mem 0x20000000-0x371fffff] page size 2M [ 0.004280] ywtest: [mem 0x00100000-0x20000000] [ 0.004281] ywtest: [mem 0x00100000-0x001fffff] page size 4k [ 0.004281] ywtest: [mem 0x00200000-0x1fffffff] page size 2M [ 0.004292] ywtest: [mem 0x37400000-0x375fe000] [ 0.004293] ywtest: [mem 0x37400000-0x375fdfff] page size 4k While I can't online the new added memory device. And the new memory device's range is out of 4G, which is a little bit strange. > >Thanks, > > tglx > -- Wei Yang Help you, Help me