hugepte_t entry;
int i;
- mm->rss += (HPAGE_SIZE / PAGE_SIZE);
+ // mm->rss += (HPAGE_SIZE / PAGE_SIZE);
+ vx_rsspages_sub(mm, HPAGE_SIZE / PAGE_SIZE);
entry = mk_hugepte(page, write_access);
for (i = 0; i < HUGEPTE_BATCH_SIZE; i++)
set_hugepte(ptep+i, entry);
/* This is the first hugepte in a batch */
ptepage = hugepte_page(entry);
get_page(ptepage);
- dst->rss += (HPAGE_SIZE / PAGE_SIZE);
+ // dst->rss += (HPAGE_SIZE / PAGE_SIZE);
+ vx_rsspages_add(dst, HPAGE_SIZE / PAGE_SIZE);
}
set_hugepte(dst_pte, entry);
unsigned long addr;
hugepte_t *ptep;
struct page *page;
+ int cpu;
int local = 0;
cpumask_t tmp;
BUG_ON((end % HPAGE_SIZE) != 0);
/* XXX are there races with checking cpu_vm_mask? - Anton */
- tmp = cpumask_of_cpu(smp_processor_id());
+ cpu = get_cpu();
+ tmp = cpumask_of_cpu(cpu);
if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp))
local = 1;
put_page(page);
}
+ put_cpu();
- mm->rss -= (end - start) >> PAGE_SHIFT;
+ // mm->rss -= (end - start) >> PAGE_SHIFT;
+ vx_rsspages_sub(mm, (end - start) >> PAGE_SHIFT);
}
int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)