Subject: patch for vs2.3.0.36.29.6 on 2.6.32.29
From: Corey Wright <undefined@pobox.com>
Date: Sat, 26 Feb 2011 23:10:19 -0600
Sat, 26 Feb 2011 23:10:19 -0600
applying patch-2.6.32.28-vs2.3.0.36.29.6.diff to 2.6.32.29 generated the
following rejects:

 * kernel/sched.c
  - removal of USER_SCHED (and associated preprocessor logic with comment)
 * kernel/sched_fair.c
  - clock => clock_task (due to addition of IRQ_TIME_ACCOUNTING)
 * kernel/user.c
  - removal of USER_SCHED
 * Makefile
  - .28 => .29

the two attachments:
 1. record the above rejects (patch log)
 2. apply the rejected patches (patch file)

to clarify how/when to use the attached patch file:
 1. acquire 2.6.32.29 (by downloading, patching up to, etc)
 2. apply herbert's patch-2.6.32.28-vs2.3.0.36.29.6.diff
 3. apply attached patch-2.6.32.28-29-vs2.3.0.36.29.6-fixes.diff

i've tested my patch by:
 1. compiling 2.6.32.29-vs2.3.0.36.29.6
 2. using cgroups (ie cpu.shares) to schedule multiple vservers

my patch provides no warranty and my testing might have proven nothing
about my patch.

corey
-- 
undefined@pobox.com


diff -urNpd a/Makefile b/Makefile
--- a/Makefile	2011-02-25 01:15:47.000000000 -0600
+++ b/Makefile	2011-02-25 00:18:55.000000000 -0600
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 32
-EXTRAVERSION = .29
+EXTRAVERSION = .29-vs2.3.0.36.29.6
 NAME = Man-Eating Seals of Antiquity
 
 # *DOCUMENTATION*
diff -urNpd a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c	2011-02-25 01:15:47.000000000 -0600
+++ b/kernel/sched.c	2011-02-25 00:46:34.000000000 -0600
@@ -9949,6 +9949,10 @@ void __init sched_init(void)
 			global_rt_period(), global_rt_runtime());
 #endif /* CONFIG_RT_GROUP_SCHED */
 
+#ifdef CONFIG_FAIR_GROUP_SCHED
+	init_cfs_bandwidth(&init_task_group);
+#endif
+
 #ifdef CONFIG_CGROUP_SCHED
 	list_add(&init_task_group.list, &task_groups);
 	INIT_LIST_HEAD(&init_task_group.children);
diff -urNpd a/kernel/sched_fair.c b/kernel/sched_fair.c
--- a/kernel/sched_fair.c	2011-02-25 01:15:47.000000000 -0600
+++ b/kernel/sched_fair.c	2011-02-25 01:07:26.000000000 -0600
@@ -793,14 +793,25 @@ __update_curr(struct cfs_rq *cfs_rq, str
 	update_min_vruntime(cfs_rq);
 }
 
-static void update_curr(struct cfs_rq *cfs_rq)
+static void update_curr_task(struct sched_entity *curr,
+		unsigned long delta_exec)
+{
+	struct task_struct *curtask = task_of(curr);
+
+	trace_sched_stat_runtime(curtask, delta_exec, curr->vruntime);
+	cpuacct_charge(curtask, delta_exec);
+	account_group_exec_runtime(curtask, delta_exec);
+}
+
+static int update_curr_common(struct cfs_rq *cfs_rq, unsigned long *delta)
 {
 	struct sched_entity *curr = cfs_rq->curr;
-	u64 now = rq_of(cfs_rq)->clock_task;
+	struct rq *rq = rq_of(cfs_rq);
+	u64 now = rq->clock_task;
 	unsigned long delta_exec;
 
 	if (unlikely(!curr))
-		return;
+		return 1;
 
 	/*
 	 * Get the amount of time the current task was running





patching file arch/alpha/Kconfig
patching file arch/alpha/kernel/entry.S
patching file arch/alpha/kernel/osf_sys.c
patching file arch/alpha/kernel/ptrace.c
patching file arch/alpha/kernel/systbls.S
patching file arch/alpha/kernel/traps.c
patching file arch/alpha/mm/fault.c
patching file arch/arm/include/asm/tlb.h
patching file arch/arm/Kconfig
patching file arch/arm/kernel/calls.S
patching file arch/arm/kernel/process.c
patching file arch/arm/kernel/traps.c
patching file arch/avr32/mm/fault.c
patching file arch/cris/Kconfig
patching file arch/cris/mm/fault.c
patching file arch/frv/kernel/kernel_thread.S
patching file arch/frv/mm/fault.c
patching file arch/h8300/Kconfig
patching file arch/ia64/ia32/ia32_entry.S
patching file arch/ia64/include/asm/tlb.h
patching file arch/ia64/Kconfig
patching file arch/ia64/kernel/entry.S
patching file arch/ia64/kernel/perfmon.c
patching file arch/ia64/kernel/process.c
patching file arch/ia64/kernel/ptrace.c
patching file arch/ia64/kernel/traps.c
patching file arch/ia64/mm/fault.c
patching file arch/m32r/kernel/traps.c
patching file arch/m32r/mm/fault.c
patching file arch/m68k/Kconfig
patching file arch/m68k/kernel/ptrace.c
patching file arch/m68k/kernel/traps.c
patching file arch/m68k/mm/fault.c
patching file arch/m68knommu/Kconfig
patching file arch/m68knommu/kernel/traps.c
patching file arch/microblaze/mm/fault.c
patching file arch/mips/Kconfig
patching file arch/mips/kernel/ptrace.c
patching file arch/mips/kernel/scall32-o32.S
patching file arch/mips/kernel/scall64-64.S
patching file arch/mips/kernel/scall64-n32.S
patching file arch/mips/kernel/scall64-o32.S
patching file arch/mips/kernel/traps.c
patching file arch/mn10300/mm/fault.c
patching file arch/parisc/Kconfig
patching file arch/parisc/kernel/syscall_table.S
patching file arch/parisc/kernel/traps.c
patching file arch/parisc/mm/fault.c
patching file arch/powerpc/include/asm/unistd.h
patching file arch/powerpc/Kconfig
patching file arch/powerpc/kernel/process.c
patching file arch/powerpc/kernel/traps.c
patching file arch/powerpc/kernel/vdso.c
patching file arch/powerpc/mm/fault.c
patching file arch/s390/include/asm/tlb.h
patching file arch/s390/include/asm/unistd.h
patching file arch/s390/Kconfig
patching file arch/s390/kernel/ptrace.c
patching file arch/s390/kernel/syscalls.S
patching file arch/s390/lib/uaccess_pt.c
patching file arch/sh/Kconfig
patching file arch/sh/kernel/irq.c
patching file arch/sh/kernel/vsyscall/vsyscall.c
patching file arch/sh/mm/fault_32.c
patching file arch/sh/mm/tlbflush_64.c
patching file arch/sparc/include/asm/tlb_64.h
patching file arch/sparc/include/asm/unistd.h
patching file arch/sparc/Kconfig
patching file arch/sparc/kernel/systbls_32.S
patching file arch/sparc/kernel/systbls_64.S
patching file arch/um/include/asm/tlb.h
patching file arch/um/Kconfig.rest
patching file arch/x86/ia32/ia32entry.S
patching file arch/x86/include/asm/unistd_64.h
patching file arch/x86/Kconfig
Hunk #1 succeeded at 2100 (offset 11 lines).
patching file arch/x86/kernel/syscall_table_32.S
patching file arch/xtensa/mm/fault.c
patching file Documentation/scheduler/sched-cfs-hard-limits.txt
patching file Documentation/vserver/debug.txt
patching file drivers/block/Kconfig
patching file drivers/block/loop.c
patching file drivers/block/Makefile
patching file drivers/block/vroot.c
patching file drivers/char/sysrq.c
patching file drivers/char/tty_io.c
patching file drivers/infiniband/hw/ipath/ipath_user_pages.c
patching file drivers/md/dm.c
patching file drivers/md/dm.h
patching file drivers/md/dm-ioctl.c
patching file drivers/net/tun.c
patching file fs/attr.c
patching file fs/binfmt_aout.c
patching file fs/binfmt_elf.c
patching file fs/binfmt_flat.c
patching file fs/binfmt_som.c
patching file fs/block_dev.c
patching file fs/btrfs/ctree.h
patching file fs/btrfs/disk-io.c
patching file fs/btrfs/inode.c
patching file fs/btrfs/ioctl.c
patching file fs/btrfs/super.c
patching file fs/char_dev.c
patching file fs/dcache.c
patching file fs/devpts/inode.c
patching file fs/exec.c
patching file fs/ext2/balloc.c
patching file fs/ext2/ext2.h
patching file fs/ext2/file.c
patching file fs/ext2/ialloc.c
patching file fs/ext2/inode.c
patching file fs/ext2/ioctl.c
patching file fs/ext2/namei.c
patching file fs/ext2/super.c
patching file fs/ext3/file.c
patching file fs/ext3/ialloc.c
patching file fs/ext3/inode.c
patching file fs/ext3/ioctl.c
patching file fs/ext3/namei.c
patching file fs/ext3/super.c
patching file fs/ext4/ext4.h
patching file fs/ext4/file.c
patching file fs/ext4/ialloc.c
patching file fs/ext4/inode.c
patching file fs/ext4/ioctl.c
patching file fs/ext4/namei.c
patching file fs/ext4/super.c
patching file fs/fcntl.c
patching file fs/file.c
patching file fs/file_table.c
patching file fs/fs_struct.c
patching file fs/gfs2/file.c
patching file fs/gfs2/inode.h
patching file fs/gfs2/ops_inode.c
patching file fs/hfsplus/ioctl.c
patching file fs/inode.c
patching file fs/ioctl.c
patching file fs/ioprio.c
patching file fs/jfs/acl.c
patching file fs/jfs/file.c
patching file fs/jfs/ioctl.c
patching file fs/jfs/jfs_dinode.h
patching file fs/jfs/jfs_filsys.h
patching file fs/jfs/jfs_imap.c
patching file fs/jfs/jfs_inode.c
patching file fs/jfs/jfs_inode.h
patching file fs/jfs/namei.c
patching file fs/jfs/super.c
patching file fs/libfs.c
patching file fs/locks.c
patching file fs/namei.c
patching file fs/namespace.c
patching file fs/nfs/client.c
patching file fs/nfs/dir.c
patching file fs/nfs/inode.c
patching file fs/nfs/nfs3xdr.c
patching file fs/nfs/nfsroot.c
patching file fs/nfs/super.c
patching file fs/nfsd/auth.c
patching file fs/nfsd/nfs3xdr.c
patching file fs/nfsd/nfs4xdr.c
patching file fs/nfsd/nfsxdr.c
patching file fs/ocfs2/dlm/dlmfs.c
patching file fs/ocfs2/dlmglue.c
patching file fs/ocfs2/dlmglue.h
patching file fs/ocfs2/file.c
patching file fs/ocfs2/inode.c
patching file fs/ocfs2/inode.h
patching file fs/ocfs2/ioctl.c
patching file fs/ocfs2/namei.c
patching file fs/ocfs2/ocfs2_fs.h
patching file fs/ocfs2/ocfs2.h
patching file fs/ocfs2/super.c
patching file fs/open.c
patching file fs/proc/array.c
patching file fs/proc/base.c
patching file fs/proc/generic.c
patching file fs/proc/inode.c
patching file fs/proc/internal.h
patching file fs/proc/loadavg.c
patching file fs/proc/meminfo.c
patching file fs/proc/root.c
patching file fs/proc/uptime.c
patching file fs/quota/quota.c
patching file fs/reiserfs/file.c
patching file fs/reiserfs/inode.c
patching file fs/reiserfs/ioctl.c
patching file fs/reiserfs/namei.c
patching file fs/reiserfs/super.c
patching file fs/reiserfs/xattr.c
patching file fs/stat.c
patching file fs/super.c
patching file fs/sysfs/mount.c
patching file fs/utimes.c
patching file fs/xattr.c
patching file fs/xfs/linux-2.6/xfs_ioctl.c
patching file fs/xfs/linux-2.6/xfs_ioctl.h
patching file fs/xfs/linux-2.6/xfs_iops.c
patching file fs/xfs/linux-2.6/xfs_linux.h
patching file fs/xfs/linux-2.6/xfs_super.c
patching file fs/xfs/xfs_dinode.h
patching file fs/xfs/xfs_fs.h
patching file fs/xfs/xfs_ialloc.c
patching file fs/xfs/xfs_inode.c
patching file fs/xfs/xfs_inode.h
patching file fs/xfs/xfs_itable.c
patching file fs/xfs/xfs_log_recover.c
patching file fs/xfs/xfs_mount.h
patching file fs/xfs/xfs_vnodeops.c
patching file fs/xfs/xfs_vnodeops.h
patching file include/asm-generic/tlb.h
patching file include/linux/capability.h
patching file include/linux/devpts_fs.h
patching file include/linux/ext2_fs.h
patching file include/linux/ext3_fs.h
patching file include/linux/fs.h
patching file include/linux/gfs2_ondisk.h
patching file include/linux/if_tun.h
patching file include/linux/init_task.h
patching file include/linux/ipc.h
patching file include/linux/Kbuild
patching file include/linux/loop.h
patching file include/linux/magic.h
patching file include/linux/major.h
patching file include/linux/memcontrol.h
patching file include/linux/mm_types.h
patching file include/linux/mount.h
patching file include/linux/net.h
patching file include/linux/nfs_mount.h
patching file include/linux/nsproxy.h
patching file include/linux/pid.h
patching file include/linux/proc_fs.h
patching file include/linux/quotaops.h
patching file include/linux/reboot.h
patching file include/linux/reiserfs_fs.h
patching file include/linux/reiserfs_fs_sb.h
patching file include/linux/sched.h
Hunk #2 succeeded at 1188 (offset -7 lines).
Hunk #3 succeeded at 1404 (offset -7 lines).
Hunk #4 succeeded at 1636 (offset -7 lines).
Hunk #5 succeeded at 1654 (offset -7 lines).
Hunk #6 succeeded at 1668 (offset -7 lines).
patching file include/linux/shmem_fs.h
patching file include/linux/stat.h
patching file include/linux/sunrpc/auth.h
patching file include/linux/sunrpc/clnt.h
patching file include/linux/syscalls.h
patching file include/linux/sysctl.h
patching file include/linux/sysfs.h
patching file include/linux/time.h
patching file include/linux/types.h
patching file include/linux/vroot.h
patching file include/linux/vs_base.h
patching file include/linux/vs_context.h
patching file include/linux/vs_cowbl.h
patching file include/linux/vs_cvirt.h
patching file include/linux/vs_device.h
patching file include/linux/vs_dlimit.h
patching file include/linux/vserver/base.h
patching file include/linux/vserver/cacct_cmd.h
patching file include/linux/vserver/cacct_def.h
patching file include/linux/vserver/cacct.h
patching file include/linux/vserver/cacct_int.h
patching file include/linux/vserver/check.h
patching file include/linux/vserver/context_cmd.h
patching file include/linux/vserver/context.h
patching file include/linux/vserver/cvirt_cmd.h
patching file include/linux/vserver/cvirt_def.h
patching file include/linux/vserver/cvirt.h
patching file include/linux/vserver/debug_cmd.h
patching file include/linux/vserver/debug.h
patching file include/linux/vserver/device_cmd.h
patching file include/linux/vserver/device_def.h
patching file include/linux/vserver/device.h
patching file include/linux/vserver/dlimit_cmd.h
patching file include/linux/vserver/dlimit.h
patching file include/linux/vserver/global.h
patching file include/linux/vserver/history.h
patching file include/linux/vserver/inode_cmd.h
patching file include/linux/vserver/inode.h
patching file include/linux/vserver/Kbuild
patching file include/linux/vserver/limit_cmd.h
patching file include/linux/vserver/limit_def.h
patching file include/linux/vserver/limit.h
patching file include/linux/vserver/limit_int.h
patching file include/linux/vserver/monitor.h
patching file include/linux/vserver/network_cmd.h
patching file include/linux/vserver/network.h
patching file include/linux/vserver/percpu.h
patching file include/linux/vserver/pid.h
patching file include/linux/vserver/sched_cmd.h
patching file include/linux/vserver/sched_def.h
patching file include/linux/vserver/sched.h
patching file include/linux/vserver/signal_cmd.h
patching file include/linux/vserver/signal.h
patching file include/linux/vserver/space_cmd.h
patching file include/linux/vserver/space.h
patching file include/linux/vserver/switch.h
patching file include/linux/vserver/tag_cmd.h
patching file include/linux/vserver/tag.h
patching file include/linux/vs_inet6.h
patching file include/linux/vs_inet.h
patching file include/linux/vs_limit.h
patching file include/linux/vs_memory.h
patching file include/linux/vs_network.h
patching file include/linux/vs_pid.h
patching file include/linux/vs_sched.h
patching file include/linux/vs_socket.h
patching file include/linux/vs_tag.h
patching file include/linux/vs_time.h
patching file include/net/addrconf.h
patching file include/net/af_unix.h
patching file include/net/inet_timewait_sock.h
patching file include/net/route.h
patching file include/net/sock.h
patching file init/Kconfig
Hunk #1 succeeded at 426 with fuzz 2 (offset -51 lines).
patching file init/main.c
patching file ipc/mqueue.c
patching file ipc/msg.c
patching file ipc/namespace.c
patching file ipc/sem.c
patching file ipc/shm.c
patching file kernel/capability.c
Hunk #1 succeeded at 14 with fuzz 2.
Hunk #2 succeeded at 122 (offset -1 lines).
Hunk #3 succeeded at 290 (offset -1 lines).
Hunk #4 succeeded at 304 (offset -1 lines).
patching file kernel/compat.c
patching file kernel/exit.c
Hunk #2 succeeded at 499 (offset -1 lines).
Hunk #3 succeeded at 1033 (offset -1 lines).
patching file kernel/fork.c
patching file kernel/kthread.c
patching file kernel/Makefile
patching file kernel/nsproxy.c
patching file kernel/pid.c
patching file kernel/pid_namespace.c
patching file kernel/posix-timers.c
patching file kernel/printk.c
patching file kernel/ptrace.c
patching file kernel/sched.c
Hunk #3 succeeded at 262 (offset -6 lines).
Hunk #4 succeeded at 418 (offset -42 lines).
Hunk #5 succeeded at 1613 (offset -39 lines).
Hunk #6 succeeded at 1642 (offset -39 lines).
Hunk #7 succeeded at 1822 (offset -39 lines).
Hunk #8 succeeded at 3328 (offset 70 lines).
Hunk #9 succeeded at 5452 (offset 139 lines).
Hunk #10 succeeded at 5510 (offset 139 lines).
Hunk #11 succeeded at 5521 (offset 139 lines).
Hunk #12 succeeded at 6605 (offset 139 lines).
Hunk #13 succeeded at 9682 (offset 153 lines).
Hunk #14 succeeded at 9840 (offset 153 lines).
Hunk #15 FAILED at 9970.
Hunk #16 succeeded at 9974 (offset 127 lines).
Hunk #17 succeeded at 10236 (offset 109 lines).
Hunk #18 succeeded at 10263 (offset 109 lines).
Hunk #19 succeeded at 10980 (offset 102 lines).
Hunk #20 succeeded at 11107 (offset 102 lines).
1 out of 20 hunks FAILED -- saving rejects to file kernel/sched.c.rej
patching file kernel/sched_debug.c
Hunk #2 succeeded at 214 (offset -5 lines).
Hunk #3 succeeded at 324 (offset -5 lines).
patching file kernel/sched_fair.c
Hunk #3 FAILED at 793.
Hunk #13 succeeded at 2301 (offset 10 lines).
Hunk #14 succeeded at 2353 (offset 10 lines).
1 out of 14 hunks FAILED -- saving rejects to file kernel/sched_fair.c.rej
patching file kernel/sched_rt.c
Hunk #7 succeeded at 1536 (offset 4 lines).
Hunk #8 succeeded at 1547 (offset 4 lines).
patching file kernel/signal.c
patching file kernel/softirq.c
patching file kernel/sys.c
Hunk #7 succeeded at 1143 (offset -5 lines).
Hunk #8 succeeded at 1192 (offset -5 lines).
Hunk #9 succeeded at 1261 (offset -5 lines).
patching file kernel/sysctl.c
patching file kernel/sysctl_check.c
patching file kernel/time.c
patching file kernel/timer.c
patching file kernel/user.c
Hunk #1 FAILED at 251.
Hunk #2 FAILED at 282.
Hunk #3 FAILED at 353.
Hunk #4 FAILED at 451.
4 out of 4 hunks FAILED -- saving rejects to file kernel/user.c.rej
patching file kernel/user_namespace.c
patching file kernel/utsname.c
patching file kernel/vserver/cacct.c
patching file kernel/vserver/cacct_init.h
patching file kernel/vserver/cacct_proc.h
patching file kernel/vserver/context.c
patching file kernel/vserver/cvirt.c
patching file kernel/vserver/cvirt_init.h
patching file kernel/vserver/cvirt_proc.h
patching file kernel/vserver/debug.c
patching file kernel/vserver/device.c
patching file kernel/vserver/dlimit.c
patching file kernel/vserver/helper.c
patching file kernel/vserver/history.c
patching file kernel/vserver/inet.c
patching file kernel/vserver/init.c
patching file kernel/vserver/inode.c
patching file kernel/vserver/Kconfig
patching file kernel/vserver/limit.c
patching file kernel/vserver/limit_init.h
patching file kernel/vserver/limit_proc.h
patching file kernel/vserver/Makefile
patching file kernel/vserver/monitor.c
patching file kernel/vserver/network.c
patching file kernel/vserver/proc.c
patching file kernel/vserver/sched.c
patching file kernel/vserver/sched_init.h
patching file kernel/vserver/sched_proc.h
patching file kernel/vserver/signal.c
patching file kernel/vserver/space.c
patching file kernel/vserver/switch.c
patching file kernel/vserver/sysctl.c
patching file kernel/vserver/tag.c
patching file kernel/vserver/vci_config.h
patching file Makefile
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
patching file mm/allocpercpu.c
patching file mm/filemap_xip.c
patching file mm/fremap.c
patching file mm/hugetlb.c
patching file mm/memcontrol.c
patching file mm/memory.c
patching file mm/mlock.c
patching file mm/mmap.c
patching file mm/mremap.c
patching file mm/nommu.c
patching file mm/oom_kill.c
patching file mm/page_alloc.c
patching file mm/rmap.c
patching file mm/shmem.c
patching file mm/slab.c
patching file mm/slab_vs.h
patching file mm/swapfile.c
patching file net/core/dev.c
patching file net/core/rtnetlink.c
patching file net/core/sock.c
patching file net/ipv4/af_inet.c
patching file net/ipv4/devinet.c
patching file net/ipv4/fib_hash.c
patching file net/ipv4/inet_connection_sock.c
patching file net/ipv4/inet_diag.c
patching file net/ipv4/inet_hashtables.c
patching file net/ipv4/netfilter/nf_nat_helper.c
patching file net/ipv4/netfilter.c
patching file net/ipv4/raw.c
patching file net/ipv4/tcp.c
patching file net/ipv4/tcp_ipv4.c
patching file net/ipv4/tcp_minisocks.c
patching file net/ipv4/udp.c
patching file net/ipv6/addrconf.c
patching file net/ipv6/af_inet6.c
patching file net/ipv6/fib6_rules.c
patching file net/ipv6/inet6_hashtables.c
patching file net/ipv6/ip6_output.c
patching file net/ipv6/Kconfig
patching file net/ipv6/ndisc.c
patching file net/ipv6/raw.c
patching file net/ipv6/route.c
patching file net/ipv6/tcp_ipv6.c
patching file net/ipv6/udp.c
patching file net/ipv6/xfrm6_policy.c
patching file net/netlink/af_netlink.c
patching file net/sctp/ipv6.c
patching file net/socket.c
patching file net/sunrpc/auth.c
patching file net/sunrpc/auth_unix.c
patching file net/sunrpc/clnt.c
patching file net/unix/af_unix.c
patching file scripts/checksyscalls.sh
patching file security/commoncap.c
patching file security/selinux/hooks.c
patching file security/selinux/include/av_permissions.h
patching file security/selinux/include/av_perm_to_string.h