patch comments [3/5]
"Matt Dew" <[email protected]> Fri, 22 Sep 2006 15:31:13 -0600
| Newsgroups | gmane.linux.cluster.openmosix.devel |
|---|---|
| Message-ID | <[email protected]> |
Simplifies the remote page installation. Pre-existing functions already do the work, so let's use them. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ openMosix-devel mailing list openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/openmosix-devel
openmosix-receive_page_03.patch
(text/plain, 1.3 KB)
--- a/hpc/migrecv.c 2006-09-22 15:17:41.000000000 -0600
+++ b/hpc/migrecv.c 2006-09-22 15:18:20.000000000 -0600
@@ -333,12 +333,6 @@
pmd_t * pmd;
pte_t * pte;
- // FIXME: another way?
- // Must be done from process context.
-
- // recv_page = alloc_page(GFP_HIGHUSER);
- // kfree(pkt->data);
-
addr=pkt->addr;
vma = find_vma(mm, addr);
@@ -347,40 +341,20 @@
kcom_send_nack(p, pkt);
return -1;
}
+ /*
+ FIXME: another way?
+ Must be done from process context.
+ */
recv_page=alloc_zeroed_user_highpage(vma, addr);
kmpage=kmap(recv_page);
memcpy(kmpage, pkt->data, pkt->len);
kunmap(recv_page);
- //
/* add the page at correct place */
- pgd = pgd_offset(mm, addr);
-
- pud = pud_alloc(mm, pgd, addr);
- if (!pud)
- goto out;
- pmd = pmd_alloc(mm, pud, addr);
- if (!pmd)
- goto out;
- pte = pte_alloc_map(mm, pmd, addr);
- if (!pte)
- goto out;
- if (!pte_none(*pte))
- OMBUG("double page at addr %p\n", (void *) addr);
-
- set_pte(pte, pte_mkdirty(mk_pte(recv_page, vma->vm_page_prot)));
- pte_unmap(pte);
- page_dup_rmap(recv_page);
- inc_mm_counter(mm, file_rss);
-
-
-/*
down_write(&mm->mmap_sem);
install_arg_page(vma, recv_page, pkt->addr);
up_write(&mm->mmap_sem);
-*/
- // make_pages_present(pkt->addr, pkt->addr+PAGE_SIZE); // NOPE
kcom_send_ack(p, pkt);