Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp753267imm; Wed, 10 Oct 2018 03:53:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV63aTsCTjJene5nSwsFGtH9aX0ihYYbX34bXplBiZCFym1ClHpPQRdWFPrMSZ0cNccQiAkJc X-Received: by 2002:a63:6a86:: with SMTP id f128-v6mr29705662pgc.165.1539168796115; Wed, 10 Oct 2018 03:53:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539168796; cv=none; d=google.com; s=arc-20160816; b=L9cL73xcwhnb0tF9uRd/WtDGC1AZhqTrgzM4JXne+841uSbjZ9BAs7oDsqg5QDD7CL 69JP4qZlSOxX/LMhGZvAJutv02kxzrXJcZpJnJQUSeJlI2iEIQUueJ8OcUXV/TMMCHx/ 36/EQ61ZG11tLw6DseoL+bCtYVyDE3wTWQ8zjzxqGl/GKo+evmgNxv+7M5gjkXteUY/e va7DXmGmxBdfxEMbBdVoUfrFPKROqyf9lKQJG9Zn27BnpZixlVj9DMrSUzYKSU2MpRX3 ifB2ES8LlatZ0xGQsV6TooON1kwIygp5sZkZb5/0MXu5Pbjyb6CEka0NTUjwQKdlh/i4 6Dnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=dZ7GKxdvsxpG4fYT9fv9h5SNms6Il3DMZ/M9ryEIzAU=; b=YzyOwOkGwORqFR877UN3bUB3sIYjS/Zu7gCzKMLX2obqfogiJ/PAubzvkNpWM/KfBU 5DiDcgqjvMb81wlN69EyiqwV1vmP3yRf0G9tS+M+JCZB8rR7gSiBaV+CwaPlUluVDgsF i60s3SSkjcWLu6GtJpQ7bonuSohXEzqQB6lmMz96aloTC8AQuhDh3OrOzS4pcfvn4gxJ yRUXIBaqYNHiSJC/pRwiAGa/mErF3mRmiRy/UtzRPGTyySmvCxnGfdaTuJZkUuncXk0W WlydjwUd0N11mRyHugXIcpoQYz7Y0D6vL+uPuSM7Hjgu3h3tw8X9i1VYDUwtOQUgCHYi cMQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=eFAGrOs3; dkim=pass header.i=@codeaurora.org header.s=default header.b=DPw0CZwC; 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 y9-v6si24395345pgs.214.2018.10.10.03.53.01; Wed, 10 Oct 2018 03:53:16 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=eFAGrOs3; dkim=pass header.i=@codeaurora.org header.s=default header.b=DPw0CZwC; 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 S1726689AbeJJSMx (ORCPT + 99 others); Wed, 10 Oct 2018 14:12:53 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46500 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbeJJSMx (ORCPT ); Wed, 10 Oct 2018 14:12:53 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0376160C80; Wed, 10 Oct 2018 10:51:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539168678; bh=eBFiSE6DJN11KP37itxEDB1KVrkl8L0Q1O3ckUJ2Xfc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eFAGrOs3CCUjo+06lEV9Bf7pcQt2v3yhN7IQFoFaXhdSIXjUhgRo8A4rx8Azhz0ln Rty0FqU7ilO7PpkPMsJR/8peyhdFa4/7MzJVL38DJawnOc5og2MGCUgp6T2+Oybz94 bKjiwI4No8pdQsG2iDjluqX5XMPU2whgm6hjLOzw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id BD456601D4; Wed, 10 Oct 2018 10:51:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539168676; bh=eBFiSE6DJN11KP37itxEDB1KVrkl8L0Q1O3ckUJ2Xfc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DPw0CZwCrZFsiiP/ZoBKzYAU97CEx4EDF+93+DqkL5Apbc3oOa2ast6uHqRuGHyhp +H8UKwdP9Fyu21UuvGgMj03B+vc6I4YJLtI0ucAC6yNiWCQSXTAmSKFJ4jT5AJeDTL qOCnXsU+e0zpv+W/SaM3dDQcIBiR3mLYUqF7ZwAU= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 10 Oct 2018 16:21:16 +0530 From: Arun KS To: Oscar Salvador Cc: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, boris.ostrovsky@oracle.com, jgross@suse.com, akpm@linux-foundation.org, dan.j.williams@intel.com, mhocko@suse.com, vbabka@suse.cz, iamjoonsoo.kim@lge.com, gregkh@linuxfoundation.org, osalvador@suse.de, malat@debian.org, kirill.shutemov@linux.intel.com, jrdr.linux@gmail.com, yasu.isimatu@gmail.com, mgorman@techsingularity.net, aaron.lu@intel.com, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, xen-devel@lists.xenproject.org, vatsa@codeaurora.org, vinmenon@codeaurora.org, getarunks@gmail.com Subject: Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order In-Reply-To: <20181010080724.GA20338@techadventures.net> References: <1538727006-5727-1-git-send-email-arunks@codeaurora.org> <20181010080724.GA20338@techadventures.net> Message-ID: X-Sender: arunks@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-10-10 13:37, Oscar Salvador wrote: > On Fri, Oct 05, 2018 at 01:40:05PM +0530, Arun KS wrote: >> When free pages are done with higher order, time spend on >> coalescing pages by buddy allocator can be reduced. With >> section size of 256MB, hot add latency of a single section >> shows improvement from 50-60 ms to less than 1 ms, hence >> improving the hot add latency by 60%. Modify external >> providers of online callback to align with the change. > > Hi Arun, out of curiosity: > > could you please explain how exactly did you mesure the speed > improvement? diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index e379e85..2416136 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -690,9 +690,13 @@ static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, void *arg) { unsigned long onlined_pages = *(unsigned long *)arg; + u64 t1, t2; + t1 = local_clock(); if (PageReserved(pfn_to_page(start_pfn))) onlined_pages = online_pages_blocks(start_pfn, nr_pages); + t2 = local_clock(); + trace_printk("time spend = %llu us\n", (t2-t1)/(1000)); online_mem_sections(start_pfn, start_pfn + nr_pages); Regards, Arun > > Thanks