1 Index: linux-269-5502/fs/open.c
2 ===================================================================
3 --- linux-269-5502.orig/fs/open.c
4 +++ linux-269-5502/fs/open.c
5 @@ -1029,6 +1029,8 @@ out_error:
9 +EXPORT_SYMBOL(sys_open);
14 Index: linux-269-5502/fs/read_write.c
15 ===================================================================
16 --- linux-269-5502.orig/fs/read_write.c
17 +++ linux-269-5502/fs/read_write.c
18 @@ -145,6 +145,7 @@ asmlinkage off_t sys_lseek(unsigned int
22 +EXPORT_SYMBOL(sys_lseek);
24 #ifdef __ARCH_WANT_SYS_LLSEEK
25 asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
26 Index: linux-269-5502/fs/select.c
27 ===================================================================
28 --- linux-269-5502.orig/fs/select.c
29 +++ linux-269-5502/fs/select.c
30 @@ -539,3 +539,4 @@ out_fds:
31 poll_freewait(&table);
34 +EXPORT_SYMBOL_GPL(sys_poll);
35 Index: linux-269-5502/fs/exec.c
36 ===================================================================
37 --- linux-269-5502.orig/fs/exec.c
38 +++ linux-269-5502/fs/exec.c
40 #include <linux/kmod.h>
43 +#include <linux/ptrack.h>
46 char core_pattern[65] = "core";
47 int suid_dumpable = 0;
48 @@ -1214,6 +1216,9 @@ int do_execve(char * filename,
52 + /* notify any ptrack callbacks of the process exec */
53 + ptrack_call_callbacks(PTRACK_PHASE_EXEC, NULL);
55 retval = search_binary_handler(bprm,regs);
58 Index: linux-269-5502/arch/i386/Kconfig
59 ===================================================================
60 --- linux-269-5502.orig/arch/i386/Kconfig
61 +++ linux-269-5502/arch/i386/Kconfig
62 @@ -960,6 +960,9 @@ config REGPARM
63 generate incorrect output with certain kernel constructs when
67 +source "kernel/Kconfig"
72 Index: linux-269-5502/arch/i386/defconfig
73 ===================================================================
74 --- linux-269-5502.orig/arch/i386/defconfig
75 +++ linux-269-5502/arch/i386/defconfig
76 @@ -119,6 +119,8 @@ CONFIG_MTRR=y
78 CONFIG_HAVE_DEC_LOCK=y
79 # CONFIG_REGPARM is not set
84 # Power management options (ACPI, APM)
85 Index: linux-269-5502/arch/ia64/Kconfig
86 ===================================================================
87 --- linux-269-5502.orig/arch/ia64/Kconfig
88 +++ linux-269-5502/arch/ia64/Kconfig
89 @@ -316,6 +316,9 @@ config IA64_PALINFO
90 To use this option, you have to ensure that the "/proc file system
91 support" (CONFIG_PROC_FS) is enabled, too.
94 +source "kernel/Kconfig"
96 source "drivers/firmware/Kconfig"
98 source "fs/Kconfig.binfmt"
99 Index: linux-269-5502/arch/ia64/defconfig
100 ===================================================================
101 --- linux-269-5502.orig/arch/ia64/defconfig
102 +++ linux-269-5502/arch/ia64/defconfig
103 @@ -83,6 +83,8 @@ CONFIG_IA32_SUPPORT=y
106 CONFIG_IA64_PALINFO=y
112 Index: linux-269-5502/arch/x86_64/Kconfig
113 ===================================================================
114 --- linux-269-5502.orig/arch/x86_64/Kconfig
115 +++ linux-269-5502/arch/x86_64/Kconfig
116 @@ -401,6 +401,9 @@ config X86_MCE_AMD
117 Additional support for AMD specific MCE features such as
118 the DRAM Error Threshold.
121 +source "kernel/Kconfig"
126 Index: linux-269-5502/arch/x86_64/defconfig
127 ===================================================================
128 --- linux-269-5502.orig/arch/x86_64/defconfig
129 +++ linux-269-5502/arch/x86_64/defconfig
130 @@ -87,6 +87,8 @@ CONFIG_NR_CPUS=8
138 # Power management options
139 Index: linux-269-5502/kernel/ptrack.c
140 ===================================================================
142 +++ linux-269-5502/kernel/ptrack.c
145 + * Copyright (C) 2000 Regents of the University of California
147 + * This program is free software; you can redistribute it and/or modify
148 + * it under the terms of the GNU General Public License as published by
149 + * the Free Software Foundation; either version 2 of the License, or
150 + * (at your option) any later version.
152 + * This program is distributed in the hope that it will be useful,
153 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
154 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
155 + * GNU General Public License for more details.
157 + * You should have received a copy of the GNU General Public License
158 + * along with this program; if not, write to the Free Software
159 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
161 + * Derived from exit_actn.c by
162 + * Copyright (C) 2003 Quadrics Ltd.
166 +#include <linux/module.h>
167 +#include <linux/spinlock.h>
168 +#include <linux/sched.h>
169 +#include <linux/ptrack.h>
170 +#include <linux/slab.h>
171 +#include <linux/list.h>
173 +#include <asm/errno.h>
176 +ptrack_register (ptrack_callback_t callback, void *arg)
178 + struct ptrack_desc *desc = kmalloc (sizeof (struct ptrack_desc), GFP_KERNEL);
183 + desc->callback = callback;
186 + list_add_tail (&desc->link, ¤t->ptrack_list);
192 +ptrack_deregister (ptrack_callback_t callback, void *arg)
194 + struct list_head *el, *nel;
196 + list_for_each_safe (el, nel, ¤t->ptrack_list) {
197 + struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
199 + if (desc->callback == callback && desc->arg == arg) {
200 + list_del (&desc->link);
207 +ptrack_registered (ptrack_callback_t callback, void *arg)
209 + struct list_head *el;
211 + list_for_each (el, ¤t->ptrack_list) {
212 + struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
214 + if (desc->callback == callback && desc->arg == arg)
221 +ptrack_call_callbacks (int phase, struct task_struct *child)
223 + struct list_head *el, *nel;
224 + struct ptrack_desc *new;
227 + if (phase == PTRACK_PHASE_CLONE)
228 + INIT_LIST_HEAD (&child->ptrack_list);
230 + list_for_each_safe (el, nel, ¤t->ptrack_list) {
231 + struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
233 + res = desc->callback (desc->arg, phase, child);
237 + case PTRACK_PHASE_EXIT:
238 + list_del (&desc->link);
242 + case PTRACK_PHASE_CLONE:
245 + case PTRACK_FINISHED:
248 + case PTRACK_INNHERIT:
249 + if ((new = kmalloc (sizeof (struct ptrack_desc), GFP_ATOMIC)) == NULL)
251 + /* allocation failed - notify that this process is not going
252 + * to be started by signalling clone failure.
254 + desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child);
259 + new->callback = desc->callback;
260 + new->arg = desc->arg;
262 + list_add_tail (&new->link, &child->ptrack_list);
265 + case PTRACK_DENIED:
275 + while (! list_empty (&child->ptrack_list))
277 + struct ptrack_desc *desc = list_entry (child->ptrack_list.next, struct ptrack_desc, link);
279 + desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child);
281 + list_del (&desc->link);
286 +EXPORT_SYMBOL(ptrack_register);
287 +EXPORT_SYMBOL(ptrack_deregister);
288 +EXPORT_SYMBOL(ptrack_registered);
289 Index: linux-269-5502/kernel/signal.c
290 ===================================================================
291 --- linux-269-5502.orig/kernel/signal.c
292 +++ linux-269-5502/kernel/signal.c
293 @@ -2329,6 +2329,7 @@ sys_kill(int pid, int sig)
295 return kill_something_info(sig, &info, pid);
297 +EXPORT_SYMBOL_GPL(sys_kill);
300 * sys_tgkill - send signal to one specific thread
301 Index: linux-269-5502/kernel/Kconfig
302 ===================================================================
304 +++ linux-269-5502/kernel/Kconfig
307 +# Kernel subsystem specific config
310 +# Support for Process Tracking callbacks
313 + bool "Enable PTRACK process tracking hooks"
316 + This option enables hooks to be called when processes are
317 + created and destoryed in order for a resource management
318 + system to know which processes are a member of a "job" and
319 + to be able to clean up when the job is terminated.
320 Index: linux-269-5502/kernel/Makefile
321 ===================================================================
322 --- linux-269-5502.orig/kernel/Makefile
323 +++ linux-269-5502/kernel/Makefile
324 @@ -26,6 +26,7 @@ obj-$(CONFIG_AUDIT) += audit.o
325 obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
326 obj-$(CONFIG_AUDITFILESYSTEM) += auditfs.o
327 obj-$(CONFIG_KPROBES) += kprobes.o
328 +obj-$(CONFIG_PTRACK) += ptrack.o
330 ifneq ($(CONFIG_IA64),y)
331 # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
332 Index: linux-269-5502/kernel/exit.c
333 ===================================================================
334 --- linux-269-5502.orig/kernel/exit.c
335 +++ linux-269-5502/kernel/exit.c
337 #include <asm/pgtable.h>
338 #include <asm/mmu_context.h>
340 +#include <linux/ptrack.h>
342 extern void sem_exit (void);
343 extern struct task_struct *child_reaper;
345 @@ -825,6 +827,9 @@ asmlinkage NORET_TYPE void do_exit(long
349 + /* Notify any ptrack callbacks of the process exit */
350 + ptrack_call_callbacks(PTRACK_PHASE_EXIT, NULL);
352 if (unlikely(tsk->audit_context))
355 Index: linux-269-5502/kernel/fork.c
356 ===================================================================
357 --- linux-269-5502.orig/kernel/fork.c
358 +++ linux-269-5502/kernel/fork.c
360 #include <linux/config.h>
361 #include <linux/slab.h>
362 #include <linux/init.h>
363 +#include <linux/ptrack.h>
364 #include <linux/unistd.h>
365 #include <linux/smp_lock.h>
366 #include <linux/module.h>
367 @@ -443,6 +444,9 @@ static struct mm_struct * mm_init(struct
368 mm->page_table_lock = SPIN_LOCK_UNLOCKED;
369 mm->ioctx_list_lock = RW_LOCK_UNLOCKED;
370 mm->ioctx_list = NULL;
371 +#ifdef CONFIG_IOPROC
372 + mm->ioproc_ops = NULL;
374 mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm);
375 mm->free_area_cache = TASK_UNMAPPED_BASE;
377 @@ -1312,6 +1316,11 @@ long do_fork(unsigned long clone_flags,
378 set_tsk_thread_flag(p, TIF_SIGPENDING);
381 + if (ptrack_call_callbacks(PTRACK_PHASE_CLONE, p)) {
382 + sigaddset(&p->pending.signal, SIGKILL);
383 + set_tsk_thread_flag(p, TIF_SIGPENDING);
386 if (!(clone_flags & CLONE_STOPPED))
387 wake_up_new_task(p, clone_flags);
389 Index: linux-269-5502/Makefile
390 ===================================================================
391 --- linux-269-5502.orig/Makefile
392 +++ linux-269-5502/Makefile
397 -EXTRAVERSION = -prep
398 +EXTRAVERSION = -prep.qp3.5.34.4qsnet
402 Index: linux-269-5502/Documentation/vm/ioproc.txt
403 ===================================================================
405 +++ linux-269-5502/Documentation/vm/ioproc.txt
407 +Linux IOPROC patch overview
408 +===========================
410 +The network interface for an HPC network differs significantly from
411 +network interfaces for traditional IP networks. HPC networks tend to
412 +be used directly from user processes and perform large RDMA transfers
413 +between theses processes address space. They also have a requirement
414 +for low latency communication, and typically achieve this by OS bypass
415 +techniques. This then requires a different model to traditional
416 +interconnects, in that a process may need to expose a large amount of
417 +it's address space to the network RDMA.
419 +Locking down of memory has been a common mechanism for performing
420 +this, together with a pin-down cache implemented in user
421 +libraries. The disadvantage of this method is that large portions of
422 +the physical memory can be locked down for a single process, even if
423 +it's working set changes over the different phases of it's
424 +execution. This leads to inefficient memory utilisation - akin to the
425 +disadvantage of swapping compared to paging.
427 +This model also has problems where memory is being dynamically
428 +allocated and freed, since the pin down cache is unaware that memory
429 +may have been released by a call to munmap() and so it will still be
430 +locking down the now unused pages.
432 +Some modern HPC network interfaces implement their own MMU and are
433 +able to handle a translation fault during a network access. The
434 +Quadrics (http://www.quadrics.com) devices (Elan3 and Elan4) have done
435 +this for some time and we expect others to follow the same route in
436 +the relatively near future. These NICs are able to operate in an
437 +environment where paging occurs and do not require memory to be locked
438 +down. The advantage of this is that the user process can expose large
439 +portions of it's address space without having to worry about physical
442 +However should the operating system decide to swap a page to disk,
443 +then the NIC must be made aware that it should no longer read/write
444 +from this memory, but should generate a translation fault instead.
446 +The ioproc patch has been developed to provide a mechanism whereby the
447 +device driver for a NIC can be aware of when a user process's address
448 +translations change, either by paging or by explicitly mapping or
451 +The patch involves inserting callbacks where translations are being
452 +invalidated to notify the NIC that the memory behind those
453 +translations is no longer visible to the application (and so should
454 +not be visible to the NIC). This callback is then responsible for
455 +ensuring that the NIC will not access the physical memory that was
458 +An ioproc invalidate callback in the kswapd code could be utilised to
459 +prevent memory from being paged out if the NIC is unable to support
460 +network page faulting.
462 +For NICs which support network page faulting, there is no requirement
463 +for a user level pin down cache, since they are able to page-in their
464 +translations on the first communication using a buffer. However this
465 +is likely to be inefficient, resulting in slow first use of the
466 +buffer. If the communication buffers were continually allocated and
467 +freed using mmap based malloc() calls then this would lead to all
468 +communications being slower than desirable.
470 +To optimise these warm-up cases the ioproc patch adds calls to
471 +ioproc_update wherever the kernel is creating translations for a user
472 +process. These then allows the device driver to preload translations
473 +so that they are already present for the first network communication
476 +Linux 2.6 IOPROC implementation details
477 +=======================================
479 +The Linux IOPROC patch adds hooks to the Linux VM code whenever page
480 +table entries are being created and/or invalidated. IOPROC device
481 +drivers can register their interest in being informed of such changes
482 +by registering an ioproc_ops structure which is defined as follows;
484 +extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip);
485 +extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip);
487 +typedef struct ioproc_ops {
488 + struct ioproc_ops *next;
491 + void (*release)(void *arg, struct mm_struct *mm);
492 + void (*sync_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
493 + void (*invalidate_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
494 + void (*update_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
496 + void (*change_protection)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot);
498 + void (*sync_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
499 + void (*invalidate_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
500 + void (*update_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
506 +This function should be called by the IOPROC device driver to register
507 +it's interest in PTE changes for the process associated with the passed
510 +The ioproc registration is not inherited across fork() and should be
511 +called once for each process that IOPROC is interested in.
513 +This function must be called whilst holding the mm->page_table_lock.
515 +ioproc_unregister_ops
516 +=====================
517 +This function should be called by the IOPROC device driver when it no
518 +longer requires informing of PTE changes in the process associated
519 +with the supplied mm_struct.
521 +This function is not normally needed to be called as the ioproc_ops
522 +struct is unlinked from the associated mm_struct during the
523 +ioproc_release() call.
525 +This function must be called whilst holding the mm->page_table_lock.
529 +A linked list ioproc_ops structures is hung off the user process
530 +mm_struct (linux/sched.h). At each hook point in the patched kernel,
531 +the ioproc patch will call the associated ioproc_ops callback function
532 +pointer in turn for each registered structure.
534 +The intention of the callbacks is to allow the IOPROC device driver to
535 +inspect the new or modified PTE entry via the Linux kernel
536 +(e.g. find_pte_map()). These callbacks should not modify the Linux
537 +kernel VM state or PTE entries.
539 +The ioproc_ops callback function pointers are:
543 +The release hook is called when a program exits and all it's vma areas
544 +are torn down and unmapped, i.e. during exit_mmap(). Before each
545 +release hook is called the ioproc_ops structure is unlinked from the
548 +No locks are required as the process has the only reference to the mm
551 +ioproc_sync_[range|page]
552 +========================
553 +The sync hooks are called when a memory map is synchronised with its
554 +disk image i.e. when the msync() syscall is invoked. Any future read
555 +or write by the IOPROC device to the associated pages should cause the
556 +page to be marked as referenced or modified.
558 +Called holding the mm->page_table_lock.
560 +ioproc_invalidate_[range|page]
561 +==============================
562 +The invalidate hooks are called whenever a valid PTE is unloaded
563 +e.g. when a page is unmapped by the user or paged out by the
564 +kernel. After this call the IOPROC must not access the physical memory
565 +again unless a new translation is loaded.
567 +Called holding the mm->page_table_lock.
569 +ioproc_update_[range|page]
570 +==========================
571 +The update hooks are called whenever a valid PTE is loaded
572 +e.g. mmaping memory, moving the brk up, when breaking COW or faulting
573 +in an anonymous page of memory. These give the IOPROC device the
574 +opportunity to load translations speculatively, which can improve
575 +performance by avoiding device translation faults.
577 +Called holding the mm->page_table_lock.
579 +ioproc_change_protection
580 +========================
581 +This hook is called when the protection on a region of memory is
582 +changed i.e. when the mprotect() syscall is invoked.
584 +The IOPROC must not be able to write to a read-only page, so if the
585 +permissions are downgraded then it must honour them. If they are
586 +upgraded it can treat this in the same way as the
587 +ioproc_update_[range|page]() calls.
589 +Called holding the mm->page_table_lock.
592 +Linux 2.6 IOPROC patch details
593 +==============================
595 +Here are the specific details of each ioproc hook added to the Linux
596 +2.6 VM system and the reasons for doing so:
612 + ioproc_invalidate_page
618 + filemap_populate, shmem_populate
630 + filemap_populate, shmem_populate
646 + read_zero_pagealigned, madvise_dontneed, unmap_mapping_range,
647 + unmap_mapping_range_list, do_mmap_pgoff
650 + set_pte (unmap_vmas)
653 + ioproc_invalidate_range
660 + read_zero_pagealigned, mmap_zero
663 + set_pte (zeromap_pte_range)
666 + ioproc_invalidate_range
667 + ioproc_update_range
674 + many device drivers
677 + set_pte (remap_pte_range)
680 + ioproc_invalidate_range
681 + ioproc_update_range
694 + ioproc_invalidate_page
702 + do_swap_page, handle_pte_fault
705 + ptep_set_access_flags
741 + do_file_page, handle_pte_fault
760 + set_pte (unmap_vmas)
763 + ioproc_invalidate_range
773 + set_pte (unmap_vmas)
789 + set_pte (change_pte_range)
792 + ioproc_change_protection
805 + ptep_clear_flush (move_one_page)
808 + ioproc_invalidate_range
809 + ioproc_invalidate_range
819 + try_to_unmap_anon, try_to_unmap_file
825 + ioproc_invalidate_page
829 + try_to_unmap_cluster
838 + ioproc_invalidate_page
852 + ptep_clear_flush_dirty (filemap_sync_pte)
865 + hugetlb_vmtruncate_list
868 + ptep_get_and_clear (unmap_hugepage_range)
871 + ioproc_invalidate_range
873 +-- Last update Daniel J Blueman - 24 Mar 2006
874 Index: linux-269-5502/mm/ioproc.c
875 ===================================================================
877 +++ linux-269-5502/mm/ioproc.c
880 + * Copyright (C) 2006 Quadrics Ltd
882 + * This program is free software; you can redistribute it and/or modify
883 + * it under the terms of the GNU General Public License as published by
884 + * the Free Software Foundation; either version 2 of the License, or
885 + * (at your option) any later version.
887 + * This program is distributed in the hope that it will be useful,
888 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
889 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
890 + * GNU General Public License for more details.
892 + * You should have received a copy of the GNU General Public License
893 + * along with this program; if not, write to the Free Software
894 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
898 + * Registration for IO processor page table updates.
901 +#include <linux/kernel.h>
902 +#include <linux/module.h>
904 +#include <linux/mm.h>
905 +#include <linux/ioproc.h>
907 +int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip)
909 + ip->next = mm->ioproc_ops;
910 + mm->ioproc_ops = ip;
915 +EXPORT_SYMBOL_GPL(ioproc_register_ops);
917 +int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip)
919 + struct ioproc_ops **tmp;
921 + for (tmp = &mm->ioproc_ops; *tmp && *tmp != ip; tmp = &(*tmp)->next) ;
930 +EXPORT_SYMBOL_GPL(ioproc_unregister_ops);
931 Index: linux-269-5502/mm/hugetlb.c
932 ===================================================================
933 --- linux-269-5502.orig/mm/hugetlb.c
934 +++ linux-269-5502/mm/hugetlb.c
936 #include <linux/hugetlb.h>
937 #include <linux/sysctl.h>
938 #include <linux/highmem.h>
939 +#include <linux/ioproc.h>
941 const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL;
942 static unsigned long nr_huge_pages, free_huge_pages;
943 @@ -260,6 +261,7 @@ void zap_hugepage_range(struct vm_area_s
944 struct mm_struct *mm = vma->vm_mm;
946 spin_lock(&mm->page_table_lock);
947 + ioproc_invalidate_range(vma, start, start + length);
948 unmap_hugepage_range(vma, start, start + length);
949 spin_unlock(&mm->page_table_lock);
951 Index: linux-269-5502/mm/Kconfig
952 ===================================================================
954 +++ linux-269-5502/mm/Kconfig
957 +# VM subsystem specific config
960 +# Support for IO processors which have advanced RDMA capabilities
963 + bool "Enable IOPROC VM hooks"
967 + This option enables hooks in the VM subsystem so that IO devices which
968 + incorporate advanced RDMA capabilities can be kept in sync with CPU
969 + page table changes.
970 + See Documentation/vm/ioproc.txt for more details.
971 Index: linux-269-5502/mm/Makefile
972 ===================================================================
973 --- linux-269-5502.orig/mm/Makefile
974 +++ linux-269-5502/mm/Makefile
975 @@ -16,6 +16,7 @@ obj-$(CONFIG_SWAP) += page_io.o swap_sta
976 obj-$(CONFIG_X86_4G) += usercopy.o
977 obj-$(CONFIG_HUGETLBFS) += hugetlb.o
978 obj-$(CONFIG_NUMA) += mempolicy.o
979 +obj-$(CONFIG_IOPROC) += ioproc.o
980 obj-$(CONFIG_SHMEM) += shmem.o
981 obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o
983 Index: linux-269-5502/mm/mprotect.c
984 ===================================================================
985 --- linux-269-5502.orig/mm/mprotect.c
986 +++ linux-269-5502/mm/mprotect.c
989 #include <linux/mm.h>
990 #include <linux/hugetlb.h>
991 +#include <linux/ioproc.h>
992 #include <linux/slab.h>
993 #include <linux/shm.h>
994 #include <linux/mman.h>
995 @@ -100,6 +101,7 @@ change_protection(struct vm_area_struct
998 spin_lock(¤t->mm->page_table_lock);
999 + ioproc_change_protection(vma, start, end, newprot);
1001 change_pmd_range(dir, start, end - start, newprot);
1002 start = (start + PGDIR_SIZE) & PGDIR_MASK;
1003 Index: linux-269-5502/mm/msync.c
1004 ===================================================================
1005 --- linux-269-5502.orig/mm/msync.c
1006 +++ linux-269-5502/mm/msync.c
1008 #include <linux/mm.h>
1009 #include <linux/mman.h>
1010 #include <linux/hugetlb.h>
1011 +#include <linux/ioproc.h>
1013 #include <asm/pgtable.h>
1014 #include <asm/tlbflush.h>
1015 @@ -115,6 +116,7 @@ static int filemap_sync(struct vm_area_s
1019 + ioproc_sync_range(vma, address, end);
1021 error |= filemap_sync_pmd_range(dir, address, end, vma, flags);
1022 address = (address + PGDIR_SIZE) & PGDIR_MASK;
1023 Index: linux-269-5502/mm/mremap.c
1024 ===================================================================
1025 --- linux-269-5502.orig/mm/mremap.c
1026 +++ linux-269-5502/mm/mremap.c
1029 #include <linux/mm.h>
1030 #include <linux/hugetlb.h>
1031 +#include <linux/ioproc.h>
1032 #include <linux/slab.h>
1033 #include <linux/shm.h>
1034 #include <linux/mman.h>
1035 @@ -148,6 +149,8 @@ static unsigned long move_page_tables(st
1037 unsigned long offset;
1039 + ioproc_invalidate_range(vma, old_addr, old_addr + len);
1040 + ioproc_invalidate_range(vma, new_addr, new_addr + len);
1041 flush_cache_range(vma, old_addr, old_addr + len);
1044 Index: linux-269-5502/mm/fremap.c
1045 ===================================================================
1046 --- linux-269-5502.orig/mm/fremap.c
1047 +++ linux-269-5502/mm/fremap.c
1049 #include <linux/mman.h>
1050 #include <linux/pagemap.h>
1051 #include <linux/swapops.h>
1052 +#include <linux/ioproc.h>
1053 #include <linux/rmap.h>
1054 #include <linux/module.h>
1056 @@ -29,6 +30,7 @@ static inline void zap_pte(struct mm_str
1057 if (pte_present(pte)) {
1058 unsigned long pfn = pte_pfn(pte);
1060 + ioproc_invalidate_page(vma, addr);
1061 flush_cache_page(vma, addr);
1062 pte = ptep_clear_flush(vma, addr, ptep);
1063 if (pfn_valid(pfn)) {
1064 @@ -93,6 +95,7 @@ int install_page(struct mm_struct *mm, s
1067 update_mmu_cache(vma, addr, pte_val);
1068 + ioproc_update_page(vma, addr);
1072 @@ -132,6 +135,7 @@ int install_file_pte(struct mm_struct *m
1075 update_mmu_cache(vma, addr, pte_val);
1076 + ioproc_update_page(vma, addr);
1077 spin_unlock(&mm->page_table_lock);
1080 Index: linux-269-5502/mm/rmap.c
1081 ===================================================================
1082 --- linux-269-5502.orig/mm/rmap.c
1083 +++ linux-269-5502/mm/rmap.c
1085 #include <linux/slab.h>
1086 #include <linux/init.h>
1087 #include <linux/rmap.h>
1088 +#include <linux/ioproc.h>
1089 #include <linux/rcupdate.h>
1091 #include <asm/tlbflush.h>
1092 @@ -566,6 +567,7 @@ static int try_to_unmap_one(struct page
1095 /* Nuke the page table entry. */
1096 + ioproc_invalidate_page(vma, address);
1097 flush_cache_page(vma, address);
1098 pteval = ptep_clear_flush(vma, address, pte);
1100 @@ -673,6 +675,7 @@ static void try_to_unmap_cluster(unsigne
1103 /* Nuke the page table entry. */
1104 + ioproc_invalidate_page(vma, address);
1105 flush_cache_page(vma, address);
1106 pteval = ptep_clear_flush(vma, address, pte);
1108 Index: linux-269-5502/mm/memory.c
1109 ===================================================================
1110 --- linux-269-5502.orig/mm/memory.c
1111 +++ linux-269-5502/mm/memory.c
1113 #include <linux/swap.h>
1114 #include <linux/highmem.h>
1115 #include <linux/pagemap.h>
1116 +#include <linux/ioproc.h>
1117 #include <linux/rmap.h>
1118 #include <linux/module.h>
1119 #include <linux/init.h>
1120 @@ -630,6 +631,7 @@ void zap_page_range(struct vm_area_struc
1123 spin_lock(&mm->page_table_lock);
1124 + ioproc_invalidate_range(vma, address, end);
1125 tlb = tlb_gather_mmu(mm, 0);
1126 unmap_vmas(&tlb, mm, vma, address, end, &nr_accounted, details);
1127 tlb_finish_mmu(tlb, address, end);
1128 @@ -998,6 +1000,7 @@ int zeromap_page_range(struct vm_area_st
1131 spin_lock(&mm->page_table_lock);
1132 + ioproc_invalidate_range(vma, beg, end);
1134 pmd_t *pmd = pmd_alloc(mm, dir, address);
1136 @@ -1012,6 +1015,7 @@ int zeromap_page_range(struct vm_area_st
1138 * Why flush? zeromap_pte_range has a BUG_ON for !pte_none()
1140 + ioproc_update_range(vma, beg, end);
1141 flush_tlb_range(vma, beg, end);
1142 spin_unlock(&mm->page_table_lock);
1144 @@ -1092,6 +1096,7 @@ int remap_page_range(struct vm_area_stru
1145 vma->vm_flags |= VM_IO | VM_RESERVED;
1147 spin_lock(&mm->page_table_lock);
1148 + ioproc_invalidate_range(vma, beg, end);
1150 pmd_t *pmd = pmd_alloc(mm, dir, from);
1152 @@ -1106,6 +1111,7 @@ int remap_page_range(struct vm_area_stru
1154 * Why flush? remap_pte_range has a BUG_ON for !pte_none()
1156 + ioproc_update_range(vma, beg, end);
1157 flush_tlb_range(vma, beg, end);
1158 spin_unlock(&mm->page_table_lock);
1160 @@ -1194,6 +1200,7 @@ static int do_wp_page(struct mm_struct *
1161 update_mmu_cache(vma, address, entry);
1162 lazy_mmu_prot_update(entry);
1163 pte_unmap(page_table);
1164 + ioproc_update_page(vma, address);
1165 spin_unlock(&mm->page_table_lock);
1166 return VM_FAULT_MINOR;
1168 @@ -1226,6 +1233,7 @@ static int do_wp_page(struct mm_struct *
1171 page_remove_rmap(old_page);
1172 + ioproc_invalidate_page(vma, address);
1173 break_cow(vma, new_page, address, page_table);
1174 lru_cache_add_active(new_page);
1175 page_add_anon_rmap(new_page, vma, address);
1176 @@ -1234,6 +1242,7 @@ static int do_wp_page(struct mm_struct *
1177 new_page = old_page;
1179 pte_unmap(page_table);
1180 + ioproc_update_page(vma, address);
1181 page_cache_release(new_page);
1182 page_cache_release(old_page);
1183 spin_unlock(&mm->page_table_lock);
1184 @@ -1630,6 +1639,7 @@ static int do_swap_page(struct mm_struct
1185 update_mmu_cache(vma, address, pte);
1186 lazy_mmu_prot_update(pte);
1187 pte_unmap(page_table);
1188 + ioproc_update_page(vma, address);
1189 spin_unlock(&mm->page_table_lock);
1192 @@ -1695,6 +1705,7 @@ do_anonymous_page(struct mm_struct *mm,
1193 /* No need to invalidate - it was non-present before */
1194 update_mmu_cache(vma, addr, entry);
1195 lazy_mmu_prot_update(entry);
1196 + ioproc_update_page(vma, addr);
1197 spin_unlock(&mm->page_table_lock);
1199 return VM_FAULT_MINOR;
1200 @@ -1813,6 +1824,7 @@ retry:
1202 /* no need to invalidate: a not-present page shouldn't be cached */
1203 update_mmu_cache(vma, address, entry);
1204 + ioproc_update_page(vma, address);
1205 spin_unlock(&mm->page_table_lock);
1208 @@ -1998,6 +2010,7 @@ int make_pages_present(unsigned long add
1210 return ret == len ? 0 : -1;
1212 +EXPORT_SYMBOL(make_pages_present);
1215 * Map a vmalloc()-space virtual address to the physical page.
1216 Index: linux-269-5502/mm/mmap.c
1217 ===================================================================
1218 --- linux-269-5502.orig/mm/mmap.c
1219 +++ linux-269-5502/mm/mmap.c
1221 #include <linux/init.h>
1222 #include <linux/file.h>
1223 #include <linux/fs.h>
1224 +#include <linux/ioproc.h>
1225 #include <linux/personality.h>
1226 #include <linux/security.h>
1227 #include <linux/hugetlb.h>
1228 @@ -1703,6 +1704,7 @@ static void unmap_region(struct mm_struc
1229 unsigned long nr_accounted = 0;
1232 + ioproc_invalidate_range(vma, start, end);
1233 tlb = tlb_gather_mmu(mm, 0);
1234 unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted, NULL);
1235 vm_unacct_memory(nr_accounted);
1236 @@ -1995,6 +1997,7 @@ void exit_mmap(struct mm_struct *mm)
1238 spin_lock(&mm->page_table_lock);
1240 + ioproc_release(mm);
1241 tlb = tlb_gather_mmu(mm, 1);
1243 /* Use ~0UL here to ensure all VMAs in the mm are unmapped */
1244 Index: linux-269-5502/ipc/shm.c
1245 ===================================================================
1246 --- linux-269-5502.orig/ipc/shm.c
1247 +++ linux-269-5502/ipc/shm.c
1249 #include <linux/proc_fs.h>
1250 #include <linux/shmem_fs.h>
1251 #include <linux/security.h>
1252 +#include <linux/module.h>
1253 #include <linux/audit.h>
1254 #include <asm/uaccess.h>
1256 @@ -856,6 +857,44 @@ asmlinkage long sys_shmdt(char __user *s
1261 + * Mark all segments created by this process for destruction
1263 +int shm_cleanup (void)
1267 + down(&shm_ids.sem);
1269 + for (i = 0; i <= shm_ids.max_id; i++) {
1270 + struct shmid_kernel *shp;
1272 + shp = shm_lock(i);
1273 + if (shp != NULL) {
1274 + /* mark this segment for destruction if we created it */
1275 + if (current->pid == shp->shm_cprid)
1277 + /* copy of IPC_RMID code */
1278 + if (shp->shm_nattch) {
1279 + shp->shm_flags |= SHM_DEST;
1280 + /* do not find it any more */
1281 + shp->shm_perm.key = IPC_PRIVATE;
1296 +EXPORT_SYMBOL_GPL(shm_cleanup);
1298 #ifdef CONFIG_PROC_FS
1299 static int sysvipc_shm_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
1301 Index: linux-269-5502/include/linux/init_task.h
1302 ===================================================================
1303 --- linux-269-5502.orig/include/linux/init_task.h
1304 +++ linux-269-5502/include/linux/init_task.h
1306 #define _LINUX__INIT_TASK_H
1308 #include <linux/file.h>
1309 +#include <linux/ptrack.h>
1311 #define INIT_FILES \
1313 @@ -112,6 +113,7 @@ extern struct group_info init_groups;
1314 .proc_lock = SPIN_LOCK_UNLOCKED, \
1315 .switch_lock = SPIN_LOCK_UNLOCKED, \
1316 .journal_info = NULL, \
1317 + INIT_TASK_PTRACK(tsk) \
1321 Index: linux-269-5502/include/linux/ioproc.h
1322 ===================================================================
1324 +++ linux-269-5502/include/linux/ioproc.h
1327 + * Copyright (C) 2006 Quadrics Ltd
1329 + * This program is free software; you can redistribute it and/or modify
1330 + * it under the terms of the GNU General Public License as published by
1331 + * the Free Software Foundation; either version 2 of the License, or
1332 + * (at your option) any later version.
1334 + * This program is distributed in the hope that it will be useful,
1335 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1336 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1337 + * GNU General Public License for more details.
1339 + * You should have received a copy of the GNU General Public License
1340 + * along with this program; if not, write to the Free Software
1341 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1345 + * Callbacks for IO processor page table updates.
1348 +#ifndef __LINUX_IOPROC_H__
1349 +#define __LINUX_IOPROC_H__
1351 +#include <linux/sched.h>
1352 +#include <linux/mm.h>
1354 +typedef struct ioproc_ops {
1355 + struct ioproc_ops *next;
1358 + void (*release) (void *arg, struct mm_struct * mm);
1359 + void (*sync_range) (void *arg, struct vm_area_struct * vma,
1360 + unsigned long start, unsigned long end);
1361 + void (*invalidate_range) (void *arg, struct vm_area_struct * vma,
1362 + unsigned long start, unsigned long end);
1363 + void (*update_range) (void *arg, struct vm_area_struct * vma,
1364 + unsigned long start, unsigned long end);
1366 + void (*change_protection) (void *arg, struct vm_area_struct * vma,
1367 + unsigned long start, unsigned long end,
1368 + pgprot_t newprot);
1370 + void (*sync_page) (void *arg, struct vm_area_struct * vma,
1371 + unsigned long address);
1372 + void (*invalidate_page) (void *arg, struct vm_area_struct * vma,
1373 + unsigned long address);
1374 + void (*update_page) (void *arg, struct vm_area_struct * vma,
1375 + unsigned long address);
1379 +/* IOPROC Registration
1381 + * Called by the IOPROC device driver to register its interest in page table
1382 + * changes for the process associated with the supplied mm_struct
1384 + * The caller should first allocate and fill out an ioproc_ops structure with
1385 + * the function pointers initialised to the device driver specific code for
1386 + * each callback. If the device driver doesn't have code for a particular
1387 + * callback then it should set the function pointer to be NULL.
1388 + * The ioproc_ops arg parameter will be passed unchanged as the first argument
1389 + * to each callback function invocation.
1391 + * The ioproc registration is not inherited across fork() and should be called
1392 + * once for each process that the IOPROC device driver is interested in.
1394 + * Must be called holding the mm->page_table_lock
1396 +extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip);
1398 +/* IOPROC De-registration
1400 + * Called by the IOPROC device driver when it is no longer interested in page
1401 + * table changes for the process associated with the supplied mm_struct
1403 + * Normally this is not needed to be called as the ioproc_release() code will
1404 + * automatically unlink the ioproc_ops struct from the mm_struct as the
1407 + * Must be called holding the mm->page_table_lock
1409 +extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip);
1411 +#ifdef CONFIG_IOPROC
1415 + * Called during exit_mmap() as all vmas are torn down and unmapped.
1417 + * Also unlinks the ioproc_ops structure from the mm list as it goes.
1419 + * No need for locks as the mm can no longer be accessed at this point
1422 +static inline void ioproc_release(struct mm_struct *mm)
1424 + struct ioproc_ops *cp;
1426 + while ((cp = mm->ioproc_ops) != NULL) {
1427 + mm->ioproc_ops = cp->next;
1430 + cp->release(cp->arg, mm);
1434 +/* IOPROC SYNC RANGE
1436 + * Called when a memory map is synchronised with its disk image i.e. when the
1437 + * msync() syscall is invoked. Any future read or write to the associated
1438 + * pages by the IOPROC should cause the page to be marked as referenced or
1441 + * Called holding the mm->page_table_lock
1444 +ioproc_sync_range(struct vm_area_struct *vma, unsigned long start,
1445 + unsigned long end)
1447 + struct ioproc_ops *cp;
1449 + for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
1450 + if (cp->sync_range)
1451 + cp->sync_range(cp->arg, vma, start, end);
1454 +/* IOPROC INVALIDATE RANGE
1456 + * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the
1457 + * user or paged out by the kernel.
1459 + * After this call the IOPROC must not access the physical memory again unless
1460 + * a new translation is loaded.
1462 + * Called holding the mm->page_table_lock
1465 +ioproc_invalidate_range(struct vm_area_struct *vma, unsigned long start,
1466 + unsigned long end)
1468 + struct ioproc_ops *cp;
1470 + for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
1471 + if (cp->invalidate_range)
1472 + cp->invalidate_range(cp->arg, vma, start, end);
1475 +/* IOPROC UPDATE RANGE
1477 + * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk
1478 + * up, when breaking COW or faulting in an anonymous page of memory.
1480 + * These give the IOPROC device driver the opportunity to load translations
1481 + * speculatively, which can improve performance by avoiding device translation
1484 + * Called holding the mm->page_table_lock
1487 +ioproc_update_range(struct vm_area_struct *vma, unsigned long start,
1488 + unsigned long end)
1490 + struct ioproc_ops *cp;
1492 + for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
1493 + if (cp->update_range)
1494 + cp->update_range(cp->arg, vma, start, end);
1497 +/* IOPROC CHANGE PROTECTION
1499 + * Called when the protection on a region of memory is changed i.e. when the
1500 + * mprotect() syscall is invoked.
1502 + * The IOPROC must not be able to write to a read-only page, so if the
1503 + * permissions are downgraded then it must honour them. If they are upgraded
1504 + * it can treat this in the same way as the ioproc_update_[range|sync]() calls
1506 + * Called holding the mm->page_table_lock
1509 +ioproc_change_protection(struct vm_area_struct *vma, unsigned long start,
1510 + unsigned long end, pgprot_t newprot)
1512 + struct ioproc_ops *cp;
1514 + for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
1515 + if (cp->change_protection)
1516 + cp->change_protection(cp->arg, vma, start, end,
1520 +/* IOPROC SYNC PAGE
1522 + * Called when a memory map is synchronised with its disk image i.e. when the
1523 + * msync() syscall is invoked. Any future read or write to the associated page
1524 + * by the IOPROC should cause the page to be marked as referenced or modified.
1526 + * Not currently called as msync() calls ioproc_sync_range() instead
1528 + * Called holding the mm->page_table_lock
1531 +ioproc_sync_page(struct vm_area_struct *vma, unsigned long addr)
1533 + struct ioproc_ops *cp;
1535 + for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
1536 + if (cp->sync_page)
1537 + cp->sync_page(cp->arg, vma, addr);
1540 +/* IOPROC INVALIDATE PAGE
1542 + * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the
1543 + * user or paged out by the kernel.
1545 + * After this call the IOPROC must not access the physical memory again unless
1546 + * a new translation is loaded.
1548 + * Called holding the mm->page_table_lock
1551 +ioproc_invalidate_page(struct vm_area_struct *vma, unsigned long addr)
1553 + struct ioproc_ops *cp;
1555 + for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
1556 + if (cp->invalidate_page)
1557 + cp->invalidate_page(cp->arg, vma, addr);
1560 +/* IOPROC UPDATE PAGE
1562 + * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk
1563 + * up, when breaking COW or faulting in an anoymous page of memory.
1565 + * These give the IOPROC device the opportunity to load translations
1566 + * speculatively, which can improve performance by avoiding device translation
1569 + * Called holding the mm->page_table_lock
1572 +ioproc_update_page(struct vm_area_struct *vma, unsigned long addr)
1574 + struct ioproc_ops *cp;
1576 + for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
1577 + if (cp->update_page)
1578 + cp->update_page(cp->arg, vma, addr);
1583 +/* ! CONFIG_IOPROC so make all hooks empty */
1585 +#define ioproc_release(mm) do { } while (0)
1586 +#define ioproc_sync_range(vma, start, end) do { } while (0)
1587 +#define ioproc_invalidate_range(vma, start, end) do { } while (0)
1588 +#define ioproc_update_range(vma, start, end) do { } while (0)
1589 +#define ioproc_change_protection(vma, start, end, prot) do { } while (0)
1590 +#define ioproc_sync_page(vma, addr) do { } while (0)
1591 +#define ioproc_invalidate_page(vma, addr) do { } while (0)
1592 +#define ioproc_update_page(vma, addr) do { } while (0)
1594 +#endif /* CONFIG_IOPROC */
1595 +#endif /* __LINUX_IOPROC_H__ */
1596 Index: linux-269-5502/include/linux/sched.h
1597 ===================================================================
1598 --- linux-269-5502.orig/include/linux/sched.h
1599 +++ linux-269-5502/include/linux/sched.h
1600 @@ -185,6 +185,9 @@ extern signed long schedule_timeout_unin
1601 asmlinkage void schedule(void);
1604 +#ifdef CONFIG_IOPROC
1608 /* Maximum number of active map areas.. This is a random (large) number */
1609 #define DEFAULT_MAX_MAP_COUNT 65536
1610 @@ -260,6 +263,11 @@ struct mm_struct {
1611 struct kioctx *ioctx_list;
1613 struct kioctx default_kioctx;
1615 +#ifdef CONFIG_IOPROC
1616 + /* hooks for io devices with advanced RDMA capabilities */
1617 + struct ioproc_ops *ioproc_ops;
1621 extern int mmlist_nr;
1622 @@ -635,6 +643,10 @@ struct task_struct {
1623 struct mempolicy *mempolicy;
1624 short il_next; /* could be shared with used_math */
1626 +#ifdef CONFIG_PTRACK
1627 +/* process tracking callback */
1628 + struct list_head ptrack_list;
1632 static inline pid_t process_group(struct task_struct *tsk)
1633 Index: linux-269-5502/include/linux/ptrack.h
1634 ===================================================================
1636 +++ linux-269-5502/include/linux/ptrack.h
1639 + * Copyright (C) 2000 Regents of the University of California
1641 + * This program is free software; you can redistribute it and/or modify
1642 + * it under the terms of the GNU General Public License as published by
1643 + * the Free Software Foundation; either version 2 of the License, or
1644 + * (at your option) any later version.
1646 + * This program is distributed in the hope that it will be useful,
1647 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1648 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1649 + * GNU General Public License for more details.
1651 + * You should have received a copy of the GNU General Public License
1652 + * along with this program; if not, write to the Free Software
1653 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1655 + * Derived from exit_actn.c by
1656 + * Copyright (C) 2003 Quadrics Ltd.
1659 +#ifndef __LINUX_PTRACK_H
1660 +#define __LINUX_PTRACK_H
1663 + * Process tracking - this allows a module to keep track of processes
1664 + * in order that it can manage all tasks derived from a single process.
1667 +#define PTRACK_PHASE_CLONE 1
1668 +#define PTRACK_PHASE_CLONE_FAIL 2
1669 +#define PTRACK_PHASE_EXEC 3
1670 +#define PTRACK_PHASE_EXIT 4
1672 +#define PTRACK_FINISHED 0
1673 +#define PTRACK_INNHERIT 1
1674 +#define PTRACK_DENIED 2
1676 +#ifdef CONFIG_PTRACK
1678 +typedef int (*ptrack_callback_t)(void *arg, int phase, struct task_struct *child);
1680 +struct ptrack_desc {
1681 + struct list_head link;
1682 + ptrack_callback_t callback;
1686 +extern int ptrack_register (ptrack_callback_t callback, void *arg);
1687 +extern void ptrack_deregister (ptrack_callback_t callback, void *arg);
1688 +extern int ptrack_registered (ptrack_callback_t callback, void *arg);
1690 +extern int ptrack_call_callbacks (int phase, struct task_struct *child);
1692 +#define INIT_TASK_PTRACK(tsk) \
1693 + .ptrack_list = LIST_HEAD_INIT(tsk.ptrack_list)
1696 +#define ptrack_call_callbacks(phase, child) (0)
1698 +#define INIT_TASK_PTRACK(tsk)
1702 +#endif /* __LINUX_PTRACK_H */
1703 Index: linux-269-5502/include/asm-ia64/param.h
1704 ===================================================================
1705 --- linux-269-5502.orig/include/asm-ia64/param.h
1706 +++ linux-269-5502/include/asm-ia64/param.h
1715 # define CLOCKS_PER_SEC HZ /* frequency at which times() counts */
1716 Index: linux-269-5502/include/asm-i386/param.h
1717 ===================================================================
1718 --- linux-269-5502.orig/include/asm-i386/param.h
1719 +++ linux-269-5502/include/asm-i386/param.h
1721 #define _ASMi386_PARAM_H
1724 -# define HZ 1000 /* Internal kernel timer frequency */
1725 +# define HZ 100 /* Internal kernel timer frequency */
1726 # define USER_HZ 100 /* .. some user interfaces are in "ticks" */
1727 # define CLOCKS_PER_SEC (USER_HZ) /* like times() */
1729 Index: linux-269-5502/include/asm-x86_64/param.h
1730 ===================================================================
1731 --- linux-269-5502.orig/include/asm-x86_64/param.h
1732 +++ linux-269-5502/include/asm-x86_64/param.h
1734 #define _ASMx86_64_PARAM_H
1737 -# define HZ 1000 /* Internal kernel timer frequency */
1738 +# define HZ 100 /* Internal kernel timer frequency */
1739 # define USER_HZ 100 /* .. some user interfaces are in "ticks */
1740 #define CLOCKS_PER_SEC (USER_HZ) /* like times() */