mempolicy.c (bbe5d235ee201705530a7153b57e141cd77d818b) mempolicy.c (7b2259b3e53f128c10a9fded0965e69d4a949847)
1/*
2 * Simple NUMA memory policy for the Linux kernel.
3 *
4 * Copyright 2003,2004 Andi Kleen, SuSE Labs.
5 * (C) Copyright 2005 Christoph Lameter, Silicon Graphics, Inc.
6 * Subject to the GNU Public License, version 2.
7 *
8 * NUMA policy allows the user to give hints in which node(s) memory should

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

627{
628 LIST_HEAD(pagelist);
629 int busy = 0;
630 int err = 0;
631 nodemask_t tmp;
632
633 down_read(&mm->mmap_sem);
634
1/*
2 * Simple NUMA memory policy for the Linux kernel.
3 *
4 * Copyright 2003,2004 Andi Kleen, SuSE Labs.
5 * (C) Copyright 2005 Christoph Lameter, Silicon Graphics, Inc.
6 * Subject to the GNU Public License, version 2.
7 *
8 * NUMA policy allows the user to give hints in which node(s) memory should

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

627{
628 LIST_HEAD(pagelist);
629 int busy = 0;
630 int err = 0;
631 nodemask_t tmp;
632
633 down_read(&mm->mmap_sem);
634
635 err = migrate_vmas(mm, from_nodes, to_nodes, flags);
636 if (err)
637 goto out;
638
635/*
636 * Find a 'source' bit set in 'tmp' whose corresponding 'dest'
637 * bit in 'to' is not also set in 'tmp'. Clear the found 'source'
638 * bit in 'tmp', and return that <source, dest> pair for migration.
639 * The pair of nodemasks 'to' and 'from' define the map.
640 *
641 * If no pair of bits is found that way, fallback to picking some
642 * pair of 'source' and 'dest' bits that are not the same. If the

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

686
687 node_clear(source, tmp);
688 err = migrate_to_node(mm, source, dest, flags);
689 if (err > 0)
690 busy += err;
691 if (err < 0)
692 break;
693 }
639/*
640 * Find a 'source' bit set in 'tmp' whose corresponding 'dest'
641 * bit in 'to' is not also set in 'tmp'. Clear the found 'source'
642 * bit in 'tmp', and return that <source, dest> pair for migration.
643 * The pair of nodemasks 'to' and 'from' define the map.
644 *
645 * If no pair of bits is found that way, fallback to picking some
646 * pair of 'source' and 'dest' bits that are not the same. If the

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

690
691 node_clear(source, tmp);
692 err = migrate_to_node(mm, source, dest, flags);
693 if (err > 0)
694 busy += err;
695 if (err < 0)
696 break;
697 }
694
698out:
695 up_read(&mm->mmap_sem);
696 if (err < 0)
697 return err;
698 return busy;
699
700}
701
702static struct page *new_vma_page(struct page *page, unsigned long private, int **x)

--- 1191 unchanged lines hidden ---
699 up_read(&mm->mmap_sem);
700 if (err < 0)
701 return err;
702 return busy;
703
704}
705
706static struct page *new_vma_page(struct page *page, unsigned long private, int **x)

--- 1191 unchanged lines hidden ---