mempolicy.c (cc424890b06ba1d41d7ec99984b65592184adf0b) mempolicy.c (a13b2b9b0b0b04612c7d81e3b3dfb485c5f7abc3)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Simple NUMA memory policy for the Linux kernel.
4 *
5 * Copyright 2003,2004 Andi Kleen, SuSE Labs.
6 * (C) Copyright 2005 Christoph Lameter, Silicon Graphics, Inc.
7 *
8 * NUMA policy allows the user to give hints in which node(s) memory should

--- 1057 unchanged lines hidden (view full) ---

1066 .gfp_mask = GFP_HIGHUSER_MOVABLE | __GFP_THISNODE,
1067 };
1068
1069 nodes_clear(nmask);
1070 node_set(source, nmask);
1071
1072 VM_BUG_ON(!(flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)));
1073 vma = find_vma(mm, 0);
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Simple NUMA memory policy for the Linux kernel.
4 *
5 * Copyright 2003,2004 Andi Kleen, SuSE Labs.
6 * (C) Copyright 2005 Christoph Lameter, Silicon Graphics, Inc.
7 *
8 * NUMA policy allows the user to give hints in which node(s) memory should

--- 1057 unchanged lines hidden (view full) ---

1066 .gfp_mask = GFP_HIGHUSER_MOVABLE | __GFP_THISNODE,
1067 };
1068
1069 nodes_clear(nmask);
1070 node_set(source, nmask);
1071
1072 VM_BUG_ON(!(flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)));
1073 vma = find_vma(mm, 0);
1074 if (unlikely(!vma)) {
1075 mmap_read_unlock(mm);
1076 return 0;
1077 }
1074
1075 /*
1076 * This does not migrate the range, but isolates all pages that
1077 * need migration. Between passing in the full user address
1078 * space range and MPOL_MF_DISCONTIG_OK, this call cannot fail,
1079 * but passes back the count of pages which could not be isolated.
1080 */
1081 nr_failed = queue_pages_range(mm, vma->vm_start, mm->task_size, &nmask,

--- 2083 unchanged lines hidden ---
1078
1079 /*
1080 * This does not migrate the range, but isolates all pages that
1081 * need migration. Between passing in the full user address
1082 * space range and MPOL_MF_DISCONTIG_OK, this call cannot fail,
1083 * but passes back the count of pages which could not be isolated.
1084 */
1085 nr_failed = queue_pages_range(mm, vma->vm_start, mm->task_size, &nmask,

--- 2083 unchanged lines hidden ---