Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1735137imm; Thu, 19 Jul 2018 07:05:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcVakxDzF8J863K9vXJNr45jn8Uy5GdZFA2F9ySqAlJRk7TjrPF80nQuFx8dtft77jybHcZ X-Received: by 2002:a63:1546:: with SMTP id 6-v6mr10293350pgv.271.1532009152232; Thu, 19 Jul 2018 07:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532009152; cv=none; d=google.com; s=arc-20160816; b=0NGQeIJXcZ2IqzcOcNI3P5BRJs6MBq4v4cqht9gUq9/y1aoQJozzow4f1MctYHgIBG CdT2uHZ0UgJACbeoKIDbu6hy5uWzYS1D7uuQby08S/X1YY5AQSPedv3U0KBmYcf0QJXK pPxLJbIwc4DuQ1IOs6pNJZE+blorNM3JTgxfwrSW4a58dvAnhfB9w8YwJWOvQzZolCcM pvNeapZAoaa3Oo8gmqXkaLKsYbH5YKW1etDwb/nu6aGZbyJgod6QY2H6VrJxTjIYbb8/ UQbKEor49FnOtz6bwtmklcTrrJLcQe2uWm2okojQksWqr8Tly+ahMgCJE64TsmuBRHPp xKLQ== 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:message-id:subject:cc :to:from:date:arc-authentication-results; bh=gbFI6JQ/85K+eVwZz779IDBrNMHIhdTSFXXfoPurDYM=; b=VzyFwEcH1doTYE16siZn7ZzNttsKvXH+oXxpdjoIczvGajV0qPMvLVqt8V3oWcEImk b5pHkIw5qaOikfKB5R6AOihM0w3js/Ug/mvOcHBzbAWQ6Vj6NVvfopES8aMp69ZiVaNn TINQb1/6/KGBY4AwMVZOrJYe6mMx6hlCm2KhxpHRIb+ca+9Rd7Kju5WoM8Z6u7jla00C 2RkvhtO0LN0s6Lym8eh3WQ4M977MeNyw+63uvBKoljd99bNNCv3405CYhqClJP8OnwJ+ LnONL7Wx51bZjrHYDTZQXj5oBQzptKWTLWnudz7D3aYIigbfN7IMxdPPjzxlrAFO1hCT vQEA== 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 r7-v6si5712388pgn.491.2018.07.19.07.05.36; Thu, 19 Jul 2018 07:05:52 -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 S1731766AbeGSOqu (ORCPT + 99 others); Thu, 19 Jul 2018 10:46:50 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:38407 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727575AbeGSOqu (ORCPT ); Thu, 19 Jul 2018 10:46:50 -0400 Received: by mail-wm0-f67.google.com with SMTP id 69-v6so6514846wmf.3 for ; Thu, 19 Jul 2018 07:03:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gbFI6JQ/85K+eVwZz779IDBrNMHIhdTSFXXfoPurDYM=; b=qsQbk4rlvR6slcXb5aG7IE9BFRelq29+1fkh8EBfvQfexDag+LMwWEngAXN0J7ofc7 ITJoicz0FxHo8lBVhoNEqoxuz6e2q+hcVqrVJTze8hs+aCaToVxzQMG+W9ZXWfMC3Ixi m71sMyXyfn4hVAq8AhdbJtHWhtlYfo/HPfEPb+3kJfhe9YLKXOnVgchmt6qE99pG2JgV tpOVk3jUfuGpyB8bx5Ey+UJOhnWyrKYeSRRC0xJMfJ/2fE/O5vRP5PfcTH3Gtvj9L55x TtD7vhY9qZYGJC8NTyVSpTOmy6zqMpKpNZgTi6HFKwGjKiBXscjnfWlDk6U1g9Dyqgb8 c8iA== X-Gm-Message-State: AOUpUlEr/Qizs+D1cQEBYC6cKV9/SnwRBRxpC2AmR7KW5vfSB0GzT7Fi Mhjk0tM/pbVV8wM+GX+TQt0= X-Received: by 2002:a1c:9e89:: with SMTP id h131-v6mr4170306wme.13.1532009009299; Thu, 19 Jul 2018 07:03:29 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id q1-v6sm9720936wrw.42.2018.07.19.07.03.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 07:03:28 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id 02BF412418D; Thu, 19 Jul 2018 16:03:27 +0200 (CEST) Date: Thu, 19 Jul 2018 16:03:27 +0200 From: Oscar Salvador To: Michal Hocko Cc: akpm@linux-foundation.org, pasha.tatashin@oracle.com, vbabka@suse.cz, aaron.lu@intel.com, iamjoonsoo.kim@lge.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Oscar Salvador Subject: Re: [PATCH v2 3/5] mm/page_alloc: Optimize free_area_init_core Message-ID: <20180719140327.GB10988@techadventures.net> References: <20180719132740.32743-1-osalvador@techadventures.net> <20180719132740.32743-4-osalvador@techadventures.net> <20180719134417.GC7193@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180719134417.GC7193@dhcp22.suse.cz> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 03:44:17PM +0200, Michal Hocko wrote: > On Thu 19-07-18 15:27:38, osalvador@techadventures.net wrote: > > From: Oscar Salvador > > > > In free_area_init_core we calculate the amount of managed pages > > we are left with, by substracting the memmap pages and the pages > > reserved for dma. > > With the values left, we also account the total of kernel pages and > > the total of pages. > > > > Since memmap pages are calculated from zone->spanned_pages, > > let us only do these calculcations whenever zone->spanned_pages is greather > > than 0. > > But why do we care? How do we test this? In other words, why is this > worth merging? Uhm, unless the values are going to be updated, why do we want to go through all comparasions/checks? I thought it was a nice thing to have the chance to skip that block unless we are going to update the counters. Again, if you think this only adds complexity and no good, I can drop it. Thanks -- Oscar Salvador SUSE L3