Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3402107imm; Sun, 1 Jul 2018 20:54:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfU/wz4kp25Bn28K0drRUjSPQ2I8lwl1V7J42x77LMzmMJKBp+aogJL+D6c5tpyTvdWPiXp X-Received: by 2002:a65:5784:: with SMTP id b4-v6mr20642953pgr.315.1530503693733; Sun, 01 Jul 2018 20:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530503693; cv=none; d=google.com; s=arc-20160816; b=stfwq8OL6faA5lNAAnin10Q/dxCdYjtGQzcOfH27CR6hy1KiPF0ahcgzMdjPKa6ac2 wd2aSV3kqGllLVZHXLqFJs1LGLp0A4v/6BCRvd7P9/BYCsZUMgxZYzk7U1TyfZnEDr7J ZxuiQBs7WcVJ2j8fLVBAR9PpBiFVS2kyWWdz2NSXu2FitaGclcOzDgqMKwK3t8w5n8d8 CmQmJNfkWduYmr8cTd+kY74WrwVujMJVgisGvN4SaewhCWkJOV4gjX9J1s7k7tLLVT+l GeGPWCGnyGeODQp2kWwYMMO8wAQ5XiBxkJLxm82Wi57KwGIXJcDaQq8B48YnJhJbAe/b 3RIQ== 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=wvHhgbO4yKNSAVhGyD4ISzgT3jQhv5ogNGTPOXGBynY=; b=aqODvPrJmKeCyJeOKwfBFBhHV1wEJAUtG96S3iuclGoeQUA50eHEnZX6BZ7ftlZslf XS0uPZ+rGiWI/UX3BpQiBT/WBGbM0KLyH5NG/pJyyOae/WO0Oc5O95EGv70FGzJ5yKmS Z5cQpbZE0dtzJoBVrWQtQUv9+2A9FtO14GWOxWecogbxvZK44D2ge9IapD6jeicxtdjX 0JECqSK+lDhn2KdBC74IpRv7P8vPruE4Gsdh7Ua0M1ul2f0+DyCtYi1KLLA/r9f78+jz nNSaCRj8ecucAPSU85e/8hFMhgNHpklMmTzSvZSWE1O+Z2HZdi2mUGCnFqRhgKiz36Ho /k4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=fVfpknOI; 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 m4-v6si13006196pgp.512.2018.07.01.20.54.39; Sun, 01 Jul 2018 20:54:53 -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=fVfpknOI; 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 S933108AbeGBD2o (ORCPT + 99 others); Sun, 1 Jul 2018 23:28:44 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:33748 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752937AbeGBD2k (ORCPT ); Sun, 1 Jul 2018 23:28:40 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w623P0ZB159052 for ; Mon, 2 Jul 2018 03:28:40 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=wvHhgbO4yKNSAVhGyD4ISzgT3jQhv5ogNGTPOXGBynY=; b=fVfpknOIb5To4pRQivqxmGW+iv1wEbVbQLZ3NG0xfaPPxhDv5ZCpfS/MGHnftOvrGYRn +vUVg9zNw4L6EuMZ3zDtfU7RqYTY2bM+dQUWKXagFNe2gR8MDIEjfPXTfkvyHoB+EjOk /c/ii/OeHtWFWpiOFhAE1MdP+Si7pFFdIZeK+DiZwilv3M2AHBCEqjL+/So1n5fXvcXw ntJGAKcoXIyiFjg8JkDyfjizfV9cM0suuXV+3KL0SpAStaDaIJ3nFl/xcZBCoNQyqqnF 9QetuzebVb93h7KBbSUo1IOixHxWYlDcUqY17f28xW0vYsSz4svhw+An/EpZMg3lTsUa JA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2jx1tntp6y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 02 Jul 2018 03:28:40 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w623ScgA009967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 2 Jul 2018 03:28:39 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w623ScjV016462 for ; Mon, 2 Jul 2018 03:28:38 GMT Received: from mail-oi0-f51.google.com (/209.85.218.51) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 01 Jul 2018 20:28:38 -0700 Received: by mail-oi0-f51.google.com with SMTP id m2-v6so5793744oim.12 for ; Sun, 01 Jul 2018 20:28:38 -0700 (PDT) X-Gm-Message-State: APt69E3IZkvyvqkU+aW6jq4oRzKgzOtbEKMORDID7aS8MPNG0ZdzVm8j 4k1CJR/ZOtGk3c2bCZzCrrTFUHNAjzWt5ZWlXIo= X-Received: by 2002:aca:da88:: with SMTP id r130-v6mr8862450oig.163.1530502118146; Sun, 01 Jul 2018 20:28:38 -0700 (PDT) MIME-Version: 1.0 References: <20180702020417.21281-1-pasha.tatashin@oracle.com> <20180702020417.21281-2-pasha.tatashin@oracle.com> <20180702021121.GL3223@MiWiFi-R3L-srv> <20180702023130.GM3223@MiWiFi-R3L-srv> <20180702025343.GN3223@MiWiFi-R3L-srv> <20180702031417.GP3223@MiWiFi-R3L-srv> In-Reply-To: <20180702031417.GP3223@MiWiFi-R3L-srv> From: Pavel Tatashin Date: Sun, 1 Jul 2018 23:28:01 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/2] mm/sparse: add sparse_init_nid() To: bhe@redhat.com Cc: Steven Sistare , Daniel Jordan , LKML , Andrew Morton , kirill.shutemov@linux.intel.com, Michal Hocko , Linux Memory Management List , dan.j.williams@intel.com, jack@suse.cz, jglisse@redhat.com, Souptick Joarder , gregkh@linuxfoundation.org, Vlastimil Babka , Wei Yang , dave.hansen@intel.com, rientjes@google.com, mingo@kernel.org, osalvador@techadventures.net Content-Type: text/plain; charset="UTF-8" X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8941 signatures=668704 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=3 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=573 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807020039 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > So, on the first failure, we even stop trying to populate other > > sections. No more memory to do so. > > This is the thing I worry about. In old sparse_mem_maps_populate_node() > you can see, when not present or failed to populate, just continue. This > is the main difference between yours and the old code. The key logic is > changed here. > I do not see how we can succeed after the first failure. We still allocate from the same node: sparse_mem_map_populate() may fail only if we could not allocate large enough buffer vmemmap_buf_start earlier. This means that in: sparse_mem_map_populate() vmemmap_populate() vmemmap_populate_hugepages() vmemmap_alloc_block_buf() (no buffer, so call allocator) vmemmap_alloc_block(size, node); __earlyonly_bootmem_alloc(node, size, size, __pa(MAX_DMA_ADDRESS)); memblock_virt_alloc_try_nid_raw() -> Nothing changes for this call to succeed. So, all consequent calls to sparse_mem_map_populate() in this node will fail as well. > > > Forgot mentioning it's the vervion in mm/sparse-vmemmap.c Sorry, I do not understand what is vervion. Thank you, Pavel