summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2002-09-26 22:43:29 -0700
committerIngo Molnar <mingo@elte.hu>2002-09-26 22:43:29 -0700
commit7c2149e943bf3fae3e6e14189463390ef4c5b7a1 (patch)
tree96ce1fec80e6ac90e250c7e46fe2991c72ebf2a7 /include/linux
parentc2dd03a9e2d8bf508f6b3d9ee327c37a928b3351 (diff)
[PATCH] virtual => physical page mapping cache
Implement a "mapping change" notification for virtual lookup caches, and make the futex code use that to keep the futex page pinning consistent across copy-on-write events in the VM space.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/futex.h2
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/vcache.h26
3 files changed, 28 insertions, 1 deletions
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 1b9a8f7ad5e8..415946df03d4 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -6,6 +6,6 @@
#define FUTEX_WAKE (1)
#define FUTEX_FD (2)
-extern asmlinkage int sys_futex(void *uaddr, int op, int val, struct timespec *utime);
+extern asmlinkage int sys_futex(unsigned long uaddr, int op, int val, struct timespec *utime);
#endif
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 482db998aca7..4ae8eb10dcb2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -374,6 +374,7 @@ extern int handle_mm_fault(struct mm_struct *mm,struct vm_area_struct *vma, unsi
extern int make_pages_present(unsigned long addr, unsigned long end);
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
+extern struct page * follow_page(struct mm_struct *mm, unsigned long address, int write);
int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
int len, int write, int force, struct page **pages, struct vm_area_struct **vmas);
diff --git a/include/linux/vcache.h b/include/linux/vcache.h
new file mode 100644
index 000000000000..d5756643332c
--- /dev/null
+++ b/include/linux/vcache.h
@@ -0,0 +1,26 @@
+/*
+ * virtual => physical mapping cache support.
+ */
+#ifndef _LINUX_VCACHE_H
+#define _LINUX_VCACHE_H
+
+typedef struct vcache_s {
+ unsigned long address;
+ struct mm_struct *mm;
+ struct list_head hash_entry;
+ void (*callback)(struct vcache_s *data, struct page *new_page);
+} vcache_t;
+
+extern spinlock_t vcache_lock;
+
+extern void __attach_vcache(vcache_t *vcache,
+ unsigned long address,
+ struct mm_struct *mm,
+ void (*callback)(struct vcache_s *data, struct page *new_page));
+
+extern void detach_vcache(vcache_t *vcache);
+
+extern void invalidate_vcache(unsigned long address, struct mm_struct *mm,
+ struct page *new_page);
+
+#endif