[PATCH 0/2] drm: udl fixes

2019-03-22 Thread Reza Arbab
These fixes were needed to bring my udl devices to life on v5.1-rc1. Reza Arbab (2): drm/udl: Fix off-by-one error in udl_get_edid() drm/fb-helper: Do not scale depth down to 0 drivers/gpu/drm/drm_fb_helper.c | 6 +- drivers/gpu/drm/udl/udl_connector.c | 2 +- 2 files changed, 6

Re: [PATCH v2 0/4] Small cleanup for memoryhotplug

2018-06-22 Thread Reza Arbab
On Thu, Jun 21, 2018 at 10:32:58AM +0200, Michal Hocko wrote: [Cc Reza Arbab - I remember he was able to hit some bugs in memblock registration code when I was reworking that area previously] Thanks for the heads-up! I have verified that this patchset doesn't seem to cause any regressio

Re: [PATCH v2 4/5] mm: memory_hotplug: Add memory hotremove probe device

2017-12-04 Thread Reza Arbab
000 0x0 0x4000>; hotpluggable; : } This is subtly different from the earlier example. This memory IS present at boot. The hotpluggable property ensures that it resides in ZONE_MOVABLE so it can potentially be removed. -- Reza Arbab

[PATCH] mm/migrate: Fix early increment of migrate->npages

2017-10-02 Thread Reza Arbab
The intention here is to set the same array element in src and dst. Switch the order of these lines so that migrate->npages is only incremented after we've used it. Fixes: 8315ada7f095 ("mm/migrate: allow migrate_vma() to alloc new page on empty entry") Cc: Jérôme Glisse S

Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory

2017-09-26 Thread Reza Arbab
On Tue, Sep 26, 2017 at 04:32:41PM +, Michal Hocko wrote: On Tue 26-09-17 09:47:10, Reza Arbab wrote: On Tue, Sep 26, 2017 at 01:37:07PM +, Michal Hocko wrote: > On Fri 22-09-17 15:13:56, Reza Arbab wrote: > > The move_pages() syscall can be used to find the numa node whe

Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory

2017-09-26 Thread Reza Arbab
On Tue, Sep 26, 2017 at 01:37:07PM +, Michal Hocko wrote: On Fri 22-09-17 15:13:56, Reza Arbab wrote: The move_pages() syscall can be used to find the numa node where a page currently resides. This is not working for device public memory pages, which erroneously report -EFAULT (unmapped or

Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory

2017-09-22 Thread Reza Arbab
On Fri, Sep 22, 2017 at 08:31:57PM +, Reza Arbab wrote: On Fri, Sep 22, 2017 at 08:13:56PM +, Reza Arbab wrote: The move_pages() syscall can be used to find the numa node where a page currently resides. This is not working for device public memory pages, which erroneously report -EFAULT

Re: [PATCH] mm/device-public-memory: Enable move_pages() to stat device memory

2017-09-22 Thread Reza Arbab
On Fri, Sep 22, 2017 at 08:13:56PM +, Reza Arbab wrote: The move_pages() syscall can be used to find the numa node where a page currently resides. This is not working for device public memory pages, which erroneously report -EFAULT (unmapped or zero page). Argh. Please disregard this patch

[PATCH] mm/device-public-memory: Enable move_pages() to stat device memory

2017-09-22 Thread Reza Arbab
be done unconditionally, but adding a flag seems like a safer change. Cc: Jérôme Glisse Signed-off-by: Reza Arbab --- include/linux/mm.h | 1 + mm/gup.c | 2 +- mm/migrate.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux

[PATCH] mm/device-public-memory: Fix edge case in _vm_normal_page()

2017-09-22 Thread Reza Arbab
0b184] system_call+0x58/0x6c The pfn causing this is the very last one. Correct the bounds check accordingly. Fixes: df6ad69838fc ("mm/device-public-memory: device memory cache coherent with CPU") Cc: Jérôme Glisse Signed-off-by: Reza Arbab --- mm/memory.c | 2 +- 1 file changed, 1

Re: [PATCH 2/2] mm, memory_hotplug: remove zone restrictions

2017-07-14 Thread Reza Arbab
kernel and movable online type explicitly and MMOP_ONLINE_KEEP becomes a catch all default behavior. Acked-by: Joonsoo Kim Acked-by: Reza Arbab Cc: Signed-off-by: Michal Hocko -- Reza Arbab

Re: [PATCH] mm, memory_hotplug: support movable_node for hotplugable nodes

2017-06-15 Thread Reza Arbab
is usually a full node though (except for Node0 which is special and never goes away completely). If this turns out to be a problem in the real life we can tweak the code to store hotplug flag into memblocks but let's keep this simple now. Signed-off-by: Michal Hocko Acked-by: Reza Arbab -- Reza Arbab

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-06-01 Thread Reza Arbab
if (nid < 0) + continue; + + node_set(nid, node_possible_map); + } + for_each_online_node(nid) { unsigned long start_pfn, end_pfn; -- Reza Arbab

Re: [RFC PATCH] mm, memory_hotplug: support movable_node for hotplugable nodes

2017-06-01 Thread Reza Arbab
On Thu, Jun 01, 2017 at 06:14:54PM +0200, Michal Hocko wrote: On Thu 01-06-17 11:02:28, Reza Arbab wrote: On Thu, Jun 01, 2017 at 02:20:04PM +0200, Michal Hocko wrote: >Teach move_pfn_range that MMOP_ONLINE_KEEP can use the movable zone if >movable_node is enabled and the range doesn

Re: [RFC PATCH] mm, memory_hotplug: support movable_node for hotplugable nodes

2017-06-01 Thread Reza Arbab
On Thu, Jun 01, 2017 at 05:52:31PM +0200, Michal Hocko wrote: On Thu 01-06-17 10:47:46, Reza Arbab wrote: On Thu, Jun 01, 2017 at 05:38:38PM +0200, Michal Hocko wrote: >On Thu 01-06-17 10:19:36, Reza Arbab wrote: >>The x86 SRAT (or the dt, on other platforms) can describe

Re: [RFC PATCH] mm, memory_hotplug: support movable_node for hotplugable nodes

2017-06-01 Thread Reza Arbab
t. If your distro has some auto-onlining udev rule like SUBSYSTEM=="memory", ACTION=="add", ATTR{state}=="offline", ATTR{state}="online" You could get things onlined as movable just by putting movable_node in the boot params, without changing/modifying the rule. -- Reza Arbab

Re: [RFC PATCH] mm, memory_hotplug: support movable_node for hotplugable nodes

2017-06-01 Thread Reza Arbab
On Thu, Jun 01, 2017 at 05:38:38PM +0200, Michal Hocko wrote: On Thu 01-06-17 10:19:36, Reza Arbab wrote: The x86 SRAT (or the dt, on other platforms) can describe memory as hotpluggable. See memblock_mark_hotplug(). That's only for memory present at boot, though. Yes but lose

Re: [RFC PATCH] mm, memory_hotplug: support movable_node for hotplugable nodes

2017-06-01 Thread Reza Arbab
it is by definition hotpluggable. There's no need to check for that marking/description. -- Reza Arbab

Re: [PATCH 3/3] mm, memory_hotplug: move movable_node to the hotplug proper

2017-05-30 Thread Reza Arbab
memory_hotplug. To make it more entertaining the kernel parameter is ignored unless CONFIG_HAVE_MEMBLOCK_NODE_MAP=y because we do not have the node information for each memblock otherwise. So let's warn when the option is disabled. Acked-by: Reza Arbab -- Reza Arbab

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-26 Thread Reza Arbab
On Fri, May 26, 2017 at 01:46:58PM +1000, Michael Ellerman wrote: Reza Arbab writes: On Thu, May 25, 2017 at 04:19:53PM +1000, Michael Ellerman wrote: The commit message for 3af229f2071f says: In practice, we never see a system with 256 NUMA nodes, and in fact, we do not support node

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-25 Thread Reza Arbab
-email-bsinghar...@gmail.com -- Reza Arbab

Re: [RFC PATCH 2/2] mm, memory_hotplug: drop CONFIG_MOVABLE_NODE

2017-05-24 Thread Reza Arbab
cto always enabled. This shouldn't introduce any change to the semantic. Acked-by: Reza Arbab -- Reza Arbab

Re: [RFC PATCH 1/2] mm, memory_hotplug: drop artificial restriction on online/offline

2017-05-24 Thread Reza Arbab
I'm really liking all this cleanup of the memory hotplug code. Thanks! Much appreciated. Acked-by: Reza Arbab -- Reza Arbab

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-24 Thread Reza Arbab
On Tue, May 23, 2017 at 05:44:23PM -0500, Michael Bringmann wrote: On 05/23/2017 04:49 PM, Reza Arbab wrote: On Tue, May 23, 2017 at 03:05:08PM -0500, Michael Bringmann wrote: On 05/23/2017 10:52 AM, Reza Arbab wrote: On Tue, May 23, 2017 at 10:15:44AM -0500, Michael Bringmann wrote: +static

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-23 Thread Reza Arbab
On Tue, May 23, 2017 at 03:05:08PM -0500, Michael Bringmann wrote: On 05/23/2017 10:52 AM, Reza Arbab wrote: On Tue, May 23, 2017 at 10:15:44AM -0500, Michael Bringmann wrote: +static void setup_nodes(void) +{ +int i, l = 32 /* MAX_NUMNODES */; + +for (i = 0; i < l; i++) { +

Re: [HMM 12/15] mm/migrate: new memory migration helper for use with device memory v4

2017-05-23 Thread Reza Arbab
this patch. Migration to private device memory will be useful for device that have large pool of such like GPU, NVidia plans to use HMM for that. Acked-by: Reza Arbab -- Reza Arbab

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-23 Thread Reza Arbab
.kernel.org/r/1479253501-26261-1-git-send-email-bsinghar...@gmail.com (see patch 3/3) -- Reza Arbab

[PATCH] mm, vmstat: Remove spurious WARN() during zoneinfo print

2017-05-03 Thread Reza Arbab
as to warn of a situation that has since been enabled. Signed-off-by: Reza Arbab --- Aside: The "per-node stats" are still printed under the first populated zone, but that's not necessarily the first stanza any more. I'm not sure which criteria is more important with regard to

Re: [RFC HMM CDM 3/3] mm/migrate: memory migration using a device DMA engine

2017-04-10 Thread Reza Arbab
_dma_pages(migrate_ctx, NULL, 0, 0); + + migrate_ctx->ops->finalize_and_map(migrate_ctx); + + /* Unlock and remap pages */ + migrate_dma_finalize(migrate_ctx); + + return 0; +} +EXPORT_SYMBOL(migrate_dma); -- Reza Arbab

Re: [PATCH -v2 0/9] mm: make movable onlining suck less

2017-04-10 Thread Reza Arbab
ed-by: Reza Arbab -- Reza Arbab

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-06 Thread Reza Arbab
On Thu, Apr 06, 2017 at 05:41:28PM +0200, Michal Hocko wrote: On Thu 06-04-17 10:24:49, Reza Arbab wrote: On Thu, Apr 06, 2017 at 03:08:46PM +0200, Michal Hocko wrote: >OK, so after recent change mostly driven by testing from Reza Arbab >(thanks again) I believe I am getting to a working

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-06 Thread Reza Arbab
On Thu, Apr 06, 2017 at 03:08:46PM +0200, Michal Hocko wrote: OK, so after recent change mostly driven by testing from Reza Arbab (thanks again) I believe I am getting to a working state finally. All I currently have is in git://git.kernel.org/pub/scm/linux/kernel/git/mhocko/mm.git tree attempts

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-05 Thread Reza Arbab
with node_start_pfn which caused my removal crash. Except here I'm not sure the correct place to splice in and set it. -- Reza Arbab

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-05 Thread Reza Arbab
pages = max(start_pfn + nr_pages, old_end_pfn) - pgdat->node_start_pfn; --- Along these lines, maybe we should also do - if (start_pfn < zone->zone_start_pfn) + if (zone_is_empty(zone) || start_pfn < zone->zone_start_pfn) in resize_zone_range()? -- Reza Arbab

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-05 Thread Reza Arbab
On Wed, Apr 05, 2017 at 08:42:39AM +0200, Michal Hocko wrote: On Tue 04-04-17 16:43:39, Reza Arbab wrote: Okay, getting further. With this I can again repeatedly add and remove, but now I'm seeing a weird variation of that earlier issue: 1. add_memory(), online_movable /sys/devices/s

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-05 Thread Reza Arbab
ack to the oops in find_biggest_section_pfn(). -- Reza Arbab

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-05 Thread Reza Arbab
On Wed, Apr 05, 2017 at 11:24:27AM +0200, Michal Hocko wrote: On Wed 05-04-17 08:42:39, Michal Hocko wrote: On Tue 04-04-17 16:43:39, Reza Arbab wrote: > It's new. Without this patchset, I can repeatedly > add_memory()->online_movable->offline->remove_memory() all of a node&

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-04 Thread Reza Arbab
On Tue, Apr 04, 2017 at 09:41:22PM +0200, Michal Hocko wrote: On Tue 04-04-17 13:30:13, Reza Arbab wrote: I think I found another edge case. You get an oops when removing all of a node's memory: __nr_to_section __pfn_to_section find_biggest_section_pfn shrink_pgdat_span __remove

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-04 Thread Reza Arbab
ec_nr = 0x0 find_biggest_section_pfn loop: pfn=0x, sec_nr = 0xff Unable to handle kernel paging request for data at address 0xc00080f19e78 -- Reza Arbab

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-04 Thread Reza Arbab
node.c:373:15: warning: unused variable ‘page’ [-Wunused-variable] -- Reza Arbab

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-04 Thread Reza Arbab
ized(page)) - return -1; return pfn_to_nid(pfn); } Verified that /sys/devices/system/node/nodeX/memoryY links are there now. -- Reza Arbab

Re: [PATCH 3/6] mm: remove return value from init_currently_empty_zone

2017-04-03 Thread Reza Arbab
emory() returns int, but callers ignore it. Is that worth cleaning up? If so, should the implementations be simplified, or should we maybe do a pr_error() or something with it? -- Reza Arbab

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-03 Thread Reza Arbab
On Mon, Apr 03, 2017 at 10:23:38PM +0200, Michal Hocko wrote: On Mon 03-04-17 14:58:30, Reza Arbab wrote: However, I am seeing a regression. When adding memory to a memoryless node, it shows up in node 0 instead. I'm digging to see if I can help narrow down where things go wrong. OK, I

Re: [PATCH 0/6] mm: make movable onlining suck less

2017-04-03 Thread Reza Arbab
yless node, it shows up in node 0 instead. I'm digging to see if I can help narrow down where things go wrong. -- Reza Arbab

Re: [HMM 07/16] mm/migrate: new memory migration helper for use with device memory v4

2017-03-16 Thread Reza Arbab
on a range of virtual address and thus by doing migration in chunk that can be large enough to use DMA engine or special copy offloading engine. Reviewed-by: Reza Arbab Tested-by: Reza Arbab -- Reza Arbab

Re: WTH is going on with memory hotplug sysf interface (was: Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks)

2017-03-13 Thread Reza Arbab
into this area the more WTF code I see. This has seen close to zero review and seems to be building up more single usecase code on top of previous. We need to change this, seriously! No argument here. I'm happy to help however I can. -- Reza Arbab

Re: WTH is going on with memory hotplug sysf interface (was: Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks)

2017-03-10 Thread Reza Arbab
s stuff is very nonintuitive. -- Reza Arbab

Re: [RFC PATCH] mm, hotplug: get rid of auto_online_blocks

2017-02-27 Thread Reza Arbab
() took an 'int online_type', ala online_pages(). That way we could specify offline, online, online+movable, etc. -- Reza Arbab

Re: [HMM v17 00/14] HMM (Heterogeneous Memory Management) v17

2017-02-22 Thread Reza Arbab
Tested-by for that part of v17. -- Reza Arbab

Re: [HMM v17 06/14] mm/migrate: new memory migration helper for use with device memory v3

2017-02-22 Thread Reza Arbab
revision since v14. So for what it's worth, Acked-by: Reza Arbab Tested-by: Reza Arbab -- Reza Arbab

Re: Fwd: [PATCH 1/1] of/fdt: failed to mark hotplug range message

2016-12-22 Thread Reza Arbab
return 0; Isn't it implied that ranges printed this way are [start, end)? If not, the entire file should be fixed, not just this occurrence. -- Reza Arbab

Re: [PATCH v2] memory_hotplug: zone_can_shift() returns boolean value

2016-12-13 Thread Reza Arbab
(see Documentation/memory-hotplug.txt). In this case, memory must not be onlined. The patch changes the return type of zone_can_shift() so that memory is not onlined when memory zone cannot be changed. Reviewed-by: Reza Arbab -- Reza Arbab

Re: memory_hotplug: zone_can_shift() returns boolean value

2016-12-13 Thread Reza Arbab
_shift)) + return -EINVAL; + } else if (online_type == MMOP_ONLINE_MOVABLE) { + if (!zone_can_shift(pfn, nr_pages, ZONE_MOVABLE, &zone_shift)) + return -EINVAL; + } zone = move_pfn_range(zone_shift, pfn, pfn + nr_pages); if (!zone) -- 1.8.3.1 -- Reza Arbab

Re: [PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-15 Thread Reza Arbab
y are added. There is no gap between the addition and the marking, as there is on x86, during which an allocation might accidentally occur in a movable node. -- Reza Arbab

[PATCH v7 0/5] enable movable nodes on non-x86 configs

2016-11-14 Thread Reza Arbab
oducing a new "ibm,hotplug-aperture" compatible id. * Remove the patch which explicitly creates a memoryless node. This set no longer has any bearing on whether the pgdat is created at boot or at the time of memory addition. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send

[PATCH v7 5/5] dt: add documentation of "hotpluggable" memory property

2016-11-14 Thread Reza Arbab
Summarize the "hotpluggable" property of dt memory nodes. Signed-off-by: Reza Arbab --- Documentation/devicetree/booting-without-of.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-with

[PATCH v7 3/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-11-14 Thread Reza Arbab
hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh --- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v7 4/5] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
, configs supporting early fdt may then also do this marking and use movable nodes. Signed-off-by: Reza Arbab Tested-by: Balbir Singh --- drivers/of/fdt.c | 19 +++ include/linux/of_fdt.h | 1 + mm/Kconfig | 2 +- 3 files changed, 21 insertions(+), 1 deletion

[PATCH v7 2/5] mm: remove x86-only restriction of movable_node

2016-11-14 Thread Reza Arbab
86's setup_arch(), immediately after the movable_node parameter has been parsed. Signed-off-by: Reza Arbab --- Documentation/kernel-parameters.txt | 2 +- arch/x86/kernel/setup.c | 24 mm/memory_hotplug.c | 20 3 files changed,

[PATCH v7 1/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-11-14 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Sign

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-14 Thread Reza Arbab
otpluggable" in the documentation. Hopefully I've explained it well enough there. -- Reza Arbab

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-10 Thread Reza Arbab
On Thu, Nov 10, 2016 at 11:56:02AM +1100, Balbir Singh wrote: Have you tested this across all combinations of skiboot/kexec/SLOF boots? I've tested it under qemu/grub, simics/skiboot, and via kexec. -- Reza Arbab

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-09 Thread Reza Arbab
On Wed, Nov 09, 2016 at 12:12:55PM -0600, Rob Herring wrote: On Mon, Nov 7, 2016 at 5:44 PM, Reza Arbab wrote: + hotpluggable = of_get_flat_dt_prop(node, "linux,hotpluggable", NULL); Memory being hotpluggable doesn't seem like a linux property to me. I'd drop th

Re: [PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-08 Thread Reza Arbab
+ size); 1067 } Ah, I need to adjust for !CONFIG_HAVE_MEMBLOCK. Will correct in v7. -- Reza Arbab

[PATCH v6 2/4] mm: remove x86-only restriction of movable_node

2016-11-07 Thread Reza Arbab
86's setup_arch(), immediately after the movable_node parameter has been parsed. Signed-off-by: Reza Arbab --- Documentation/kernel-parameters.txt | 2 +- arch/x86/kernel/setup.c | 24 mm/memory_hotplug.c | 20 3 files changed,

[PATCH v6 0/4] enable movable nodes on non-x86 configs

2016-11-07 Thread Reza Arbab
ttp://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (4): powerpc/mm: allow memory hotplug into a memoryless node mm: remove x86-only restriction of movable_node mm: enable CONFIG_MOVABLE_NODE on non-x86 arches of/fdt: mark hotpluggable memory Documen

[PATCH v6 1/4] powerpc/mm: allow memory hotplug into a memoryless node

2016-11-07 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Sign

[PATCH v6 4/4] of/fdt: mark hotpluggable memory

2016-11-07 Thread Reza Arbab
, configs supporting early fdt may then also do this marking and use movable nodes. Signed-off-by: Reza Arbab --- drivers/of/fdt.c | 6 ++ mm/Kconfig | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index c89d5d2..2cf1d66 100644

[PATCH v6 3/4] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-11-07 Thread Reza Arbab
hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh --- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-26 Thread Reza Arbab
f memory were going to be. Yes, sorry, I should have qualified that statement to say I wasn't talking about pseries. I can amend this set to actually implement movable_node on power too, but we'd have to settle on a name for the dt property. Is "linux,movable-node" too on the nose? -- Reza Arbab

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-25 Thread Reza Arbab
nodes that way. -- Reza Arbab

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-25 Thread Reza Arbab
t occur within. 2. Shouldn't we be marking nodes discovered as movable via memblock_mark_hotplug()? Again, this early boot marking mechanism only applies to movable_node. -- Reza Arbab

[PATCH v5 1/3] powerpc/mm: allow memory hotplug into a memoryless node

2016-10-24 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to empty node/zone"), states that this was intended to be a temporary measure. It is a workaround for an oops which no longer occurs. Sign

[PATCH v5 0/3] powerpc/mm: movable hotplug memory nodes

2016-10-24 Thread Reza Arbab
aperture" compatible id. * Remove the patch which explicitly creates a memoryless node. This set no longer has any bearing on whether the pgdat is created at boot or at the time of memory addition. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.ibm.com Re

[PATCH v5 3/3] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-24 Thread Reza Arbab
means that a movable node can be created by hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh --- mm/Kconfig | 2 +- 1

[PATCH v5 2/3] mm: make processing of movable_node arch-specific

2016-10-24 Thread Reza Arbab
bottom-up memblock allocation. Since #ifdef CONFIG_MOVABLE_NODE will no longer be enough to restrict this option to x86, move it to an arch-specific compilation unit instead. Signed-off-by: Reza Arbab Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh --- arch/x86/mm/nu

Re: [PATCH v4 2/5] drivers/of: do not add memory for unavailable nodes

2016-10-24 Thread Reza Arbab
isabled and we don't know about it, and by changing the kernel to use that property we break people's systems. Though for memory nodes my guess is that's not true, but you never know ... -- Reza Arbab

Re: [PATCH v4 2/5] drivers/of: do not add memory for unavailable nodes

2016-10-22 Thread Reza Arbab
orward compatibility issue Alistair describes. -- Reza Arbab

Re: [PATCH v4 3/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-10-20 Thread Reza Arbab
ed me. -- Reza Arbab

[PATCH v4 3/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-10-06 Thread Reza Arbab
rnel.org/r/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Signed-off-by: Reza Arbab Reviewed-by: Aneesh Kumar K.V Acked-by: Balbir Singh Cc: Nathan Fontenot Cc: Bharata B Rao --- arch/powerpc/mm/numa.c | 13 +-

[PATCH v4 5/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-06 Thread Reza Arbab
means that a movable node can be created by hotplugging all of its memory into ZONE_MOVABLE. Fix the Kconfig definition of CONFIG_MOVABLE_NODE, which currently recognizes (1), but not (2). Signed-off-by: Reza Arbab --- mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 2/5] drivers/of: do not add memory for unavailable nodes

2016-10-06 Thread Reza Arbab
is not plugged in, or switched off). Once such memory is made operational, it can then be hotplugged. Signed-off-by: Reza Arbab --- drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index b138efb..08e5d94 100644 --- a/drivers/o

[PATCH v4 0/5] powerpc/mm: movable hotplug memory nodes

2016-10-06 Thread Reza Arbab
node. This set no longer has any bearing on whether the pgdat is created at boot or at the time of memory addition. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (5): drivers/of: introduce of_fdt_device_is_available() drivers/of

[PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-06 Thread Reza Arbab
bottom-up memblock allocation. Since #ifdef CONFIG_MOVABLE_NODE will no longer be enough to restrict this option to x86, move it to an arch-specific compilation unit instead. Signed-off-by: Reza Arbab --- arch/x86/mm/numa.c | 35 ++- mm/memory_hotp

[PATCH v4 1/5] drivers/of: introduce of_fdt_device_is_available()

2016-10-06 Thread Reza Arbab
In __fdt_scan_reserved_mem(), the availability of a node is determined by testing its "status" property. Move this check into its own function, borrowing logic from the unflattened version, of_device_is_available(). Another caller will be added in a subsequent patch. Signed-off-by:

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-10-04 Thread Reza Arbab
On Tue, Oct 04, 2016 at 11:48:30AM +1100, Balbir Singh wrote: On 27/09/16 10:14, Reza Arbab wrote: Right. To be clear, the background info I put in the commit log refers to x86, where the SRAT can describe movable nodes which exist at boot. They're trying to avoid allocations from those

Re: [PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-26 Thread Reza Arbab
know until some PCI device gets turned into CAPI mode and starts claiming LPC memory... Yes, this is what is planned for, if I'm understanding you correctly. In the dt, the PCI device node has a phandle pointing to the memory node. The memory node describes the window into which we can hotplug at runtime. -- Reza Arbab

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Reza Arbab
ion. That is the missing call being added in the patch. -- Reza Arbab

Re: [PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-26 Thread Reza Arbab
on to movable node. Sure, we can do it earlier. The only consideration is that any potential calls to memblock_mark_hotplug() happen before we reset to top-down. Since we don't do that at all on power, the call can go anywhere. -- Reza Arbab

[PATCH v3 2/5] drivers/of: do not add memory for unavailable nodes

2016-09-25 Thread Reza Arbab
is not plugged in, or switched off). Once such memory is made operational, it can then be hotplugged. Signed-off-by: Reza Arbab --- drivers/of/fdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 9241c6e..59b772a 100644 --- a/drivers/o

[PATCH v3 1/5] drivers/of: introduce of_fdt_is_available()

2016-09-25 Thread Reza Arbab
In __fdt_scan_reserved_mem(), the availability of a node is determined by testing its "status" property. Move this check into its own function, borrowing logic from the unflattened version, of_device_is_available(). Another caller will be added in a subsequent patch. Signed-off-by:

[PATCH v3 5/5] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-25 Thread Reza Arbab
, can_online_high_movable() will only allow us to do the onlining if CONFIG_MOVABLE_NODE is set. Enable the use of this config option on PPC64 platforms. Signed-off-by: Reza Arbab --- Documentation/kernel-parameters.txt | 2 +- mm/Kconfig | 2 +- 2 files changed, 2 insertions

[PATCH v3 0/5] powerpc/mm: movable hotplug memory nodes

2016-09-25 Thread Reza Arbab
n. v1: * http://lkml.kernel.org/r/1470680843-28702-1-git-send-email-ar...@linux.vnet.ibm.com Reza Arbab (5): drivers/of: introduce of_fdt_is_available() drivers/of: do not add memory for unavailable nodes powerpc/mm: allow memory hotplug into a memoryless node powerpc/mm: restore top-down allo

[PATCH v3 4/5] powerpc/mm: restore top-down allocation when using movable_node

2016-09-25 Thread Reza Arbab
as the kernel image, which is necessarily in a nonmovable node. Then, once any known hotplug memory has been marked, allocation can be reset back to top-down. On x86, this is done in numa_init(). This patch does the same on power, in numa initmem_init(). Signed-off-by: Reza Arbab --- arch/powerpc

[PATCH v3 3/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-09-25 Thread Reza Arbab
rnel.org/r/cagzkibrmksa1yyhbf5hwgxubcjse5smksmy4tpanerme2ug...@mail.gmail.com http://lkml.kernel.org/r/20160511215051.gf22...@arbab-laptop.austin.ibm.com Signed-off-by: Reza Arbab Acked-by: Balbir Singh Cc: Nathan Fontenot Cc: Bharata B Rao --- arch/powerpc/mm/numa.c | 13 + 1 file changed, 1

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-21 Thread Reza Arbab
e from normal to movable only if movable node is set. Also you may want to mention that we still don't support the auto-online to movable. Sure, no problem. I'll use a more verbose commit message in v3. -- Reza Arbab

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-21 Thread Reza Arbab
bool can_online_high_movable(struct zone *zone) { return node_state(zone_to_nid(zone), N_NORMAL_MEMORY); } #endif /* CONFIG_MOVABLE_NODE */ To be more clear, I can change the commit log to say "Onlining all of a node's memory into ZONE_MOVABLE requires CONFIG_MOVABLE_NODE". -- Reza Arbab

Re: [PATCH v2 2/3] powerpc/mm: allow memory hotplug into a memoryless node

2016-09-20 Thread Reza Arbab
On Mon, Sep 19, 2016 at 09:53:49PM +1000, Balbir Singh wrote: I presume you've tested with CONFIG_NODES_SHIFT of 8 (255 nodes?) Oh yes, definitely. The large number of possible nodes does not come into play here. -- Reza Arbab

Re: [PATCH v2 3/3] mm: enable CONFIG_MOVABLE_NODE on powerpc

2016-09-20 Thread Reza Arbab
lly adding movable nodes after boot. 1. http://events.linuxfoundation.org/sites/events/files/lcjp13_chen.pdf 2. commit 79442ed189ac ("mm/memblock.c: introduce bottom-up allocation mode") -- Reza Arbab

Re: [PATCH v2 1/3] drivers/of: recognize status property of dt memory nodes

2016-09-15 Thread Reza Arbab
On Thu, Sep 15, 2016 at 08:43:08AM -0500, Rob Herring wrote: On Wed, Sep 14, 2016 at 3:06 PM, Reza Arbab wrote: + status = of_get_flat_dt_prop(node, "status", NULL); + add_memory = !status || !strcmp(status, "okay"); Move this into it's own function

  1   2   >