[PATCH 3/7] pin_pages for hugetlb

2007-03-19 Thread Adam Litke

Signed-off-by: Adam Litke <[EMAIL PROTECTED]>
---

 fs/hugetlbfs/inode.c |1 +
 mm/memory.c  |6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 2452dde..d0b4b46 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -567,6 +567,7 @@ const struct file_operations hugetlbfs_file_operations = {
 
 static const struct pagetable_operations_struct hugetlbfs_pagetable_ops = {
.copy_vma   = copy_hugetlb_page_range,
+   .pin_pages  = follow_hugetlb_page,
 };
 
 static const struct inode_operations hugetlbfs_dir_inode_operations = {
diff --git a/mm/memory.c b/mm/memory.c
index 69bb0b3..01256cf 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1039,9 +1039,9 @@ int get_user_pages(struct task_struct *tsk, struct 
mm_struct *mm,
|| !(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
 
-   if (is_vm_hugetlb_page(vma)) {
-   i = follow_hugetlb_page(mm, vma, pages, vmas,
-   , , i);
+   if (has_pt_op(vma, pin_pages)) {
+   i = pt_op(vma, pin_pages)(mm, vma, pages,
+   vmas, , , i);
continue;
}
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/7] pin_pages for hugetlb

2007-03-19 Thread Adam Litke

Signed-off-by: Adam Litke [EMAIL PROTECTED]
---

 fs/hugetlbfs/inode.c |1 +
 mm/memory.c  |6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 2452dde..d0b4b46 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -567,6 +567,7 @@ const struct file_operations hugetlbfs_file_operations = {
 
 static const struct pagetable_operations_struct hugetlbfs_pagetable_ops = {
.copy_vma   = copy_hugetlb_page_range,
+   .pin_pages  = follow_hugetlb_page,
 };
 
 static const struct inode_operations hugetlbfs_dir_inode_operations = {
diff --git a/mm/memory.c b/mm/memory.c
index 69bb0b3..01256cf 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1039,9 +1039,9 @@ int get_user_pages(struct task_struct *tsk, struct 
mm_struct *mm,
|| !(vm_flags  vma-vm_flags))
return i ? : -EFAULT;
 
-   if (is_vm_hugetlb_page(vma)) {
-   i = follow_hugetlb_page(mm, vma, pages, vmas,
-   start, len, i);
+   if (has_pt_op(vma, pin_pages)) {
+   i = pt_op(vma, pin_pages)(mm, vma, pages,
+   vmas, start, len, i);
continue;
}
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/7] pin_pages for hugetlb

2007-02-19 Thread Adam Litke

Signed-off-by: Adam Litke <[EMAIL PROTECTED]>
---

 fs/hugetlbfs/inode.c |1 +
 mm/memory.c  |6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index c0a7984..2d1dd84 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -564,6 +564,7 @@ const struct file_operations hugetlbfs_file_operations = {
 
 static struct pagetable_operations_struct hugetlbfs_pagetable_ops = {
.copy_vma   = copy_hugetlb_page_range,
+   .pin_pages  = follow_hugetlb_page,
 };
 
 static struct inode_operations hugetlbfs_dir_inode_operations = {
diff --git a/mm/memory.c b/mm/memory.c
index 80eafd5..9467c65 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1039,9 +1039,9 @@ int get_user_pages(struct task_struct *tsk, struct 
mm_struct *mm,
|| !(vm_flags & vma->vm_flags))
return i ? : -EFAULT;
 
-   if (is_vm_hugetlb_page(vma)) {
-   i = follow_hugetlb_page(mm, vma, pages, vmas,
-   , , i);
+   if (has_pt_op(vma, pin_pages)) {
+   i = pt_op(vma, pin_pages)(mm, vma, pages,
+   vmas, , , i);
continue;
}
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 3/7] pin_pages for hugetlb

2007-02-19 Thread Adam Litke

Signed-off-by: Adam Litke [EMAIL PROTECTED]
---

 fs/hugetlbfs/inode.c |1 +
 mm/memory.c  |6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index c0a7984..2d1dd84 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -564,6 +564,7 @@ const struct file_operations hugetlbfs_file_operations = {
 
 static struct pagetable_operations_struct hugetlbfs_pagetable_ops = {
.copy_vma   = copy_hugetlb_page_range,
+   .pin_pages  = follow_hugetlb_page,
 };
 
 static struct inode_operations hugetlbfs_dir_inode_operations = {
diff --git a/mm/memory.c b/mm/memory.c
index 80eafd5..9467c65 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1039,9 +1039,9 @@ int get_user_pages(struct task_struct *tsk, struct 
mm_struct *mm,
|| !(vm_flags  vma-vm_flags))
return i ? : -EFAULT;
 
-   if (is_vm_hugetlb_page(vma)) {
-   i = follow_hugetlb_page(mm, vma, pages, vmas,
-   start, len, i);
+   if (has_pt_op(vma, pin_pages)) {
+   i = pt_op(vma, pin_pages)(mm, vma, pages,
+   vmas, start, len, i);
continue;
}
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/