Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7576945imm; Thu, 28 Jun 2018 06:09:29 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeHjS7g/GF4pthnd+/rZ4JFshcGHduQHfnCs23HDYu42FELPLbe0zt6XgJljaN0KdsDB6dY X-Received: by 2002:a65:6301:: with SMTP id g1-v6mr555352pgv.324.1530191369545; Thu, 28 Jun 2018 06:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530191369; cv=none; d=google.com; s=arc-20160816; b=A8SCDyHWEEewtsmepgqRieLrMoZ4Zk11Z7ajh6V7MTPTuoRkPX667YyceDktIbFxgL IeV24WQddRwL+EygC4sJjijzU8c0rpt6RHQIXTwv7RnkEw/Rmy+hVaCO2p3KPx0JYkJW 8DxZxi57DEFz98nInEfxZ0OMspDg7K+3y53iaVMMC8W8MryEK4hibnr/Uon/+drMGlGq SI7/5Bo/60bpiEBNUfB+UgiudmTATOt17VhvIU2S15+s9Tk06xeKEQwBIOrrUeRrj7g1 o1iDIP3dWYsZPvL4uft3tA+3MgVkuxxRuKOF6zc1369diZbpCsjuuKUfOthwKNSp86Dm WSiA== 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=pTAd3Wifb2BTH9k7e9mrDEK3qwXFVKZqKh06WYoypd8=; b=prZ96ILKpPO8Pls39esYFTLEVz5FGL8SQuZXDHcGtSX+NumU3itK8qPGNja4tYnfDR 1wL8YAo35rmafAgCMOpnqxUjdnJ/vyRvJ/fdyCwPOD75VvTJOHmHWGcKXqzHP1ZhVcCk esWvPN75+OWwLCCirpROno35uEcKMYbh/hJ6+T8AbNv+XSga3aUeXCDc7rXs7qjF9q/I fMrwSQx8R8siNeu6Vjp2AMm9n4dNT0s1h/zDW6yrXB3eQBpmw6Jj0wSZrqErA+C7oljk NXQ7C4mRFQ9boofi56RLglkEd7K6vUiFNCJVzEpyms9c2wNbiMwNRf1imOV84oyU5O2f s6xQ== 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 1-v6si6325015plv.16.2018.06.28.06.09.10; Thu, 28 Jun 2018 06:09:29 -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 S965788AbeF1NIJ (ORCPT + 99 others); Thu, 28 Jun 2018 09:08:09 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38274 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964854AbeF1NIH (ORCPT ); Thu, 28 Jun 2018 09:08:07 -0400 Received: by mail-wr0-f193.google.com with SMTP id e18-v6so5466229wrs.5 for ; Thu, 28 Jun 2018 06:08:07 -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=pTAd3Wifb2BTH9k7e9mrDEK3qwXFVKZqKh06WYoypd8=; b=k2GnUgBaR2XFzh0s90gE3BKoZS8C2MuYT+Tco5ADMKEYzwflCn90HGsC4VNrGylToC xaB2/MGgvIhLx8BTtOM7bDLaVi1JIiK1fv4CwsIeG7hHgu24ykyuKJNAoyzvT99MScSv W2Plvmx16Y2WwEFG0JNEzXP/L9JX0nMMK/uz7WDYKCLyttzIj9oulapUWJRFpNCbQqre KeUmsVt/YDbRuJ2yvmg7ri/vyePUQVIw/7xpSC9FUdymK1PKpNgf4UqFufhRnXxVi5Nu mZDDum62uWm7FY+O4NiWNBDpl+ITH0UAaIKB+O9GXDk2wtTDTltBqM0LzhsqMtRjRg39 ytPg== X-Gm-Message-State: APt69E2AGMlnaawoob9kSYBrhjseqs+klUE9u0AwNvbtY79foK6wYR0H 5FYDxIydKvOfA6vsHozs8a0= X-Received: by 2002:adf:81c5:: with SMTP id 63-v6mr5821027wra.88.1530191286530; Thu, 28 Jun 2018 06:08:06 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id k17-v6sm7717428wrp.19.2018.06.28.06.08.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 06:08:05 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id A2C3D123918; Thu, 28 Jun 2018 15:08:04 +0200 (CEST) Date: Thu, 28 Jun 2018 15:08:04 +0200 From: Oscar Salvador To: Baoquan He Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, pagupta@redhat.com, Pavel Tatashin , linux-mm@kvack.org, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v6 3/5] mm/sparse: Add a new parameter 'data_unit_size' for alloc_usemap_and_memmap Message-ID: <20180628130804.GA13985@techadventures.net> References: <20180628062857.29658-1-bhe@redhat.com> <20180628062857.29658-4-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180628062857.29658-4-bhe@redhat.com> 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, Jun 28, 2018 at 02:28:55PM +0800, Baoquan He wrote: > alloc_usemap_and_memmap() is passing in a "void *" that points to > usemap_map or memmap_map. In next patch we will change both of the > map allocation from taking 'NR_MEM_SECTIONS' as the length to taking > 'nr_present_sections' as the length. After that, the passed in 'void*' > needs to update as things get consumed. But, it knows only the > quantity of objects consumed and not the type. This effectively > tells it enough about the type to let it update the pointer as > objects are consumed. > > Signed-off-by: Baoquan He > Reviewed-by: Pavel Tatashin Reviewed-by: Oscar Salvador -- Oscar Salvador SUSE L3