Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1146914imm; Fri, 29 Jun 2018 12:13:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJo49y07KugHe5kYrk2BMgWbGkihp3SwmgjSlEmUMZIckUCVCV+sSVZWphrBpqJtXbBas4y X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr16168491plx.318.1530299616443; Fri, 29 Jun 2018 12:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530299616; cv=none; d=google.com; s=arc-20160816; b=siM9SQSsz+pytMYH0PLEpTa/MDBW0EhI3KvaxOHq8zpytesX9PAfAoS4UBDk9Wudgv IIYc4nr6rw/o+BjXSAuPL2eyG9YV0tIuJR+J0b07c8vCZZRSPhwkc+AwR62XHQSWADPv stNERLfsDfWPA1nb9Nze1J4PKoNuGUEoNxDz8tC3DMRWSKjQ0+Furu+iVtio/SOWUNiK 2YAo5X7QC6yazFt+aVnvIqJ4iVhukJGneYf5TlfGRSWhBb6KW5sVvF9CzD6e2+Aky14H Jabbddu4vvsm8yz254d1VjCeF6gzm/dCjr90QlEZCbBWXBd2PaEn7I24pHYbClDU+mam ewNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=gQVgpw0AOrDWl7OARgqJSMwACPY7ddyLJb32MmSyeWA=; b=Oez9nLAt3YS2yvBGbLzcMtu63DNh9nJfk3K12YXB0JAQGsisrOIqdDR1YophS0E262 fEjSk0do6K9dE+a5y0hrGXY1MNlu7H+26Zd/o7nT5uD4+eoj/yNMicfalDo7WNVUgJ+W Md7YGfwqQ2rn6GZKDY6u8C9qciFRZBycdpMa6jl1g3RmKkQFVNsMKWygjXWg6QAiwe0/ nhJrj3U6RCBL8uCPrAkbtqY23NpjpuDx19NZXtKpDQfqHN2vAM0zjuL579lgjatjXWmG cDmT5zD6IBXzSNCV3nrjdfRWMUDgNZgnObJv9gxXpXVid4JtbVMTdHND78MUIt361iiH gNvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=qENjSI96; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9-v6si8634718pgf.135.2018.06.29.12.13.21; Fri, 29 Jun 2018 12:13:36 -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=@oracle.com header.s=corp-2017-10-26 header.b=qENjSI96; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935171AbeF2TAQ (ORCPT + 99 others); Fri, 29 Jun 2018 15:00:16 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:39844 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932377AbeF2TAO (ORCPT ); Fri, 29 Jun 2018 15:00:14 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5TIwcIq146638 for ; Fri, 29 Jun 2018 19:00:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=corp-2017-10-26; bh=gQVgpw0AOrDWl7OARgqJSMwACPY7ddyLJb32MmSyeWA=; b=qENjSI96ACsOxqloAP3BFax1MOsintmvx4Q0JkZa9F+Y4RJDMtDJJGTm6tabvx7v3A+V kFaCBfxNoOAj9cR32//9tBQHTR90vYKGZp73Pxt74DyX7luiaHGy0eHXj8pIZ3Fjcvul Oa3vJk4zrBZWaZm9+VGQr6G9tGF/ITyr6kqrI9C5iuKPs5jAsLUVOGVBQ3dNf4y1qTpu F1jj7uWBtz7tlDNffqu8AcEi3p5Y2Q0uUpCeOKVUd0s46cql66+/A/2ipQ68QFIzENkY gXFXh6EOq7V4K8yq6pt2qGkB1j1B+TLw/4lheIu4Zr8Jx9wnmOQuOsqhBP/9zMxYYuYM mw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2jukmu7r3r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 29 Jun 2018 19:00:13 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5TJ0CVP019363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 29 Jun 2018 19:00:12 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5TJ0Crw008539 for ; Fri, 29 Jun 2018 19:00:12 GMT Received: from mail-oi0-f48.google.com (/209.85.218.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 29 Jun 2018 12:00:12 -0700 Received: by mail-oi0-f48.google.com with SMTP id n84-v6so9356375oib.9 for ; Fri, 29 Jun 2018 12:00:12 -0700 (PDT) X-Gm-Message-State: APt69E0D9hZFJoWnbo6qJcaz686XKv8DCEl1VaCx9rJpGGmQ2NBED8QI AW3ZrRItxmncNtMPapwcfYUGu02qGlqKr3TNG1w= X-Received: by 2002:aca:db0a:: with SMTP id s10-v6mr9493793oig.339.1530298811618; Fri, 29 Jun 2018 12:00:11 -0700 (PDT) MIME-Version: 1.0 References: <20180627013116.12411-1-bhe@redhat.com> <20180627013116.12411-5-bhe@redhat.com> <88f16247-aea2-f429-600e-4b54555eb736@intel.com> <7ad120fb-377b-6963-62cb-a1a5eaa6cad4@intel.com> In-Reply-To: <7ad120fb-377b-6963-62cb-a1a5eaa6cad4@intel.com> From: Pavel Tatashin Date: Fri, 29 Jun 2018 14:59:35 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 4/4] mm/sparse: Optimize memmap allocation during sparse_init() To: dave.hansen@intel.com Cc: bhe@redhat.com, LKML , Andrew Morton , pagupta@redhat.com, Linux Memory Management List , kirill.shutemov@linux.intel.com Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8939 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=315 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806290202 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > This is done so nr_consumed_maps does not get out of sync with the > > current pnum. pnum does not equal to nr_consumed_maps, as there are > > may be holes in pnums, but there is one-to-one correlation. > Can this be made more clear in the code? Absolutely. I've done it here: http://lkml.kernel.org/r/20180628173010.23849-1-pasha.tatashin@oracle.com Pavel