Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp432292imm; Wed, 17 Oct 2018 02:34:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV61PuA+krYyttByNNi/8qixRLig13H9Zs/SrPuP3Zkz0PqkmKFLlGszVEehpTHPm/IDZG8bz X-Received: by 2002:a63:8b43:: with SMTP id j64-v6mr967922pge.68.1539768856251; Wed, 17 Oct 2018 02:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539768856; cv=none; d=google.com; s=arc-20160816; b=PMn3/W9iV2/9a/N/AR8fdwhYwboSX7L5jDwAOanWAD88/U/kWoOxSaQEyDdx9eOO0h FXQEwhptLZisn04qgLoyLzu8bVVRAfnlleukLKjz3B1REniI6fOkBFcrh3TVsyXHxxHC biSO/DD9D/t1Z0fv97roIjS4m+pUd8REf3r6PLR9/Q+tAyKT8mmtEFtLe2qUwRFmp09m y+sjcQ2vX2DD2tNX+EGDNfc82OGrNm/nEtSKhFmDraE5bgVY4J1OJcgjbF4sUd7WzuUh xdy61gzE7Ej8/lEPsbzsg0+bgvzmjcuPNZtyar0BYio4d0fOINse5NOGMVEqQjyYsxmt f9iQ== 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; bh=8NWKvPBEgnJ+ukZLy12IRpoW4u88DekVuBxWeZE7qN8=; b=FwWnoot1Xk8WL/ZcyO+Dwbyo8xbgi3F61pvQ+2mnhoUi3bDQRxFxZoNZ0o1AldH5u+ QuwNXg1qp8Qa2hai+JEJTSVGVb+AuwcnrdV16SVaL8iN7mgu6SIXejRD9spA17x1lfka 9tehPHHiI2VvODUOdNlyacVZ6xTVmGU/92jx+lEjKh6FVcurME6DGmxZMDRHqrTJr9/J 6BNcS08iaYVrZTDVIJrEMoAx8dXA+7e4SFYvUhTtymyaBtk84v1JoQTSQSakEgl5UFe8 9CDbGVGCZuUvSWVa4O/fXWZUxQJmujVZDcks/1lPNJ8bWo+plFO8tJLgtjo/O75cazm3 oi4g== 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 v11-v6si15067191pgl.40.2018.10.17.02.34.00; Wed, 17 Oct 2018 02:34: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; 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 S1726964AbeJQR2Z (ORCPT + 99 others); Wed, 17 Oct 2018 13:28:25 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38546 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726727AbeJQR2Y (ORCPT ); Wed, 17 Oct 2018 13:28:24 -0400 Received: by mail-wm1-f65.google.com with SMTP id 193-v6so1389119wme.3 for ; Wed, 17 Oct 2018 02:33:33 -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=8NWKvPBEgnJ+ukZLy12IRpoW4u88DekVuBxWeZE7qN8=; b=gthxv2mZZZYL8wpzArKJwKrPgJ0ygn3ZruasVSpLX1SVAIeg+95PNsNA6aEQRu7f4/ AO7m7EzcByIxhKGSlPYUx07rreLKNfX/h7zCUzBKUGsTwTPSywLdp+OXxJlU/4GU+7ih H+xFq2ELjHodY3THywqOl9Vm6D4KBnjByJMplIkFLaZbLnxFhuLwFJfXqVXcq6+RDET9 n/k8gtJiRiJjFJ4EhvpXt7vC3rvoV8vFSyo3ZDRSPNmamyxOjeH8b9Zb6zh/WXfzMPiX PJ7sHCdJyQ8qPBhT3gvl1HAPfQsVSc+VPgtJ8AKT3QJKwaS/GYYDynuYRMINWPmKZuz4 EHMQ== X-Gm-Message-State: ABuFfoioegfAM3RAbDd8bGBbiSz1XMyWrDB0RTATOAtvbaEJi+3GSs/B CLdEo8Y6Yb73dqRP4onZLM8= X-Received: by 2002:a1c:ee8d:: with SMTP id j13-v6mr2013558wmi.125.1539768812834; Wed, 17 Oct 2018 02:33:32 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id g10-v6sm13814446wrv.49.2018.10.17.02.33.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 02:33:32 -0700 (PDT) Received: by techadventures.net (Postfix, from userid 1000) id 7AEFB1259B4; Wed, 17 Oct 2018 11:33:31 +0200 (CEST) Date: Wed, 17 Oct 2018 11:33:31 +0200 From: Oscar Salvador To: David Hildenbrand Cc: akpm@linux-foundation.org, mhocko@suse.com, dan.j.williams@intel.com, yasu.isimatu@gmail.com, rppt@linux.vnet.ibm.com, malat@debian.org, linux-kernel@vger.kernel.org, pavel.tatashin@microsoft.com, jglisse@redhat.com, Jonathan.Cameron@huawei.com, rafael@kernel.org, dave.jiang@intel.com, linux-mm@kvack.org, alexander.h.duyck@linux.intel.com, Oscar Salvador Subject: Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions Message-ID: <20181017093331.GA25724@techadventures.net> References: <20181015153034.32203-1-osalvador@techadventures.net> <20181015153034.32203-3-osalvador@techadventures.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > /* > > * For device private memory we call add_pages() as we only need to > > * allocate and initialize struct page for the device memory. More- > > @@ -1096,20 +1100,17 @@ static int hmm_devmem_pages_create(struct hmm_devmem *devmem) > > * want the linear mapping and thus use arch_add_memory(). > > */ > > Some parts of this comment should be moved into add_device_memory now. > (e.g. we call add_pages() ...) I agree. > > +#ifdef CONFIG_ZONE_DEVICE > > +int del_device_memory(int nid, unsigned long start, unsigned long size, > > + struct vmem_altmap *altmap, bool mapping) > > +{ > > + int ret; > > nit: personally I prefer short parameters last in the list. I do not have a strong opinion here. If people think that long parameters should be placed at the end because it improves readability, I am ok with moving them there. > Can you document for both functions that they should be called with the > memory hotplug lock in write? Sure, I will do that in the next version, once I get some more feedback. > Apart from that looks good to me. Thanks for reviewing it David ;-)! May I assume your Reviewed-by here (if the above comments are addressed)? Thanks -- Oscar Salvador SUSE L3