diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/arch/sparc/kernel/ptrace.c linux-2.6.11-ck6/arch/sparc/kernel/ptrace.c --- linux-2.6.11-ck5/arch/sparc/kernel/ptrace.c 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/arch/sparc/kernel/ptrace.c 2005-05-01 00:04:20.000000000 +1000 @@ -531,18 +531,6 @@ asmlinkage void do_ptrace(struct pt_regs pt_error_return(regs, EIO); goto out_tsk; } - if (addr != 1) { - if (addr & 3) { - pt_error_return(regs, EINVAL); - goto out_tsk; - } -#ifdef DEBUG_PTRACE - printk ("Original: %08lx %08lx\n", child->thread.kregs->pc, child->thread.kregs->npc); - printk ("Continuing with %08lx %08lx\n", addr, addr+4); -#endif - child->thread.kregs->pc = addr; - child->thread.kregs->npc = addr + 4; - } if (request == PTRACE_SYSCALL) set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/arch/sparc64/kernel/ptrace.c linux-2.6.11-ck6/arch/sparc64/kernel/ptrace.c --- linux-2.6.11-ck5/arch/sparc64/kernel/ptrace.c 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/arch/sparc64/kernel/ptrace.c 2005-05-01 00:04:20.000000000 +1000 @@ -514,25 +514,6 @@ asmlinkage void do_ptrace(struct pt_regs pt_error_return(regs, EIO); goto out_tsk; } - if (addr != 1) { - unsigned long pc_mask = ~0UL; - - if ((child->thread_info->flags & _TIF_32BIT) != 0) - pc_mask = 0xffffffff; - - if (addr & 3) { - pt_error_return(regs, EINVAL); - goto out_tsk; - } -#ifdef DEBUG_PTRACE - printk ("Original: %016lx %016lx\n", - child->thread_info->kregs->tpc, - child->thread_info->kregs->tnpc); - printk ("Continuing with %016lx %016lx\n", addr, addr+4); -#endif - child->thread_info->kregs->tpc = (addr & pc_mask); - child->thread_info->kregs->tnpc = ((addr + 4) & pc_mask); - } if (request == PTRACE_SYSCALL) { set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/arch/sparc64/kernel/signal32.c linux-2.6.11-ck6/arch/sparc64/kernel/signal32.c --- linux-2.6.11-ck5/arch/sparc64/kernel/signal32.c 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/arch/sparc64/kernel/signal32.c 2005-05-01 00:04:20.000000000 +1000 @@ -192,10 +192,13 @@ int copy_siginfo_to_user32(compat_siginf err |= __put_user(from->si_uid, &to->si_uid); break; case __SI_FAULT >> 16: - case __SI_POLL >> 16: err |= __put_user(from->si_trapno, &to->si_trapno); err |= __put_user((unsigned long)from->si_addr, &to->si_addr); break; + case __SI_POLL >> 16: + err |= __put_user(from->si_band, &to->si_band); + err |= __put_user(from->si_fd, &to->si_fd); + break; case __SI_RT >> 16: /* This is not generated by the kernel as of now. */ case __SI_MESGQ >> 16: err |= __put_user(from->si_pid, &to->si_pid); diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/arch/sparc64/kernel/systbls.S linux-2.6.11-ck6/arch/sparc64/kernel/systbls.S --- linux-2.6.11-ck5/arch/sparc64/kernel/systbls.S 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/arch/sparc64/kernel/systbls.S 2005-05-01 00:04:20.000000000 +1000 @@ -75,7 +75,7 @@ sys_call_table32: /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink - .word sys_mq_timedsend, sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid + .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid /*280*/ .word sys_ni_syscall, sys_add_key, sys_request_key, sys_keyctl #endif /* CONFIG_COMPAT */ diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/arch/um/include/sysdep-i386/syscalls.h linux-2.6.11-ck6/arch/um/include/sysdep-i386/syscalls.h --- linux-2.6.11-ck5/arch/um/include/sysdep-i386/syscalls.h 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/arch/um/include/sysdep-i386/syscalls.h 2005-05-01 00:04:20.000000000 +1000 @@ -23,6 +23,9 @@ extern long sys_mmap2(unsigned long addr unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff); +/* On i386 they choose a meaningless naming.*/ +#define __NR_kexec_load __NR_sys_kexec_load + #define ARCH_SYSCALLS \ [ __NR_waitpid ] = (syscall_handler_t *) sys_waitpid, \ [ __NR_break ] = (syscall_handler_t *) sys_ni_syscall, \ @@ -101,15 +104,12 @@ extern long sys_mmap2(unsigned long addr [ 223 ] = (syscall_handler_t *) sys_ni_syscall, \ [ __NR_set_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \ [ __NR_get_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \ - [ __NR_fadvise64 ] = (syscall_handler_t *) sys_fadvise64, \ [ 251 ] = (syscall_handler_t *) sys_ni_syscall, \ - [ __NR_remap_file_pages ] = (syscall_handler_t *) sys_remap_file_pages, \ - [ __NR_utimes ] = (syscall_handler_t *) sys_utimes, \ - [ __NR_vserver ] = (syscall_handler_t *) sys_ni_syscall, - + [ 285 ] = (syscall_handler_t *) sys_ni_syscall, + /* 222 doesn't yet have a name in include/asm-i386/unistd.h */ -#define LAST_ARCH_SYSCALL __NR_vserver +#define LAST_ARCH_SYSCALL 285 /* * Overrides for Emacs so that we follow Linus's tabbing style. diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/arch/um/include/sysdep-x86_64/syscalls.h linux-2.6.11-ck6/arch/um/include/sysdep-x86_64/syscalls.h --- linux-2.6.11-ck5/arch/um/include/sysdep-x86_64/syscalls.h 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/arch/um/include/sysdep-x86_64/syscalls.h 2005-05-01 00:04:20.000000000 +1000 @@ -71,12 +71,7 @@ extern syscall_handler_t sys_arch_prctl; [ __NR_iopl ] = (syscall_handler_t *) sys_ni_syscall, \ [ __NR_set_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \ [ __NR_get_thread_area ] = (syscall_handler_t *) sys_ni_syscall, \ - [ __NR_remap_file_pages ] = (syscall_handler_t *) sys_remap_file_pages, \ [ __NR_semtimedop ] = (syscall_handler_t *) sys_semtimedop, \ - [ __NR_fadvise64 ] = (syscall_handler_t *) sys_fadvise64, \ - [ 223 ] = (syscall_handler_t *) sys_ni_syscall, \ - [ __NR_utimes ] = (syscall_handler_t *) sys_utimes, \ - [ __NR_vserver ] = (syscall_handler_t *) sys_ni_syscall, \ [ 251 ] = (syscall_handler_t *) sys_ni_syscall, #define LAST_ARCH_SYSCALL 251 diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/arch/um/kernel/sys_call_table.c linux-2.6.11-ck6/arch/um/kernel/sys_call_table.c --- linux-2.6.11-ck5/arch/um/kernel/sys_call_table.c 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/arch/um/kernel/sys_call_table.c 2005-05-01 00:04:20.000000000 +1000 @@ -48,7 +48,6 @@ extern syscall_handler_t sys_vfork; extern syscall_handler_t old_select; extern syscall_handler_t sys_modify_ldt; extern syscall_handler_t sys_rt_sigsuspend; -extern syscall_handler_t sys_vserver; extern syscall_handler_t sys_mbind; extern syscall_handler_t sys_get_mempolicy; extern syscall_handler_t sys_set_mempolicy; @@ -242,6 +241,7 @@ syscall_handler_t *sys_call_table[] = { [ __NR_epoll_create ] = (syscall_handler_t *) sys_epoll_create, [ __NR_epoll_ctl ] = (syscall_handler_t *) sys_epoll_ctl, [ __NR_epoll_wait ] = (syscall_handler_t *) sys_epoll_wait, + [ __NR_remap_file_pages ] = (syscall_handler_t *) sys_remap_file_pages, [ __NR_set_tid_address ] = (syscall_handler_t *) sys_set_tid_address, [ __NR_timer_create ] = (syscall_handler_t *) sys_timer_create, [ __NR_timer_settime ] = (syscall_handler_t *) sys_timer_settime, @@ -252,12 +252,10 @@ syscall_handler_t *sys_call_table[] = { [ __NR_clock_gettime ] = (syscall_handler_t *) sys_clock_gettime, [ __NR_clock_getres ] = (syscall_handler_t *) sys_clock_getres, [ __NR_clock_nanosleep ] = (syscall_handler_t *) sys_clock_nanosleep, - [ __NR_statfs64 ] = (syscall_handler_t *) sys_statfs64, - [ __NR_fstatfs64 ] = (syscall_handler_t *) sys_fstatfs64, [ __NR_tgkill ] = (syscall_handler_t *) sys_tgkill, [ __NR_utimes ] = (syscall_handler_t *) sys_utimes, - [ __NR_fadvise64_64 ] = (syscall_handler_t *) sys_fadvise64_64, - [ __NR_vserver ] = (syscall_handler_t *) sys_vserver, + [ __NR_fadvise64 ] = (syscall_handler_t *) sys_fadvise64, + [ __NR_vserver ] = (syscall_handler_t *) sys_ni_syscall, [ __NR_mbind ] = (syscall_handler_t *) sys_mbind, [ __NR_get_mempolicy ] = (syscall_handler_t *) sys_get_mempolicy, [ __NR_set_mempolicy ] = (syscall_handler_t *) sys_set_mempolicy, @@ -267,9 +265,8 @@ syscall_handler_t *sys_call_table[] = { [ __NR_mq_timedreceive ] = (syscall_handler_t *) sys_mq_timedreceive, [ __NR_mq_notify ] = (syscall_handler_t *) sys_mq_notify, [ __NR_mq_getsetattr ] = (syscall_handler_t *) sys_mq_getsetattr, - [ __NR_sys_kexec_load ] = (syscall_handler_t *) sys_ni_syscall, + [ __NR_kexec_load ] = (syscall_handler_t *) sys_ni_syscall, [ __NR_waitid ] = (syscall_handler_t *) sys_waitid, - [ 285 ] = (syscall_handler_t *) sys_ni_syscall, [ __NR_add_key ] = (syscall_handler_t *) sys_add_key, [ __NR_request_key ] = (syscall_handler_t *) sys_request_key, [ __NR_keyctl ] = (syscall_handler_t *) sys_keyctl, diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/drivers/block/ll_rw_blk.c linux-2.6.11-ck6/drivers/block/ll_rw_blk.c --- linux-2.6.11-ck5/drivers/block/ll_rw_blk.c 2005-04-25 21:12:41.000000000 +1000 +++ linux-2.6.11-ck6/drivers/block/ll_rw_blk.c 2005-05-01 00:04:20.000000000 +1000 @@ -1509,15 +1509,6 @@ request_queue_t *blk_init_queue(request_ if (blk_init_free_list(q)) goto out_init; - /* - * if caller didn't supply a lock, they get per-queue locking with - * our embedded lock - */ - if (!lock) { - spin_lock_init(&q->__queue_lock); - lock = &q->__queue_lock; - } - q->request_fn = rfn; q->back_merge_fn = ll_back_merge_fn; q->front_merge_fn = ll_front_merge_fn; diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/drivers/i2c/chips/it87.c linux-2.6.11-ck6/drivers/i2c/chips/it87.c --- linux-2.6.11-ck5/drivers/i2c/chips/it87.c 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/drivers/i2c/chips/it87.c 2005-05-01 00:04:21.000000000 +1000 @@ -631,7 +631,7 @@ static ssize_t show_alarms(struct device struct it87_data *data = it87_update_device(dev); return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); } -static DEVICE_ATTR(alarms, S_IRUGO | S_IWUSR, show_alarms, NULL); +static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); static ssize_t show_vrm_reg(struct device *dev, char *buf) diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/drivers/i2c/chips/via686a.c linux-2.6.11-ck6/drivers/i2c/chips/via686a.c --- linux-2.6.11-ck5/drivers/i2c/chips/via686a.c 2005-03-02 19:30:25.000000000 +1100 +++ linux-2.6.11-ck6/drivers/i2c/chips/via686a.c 2005-05-01 00:04:21.000000000 +1000 @@ -554,7 +554,7 @@ static ssize_t show_alarms(struct device struct via686a_data *data = via686a_update_device(dev); return sprintf(buf,"%d\n", ALARMS_FROM_REG(data->alarms)); } -static DEVICE_ATTR(alarms, S_IRUGO | S_IWUSR, show_alarms, NULL); +static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); /* The driver. I choose to use type i2c_driver, as at is identical to both smbus_driver and isa_driver, and clients could be of either kind */ diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/drivers/media/video/bttv-cards.c linux-2.6.11-ck6/drivers/media/video/bttv-cards.c --- linux-2.6.11-ck5/drivers/media/video/bttv-cards.c 2005-03-02 19:30:26.000000000 +1100 +++ linux-2.6.11-ck6/drivers/media/video/bttv-cards.c 2005-05-01 00:04:21.000000000 +1000 @@ -2718,8 +2718,6 @@ void __devinit bttv_init_card2(struct bt } btv->pll.pll_current = -1; - bttv_reset_audio(btv); - /* tuner configuration (from card list / autodetect / insmod option) */ if (UNSET != bttv_tvcards[btv->c.type].tuner_type) if(UNSET == btv->tuner_type) diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/drivers/scsi/scsi_lib.c linux-2.6.11-ck6/drivers/scsi/scsi_lib.c --- linux-2.6.11-ck5/drivers/scsi/scsi_lib.c 2005-04-25 21:12:41.000000000 +1000 +++ linux-2.6.11-ck6/drivers/scsi/scsi_lib.c 2005-05-01 00:04:21.000000000 +1000 @@ -349,9 +349,9 @@ void scsi_device_unbusy(struct scsi_devi shost->host_failed)) scsi_eh_wakeup(shost); spin_unlock(shost->host_lock); - spin_lock(sdev->request_queue->queue_lock); + spin_lock(&sdev->sdev_lock); sdev->device_busy--; - spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); + spin_unlock_irqrestore(&sdev->sdev_lock, flags); } /* @@ -1195,6 +1195,22 @@ static inline int scsi_host_queue_ready( } /* + * Kill requests for a dead device + */ +static void scsi_kill_requests(request_queue_t *q) +{ + struct request *req; + + while ((req = elv_next_request(q)) != NULL) { + blkdev_dequeue_request(req); + req->flags |= REQ_QUIET; + while (end_that_request_first(req, 0, req->nr_sectors)) + ; + end_that_request_last(req); + } +} + +/* * Function: scsi_request_fn() * * Purpose: Main strategy routine for SCSI. @@ -1208,10 +1224,16 @@ static inline int scsi_host_queue_ready( static void scsi_request_fn(struct request_queue *q) { struct scsi_device *sdev = q->queuedata; - struct Scsi_Host *shost = sdev->host; + struct Scsi_Host *shost; struct scsi_cmnd *cmd; struct request *req; + if (!sdev) { + printk("scsi: killing requests for dead queue\n"); + scsi_kill_requests(q); + return; + } + if(!get_device(&sdev->sdev_gendev)) /* We must be tearing the block queue down already */ return; @@ -1220,6 +1242,7 @@ static void scsi_request_fn(struct reque * To start with, we keep looping until the queue is empty, or until * the host is no longer able to accept any more requests. */ + shost = sdev->host; while (!blk_queue_plugged(q)) { int rtn; /* @@ -1353,7 +1376,7 @@ struct request_queue *scsi_alloc_queue(s struct Scsi_Host *shost = sdev->host; struct request_queue *q; - q = blk_init_queue(scsi_request_fn, NULL); + q = blk_init_queue(scsi_request_fn, &sdev->sdev_lock); if (!q) return NULL; diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/drivers/scsi/scsi_scan.c linux-2.6.11-ck6/drivers/scsi/scsi_scan.c --- linux-2.6.11-ck5/drivers/scsi/scsi_scan.c 2005-04-25 21:12:41.000000000 +1000 +++ linux-2.6.11-ck6/drivers/scsi/scsi_scan.c 2005-03-02 19:30:27.000000000 +1100 @@ -246,6 +246,7 @@ static struct scsi_device *scsi_alloc_sd */ sdev->borken = 1; + spin_lock_init(&sdev->sdev_lock); sdev->request_queue = scsi_alloc_queue(sdev); if (!sdev->request_queue) goto out_free_dev; diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/drivers/scsi/scsi_sysfs.c linux-2.6.11-ck6/drivers/scsi/scsi_sysfs.c --- linux-2.6.11-ck5/drivers/scsi/scsi_sysfs.c 2005-03-02 19:30:27.000000000 +1100 +++ linux-2.6.11-ck6/drivers/scsi/scsi_sysfs.c 2005-05-01 00:04:21.000000000 +1000 @@ -178,8 +178,10 @@ void scsi_device_dev_release(struct devi put_device(parent); } - if (sdev->request_queue) + if (sdev->request_queue) { + sdev->request_queue->queuedata = NULL; scsi_free_queue(sdev->request_queue); + } kfree(sdev->inquiry); kfree(sdev); diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/fs/partitions/msdos.c linux-2.6.11-ck6/fs/partitions/msdos.c --- linux-2.6.11-ck5/fs/partitions/msdos.c 2004-12-25 10:14:50.000000000 +1100 +++ linux-2.6.11-ck6/fs/partitions/msdos.c 2005-05-01 00:04:22.000000000 +1000 @@ -114,6 +114,9 @@ parse_extended(struct parsed_partitions */ for (i=0; i<4; i++, p++) { u32 offs, size, next; + + if (SYS_IND(p) == 0) + continue; if (!NR_SECTS(p) || is_extended_partition(p)) continue; @@ -430,6 +433,8 @@ int msdos_partition(struct parsed_partit for (slot = 1 ; slot <= 4 ; slot++, p++) { u32 start = START_SECT(p)*sector_size; u32 size = NR_SECTS(p)*sector_size; + if (SYS_IND(p) == 0) + continue; if (!size) continue; if (is_extended_partition(p)) { diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/include/linux/blkdev.h linux-2.6.11-ck6/include/linux/blkdev.h --- linux-2.6.11-ck5/include/linux/blkdev.h 2005-04-25 21:12:41.000000000 +1000 +++ linux-2.6.11-ck6/include/linux/blkdev.h 2005-05-01 00:04:22.000000000 +1000 @@ -352,11 +352,8 @@ struct request_queue unsigned long queue_flags; /* - * protects queue structures from reentrancy. ->__queue_lock should - * _never_ be used directly, it is queue private. always use - * ->queue_lock. + * protects queue structures from reentrancy */ - spinlock_t __queue_lock; spinlock_t *queue_lock; /* diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/include/scsi/scsi_device.h linux-2.6.11-ck6/include/scsi/scsi_device.h --- linux-2.6.11-ck5/include/scsi/scsi_device.h 2005-04-25 21:12:41.000000000 +1000 +++ linux-2.6.11-ck6/include/scsi/scsi_device.h 2005-03-02 19:30:30.000000000 +1100 @@ -44,6 +44,7 @@ struct scsi_device { struct list_head same_target_siblings; /* just the devices sharing same target id */ volatile unsigned short device_busy; /* commands actually active on low-level */ + spinlock_t sdev_lock; /* also the request queue_lock */ spinlock_t list_lock; struct list_head cmd_list; /* queue of in use SCSI Command structures */ struct list_head starved_entry; diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/kernel/sched.c linux-2.6.11-ck6/kernel/sched.c --- linux-2.6.11-ck5/kernel/sched.c 2005-04-25 21:12:41.000000000 +1000 +++ linux-2.6.11-ck6/kernel/sched.c 2005-05-01 00:04:22.000000000 +1000 @@ -1197,6 +1197,13 @@ void fastcall wake_up_new_task(task_t * if (likely(cpu == this_cpu)) { current->flags |= PF_FORKED; activate_task(p, rq, 1); + if (!(clone_flags & CLONE_VM)) + /* + * The VM isn't cloned, so we're in a good position to + * do child-runs-first in anticipation of an exec. This + * usually avoids a lot of COW overhead. + */ + set_need_resched(); /* * We skip the following code due to cpu == this_cpu * @@ -2082,15 +2089,13 @@ static void rebalance_tick(int this_cpu, continue; interval = sd->balance_interval; - if (idle != SCHED_IDLE) - interval *= sd->busy_factor; /* scale ms to jiffies */ interval = msecs_to_jiffies(interval); if (unlikely(!interval)) interval = 1; - if (j - sd->last_balance >= interval) { + if (idle != SCHED_IDLE || j - sd->last_balance >= interval) { if (load_balance(this_cpu, this_rq, sd, idle)) { /* We've pulled tasks over so no longer idle */ idle = NOT_IDLE; @@ -2300,7 +2305,7 @@ void scheduler_tick(void) int cpu = smp_processor_id(); runqueue_t *rq = this_rq(); task_t *p = current; - unsigned long debit; + unsigned long debit, expired_balance = rq->nr_running; rq->timestamp_last_tick = sched_clock(); @@ -2322,8 +2327,10 @@ void scheduler_tick(void) /* * SCHED_FIFO tasks never run out of timeslice. */ - if (unlikely(p->policy == SCHED_FIFO)) + if (unlikely(p->policy == SCHED_FIFO)) { + expired_balance = 0; goto out; + } spin_lock(&rq->lock); debit = ns_diff(rq->timestamp_last_tick, p->timestamp); @@ -2350,12 +2357,16 @@ void scheduler_tick(void) goto out_unlock; } rq->cache_ticks++; - if (rq->preempted && rq->cache_ticks >= cache_delay) + if (rq->preempted && rq->cache_ticks >= cache_delay) { set_tsk_need_resched(p); + goto out_unlock; + } + expired_balance = 0; out_unlock: spin_unlock(&rq->lock); out: - rebalance_tick(cpu, rq, NOT_IDLE); + if (expired_balance > 1) + rebalance_tick(cpu, rq, NOT_IDLE); } #ifdef CONFIG_SCHED_SMT diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/Makefile linux-2.6.11-ck6/Makefile --- linux-2.6.11-ck5/Makefile 2005-04-25 21:12:41.000000000 +1000 +++ linux-2.6.11-ck6/Makefile 2005-05-01 00:04:22.000000000 +1000 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 11 -EXTRAVERSION = -ck5 +EXTRAVERSION = -ck6 NAME=Cognac Woozy Numbat # *DOCUMENTATION* diff -Naurp --exclude-from=/home/con/kernel/dontdiff linux-2.6.11-ck5/security/keys/key.c linux-2.6.11-ck6/security/keys/key.c --- linux-2.6.11-ck5/security/keys/key.c 2005-03-02 19:30:31.000000000 +1100 +++ linux-2.6.11-ck6/security/keys/key.c 2005-05-01 00:04:23.000000000 +1000 @@ -57,9 +57,10 @@ struct key_user *key_user_lookup(uid_t u { struct key_user *candidate = NULL, *user; struct rb_node *parent = NULL; - struct rb_node **p = &key_user_tree.rb_node; + struct rb_node **p; try_again: + p = &key_user_tree.rb_node; spin_lock(&key_user_lock); /* search the tree for a user record with a matching UID */