Thread (16 messages) 16 messages, 4 authors, 2021-12-01

Re: [PATCH v5 2/3] mm/mempolicy: add set_mempolicy_home_node syscall

From: Daniel Jordan <daniel.m.jordan@oracle.com>
Date: 2021-12-01 00:48:37
Also in: linux-mm

On Tue, Nov 16, 2021 at 12:12:37PM +0530, Aneesh Kumar K.V wrote:
sys_set_mempolicy_home_node((unsigned long)p, nr_pages * page_size,
				  home_node, 0);
What about sys_mbind_home_node so the name is better aligned with mbind,
since both operate on vma policy?  The syscall might or might not be
extended to task memory policy, but vma policy is what we're using this
for today.

+SYSCALL_DEFINE4(set_mempolicy_home_node, unsigned long, start, unsigned long, len,
+		unsigned long, home_node, unsigned long, flags)
mbind does untagged_addr(addr), why doesn't this need to do the same?
Seems like tagged addresses could be passed here too.

+		/*
+		 * Only update home node if there is an existing vma policy
+		 */
+		if (!new)
+			continue;
+		new->home_node = home_node;
+		err = mbind_range(mm, vmstart, vmend, new);
I think you need an mpol_put(new) here since @new is dup'ed again during
mbind_range > vma_replace_policy.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help