linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oscar Salvador <osalvador@techadventures.net>
To: David Hildenbrand <david@redhat.com>
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 <osalvador@suse.de>
Subject: Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions
Date: Wed, 17 Oct 2018 11:33:31 +0200	[thread overview]
Message-ID: <20181017093331.GA25724@techadventures.net> (raw)
In-Reply-To: <d0a12eb5-3824-8d25-75f8-3e62f1e81994@redhat.com>

> >  	/*
> >  	 * 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

  reply	other threads:[~2018-10-17  9:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 15:30 [PATCH 0/5] Do not touch pages/zones during hot-remove path Oscar Salvador
2018-10-15 15:30 ` [PATCH 1/5] mm/memory_hotplug: Add nid parameter to arch_remove_memory Oscar Salvador
2018-11-12 18:52   ` Pavel Tatashin
2018-10-15 15:30 ` [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions Oscar Salvador
2018-10-16  8:55   ` David Hildenbrand
2018-10-17  9:33     ` Oscar Salvador [this message]
2018-10-17  9:45       ` David Hildenbrand
2018-10-18  6:57         ` Oscar Salvador
2018-11-12 19:14   ` Pavel Tatashin
2018-11-12 19:21   ` Dan Williams
2018-11-12 21:28     ` Pavel Tatashin
2018-11-16 13:06       ` osalvador
2018-11-16 13:03     ` osalvador
2018-10-15 15:30 ` [PATCH 3/5] mm/memory_hotplug: Check for IORESOURCE_SYSRAM in release_mem_region_adjustable Oscar Salvador
2018-10-16  9:54   ` David Hildenbrand
2018-11-12 19:27   ` Pavel Tatashin
2018-10-15 15:30 ` [PATCH 4/5] mm/memory_hotplug: Move zone/pages handling to offline stage Oscar Salvador
2018-10-15 15:30 ` [PATCH 5/5] mm/memory-hotplug: Rework unregister_mem_sect_under_nodes Oscar Salvador
2018-10-18 14:24   ` Jonathan Cameron
2018-10-18 15:02     ` Oscar Salvador
2018-10-18 15:38       ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181017093331.GA25724@techadventures.net \
    --to=osalvador@techadventures.net \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=david@redhat.com \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=malat@debian.org \
    --cc=mhocko@suse.com \
    --cc=osalvador@suse.de \
    --cc=pavel.tatashin@microsoft.com \
    --cc=rafael@kernel.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=yasu.isimatu@gmail.com \
    --subject='Re: [PATCH 2/5] mm/memory_hotplug: Create add/del_device_memory functions' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).