Re: Hang in work_resched

2008-01-31 Thread Guillaume Chazarain
On 1/31/08, Peter Zijlstra <[EMAIL PROTECTED]> wrote:
> works for me :-( (x86_64 rawhide userspace)

i386, !SMP, Fedora 8 here.

> Could you send your .config?

Here we go:

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24
# Thu Jan 31 12:33:36 2008
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
# CONFIG_GENERIC_LOCKBREAK is not set
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
# CONFIG_GENERIC_GPIO is not set
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
CONFIG_ARCH_SUPPORTS_OPROFILE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION="-gc"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_NS=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_FAIR_USER_SCHED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
# CONFIG_CGROUP_CPUACCT is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_BLOCK=y
CONFIG_LBD=y
CONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_LSF is not set
CONFIG_BLK_DEV_BSG=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=m
CONFIG_IOSCHED_DEADLINE=m
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_CLASSIC_RCU=y
# CONFIG_PREEMPT_RCU is not set

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_SMP is not set
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_X86_RDC321X is not set
# CONFIG_X86_VSMP is not set
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
CONFIG_MPENTIUMM=y
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y

Re: Hang in work_resched

2008-01-31 Thread Peter Zijlstra

On Thu, 2008-01-31 at 12:29 +0100, Guillaume Chazarain wrote:
> On Jan 31, 2008 9:55 AM, Peter Zijlstra <[EMAIL PROTECTED]> wrote:
> > Does this patch from thomas fix it as well?
> 
> Unfortunately, not.
> 
> For information, reverting just the first part of the offending commit
> (sl->timer.cb_mode) fixed the problem, while reverting only the second
> part (if (!hrtimer_active(>timer))) had no effect.
> 
> Also, I found a trivially reproductible testcase : sleep 0.
> 
> It hangs in nanosleep({0, 0}).

works for me :-( (x86_64 rawhide userspace)

Could you send your .config?

--
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/


Re: Hang in work_resched

2008-01-31 Thread Peter Zijlstra

On Thu, 2008-01-31 at 12:29 +0100, Guillaume Chazarain wrote:
> On Jan 31, 2008 9:55 AM, Peter Zijlstra <[EMAIL PROTECTED]> wrote:
> > Does this patch from thomas fix it as well?
> 
> Unfortunately, not.
> 
> For information, reverting just the first part of the offending commit
> (sl->timer.cb_mode) fixed the problem, while reverting only the second
> part (if (!hrtimer_active(>timer))) had no effect.
> 
> Also, I found a trivially reproductible testcase : sleep 0.
> 
> It hangs in nanosleep({0, 0}).

Thanks, I'll go look.

--
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/


Re: Hang in work_resched

2008-01-31 Thread Guillaume Chazarain
On Jan 31, 2008 9:55 AM, Peter Zijlstra <[EMAIL PROTECTED]> wrote:
> Does this patch from thomas fix it as well?

Unfortunately, not.

For information, reverting just the first part of the offending commit
(sl->timer.cb_mode) fixed the problem, while reverting only the second
part (if (!hrtimer_active(>timer))) had no effect.

Also, I found a trivially reproductible testcase : sleep 0.

It hangs in nanosleep({0, 0}).

-- 
Guillaume
--
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/


Re: Hang in work_resched

2008-01-31 Thread Peter Zijlstra

On Wed, 2008-01-30 at 23:54 +0100, Guillaume Chazarain wrote:
> On Jan 29, 2008 11:30 PM, Guillaume Chazarain <[EMAIL PROTECTED]> wrote:
> >  ===
> > gnome-termina S 0027 0  2201  1
> >f6711fb0 00200082 cb330d62 0027 f664105c 0b1e  
> > cb331880
> >0027 f660d780 009e3840 080ab7d8 080ab298 f6711000 c0103e7e 
> > 009e3840
> >000e0002 0002 080ab7d8 080ab298 bfb41be8 080ab7d8 007b 
> > c010007b
> > Call Trace:
> >  [] work_resched+0x5/0x16
> >  ===
> >
> > This corresponds to the cli instruction:
> > c0103e7e:   fa  cli
> 
> I bisected it, and the resulting commit is appended. Rerverting this
> commit applies cleanly on today's git
> (dd430ca20c40ecccd6954a7efd13d4398f507728) and makes the hang go away
> -:)

> commit 37bb6cb4097e29ffee970065b74499cbf10603a3

Does this patch from thomas fix it as well?

---

From: Thomas Gleixner <[EMAIL PROTECTED]>

I justed walked trough the code, which updates xtime _AND_
wall_to_monotonic w/o updating xtime_cache:

There are a couple of places missing the xtime_cache update. 

Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 include/linux/time.h  |1 +
 kernel/time.c |1 +
 kernel/time/timekeeping.c |6 --
 3 files changed, 6 insertions(+), 2 deletions(-)

Index: linux-2.6/include/linux/time.h
===
--- linux-2.6.orig/include/linux/time.h
+++ linux-2.6/include/linux/time.h
@@ -122,6 +122,7 @@ extern void monotonic_to_bootbased(struc
 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
 extern int timekeeping_is_continuous(void);
 extern void update_wall_time(void);
+extern void update_xtime_cache(u64 nsec);
 
 /**
  * timespec_to_ns - Convert timespec to nanoseconds
Index: linux-2.6/kernel/time.c
===
--- linux-2.6.orig/kernel/time.c
+++ linux-2.6/kernel/time.c
@@ -129,6 +129,7 @@ static inline void warp_clock(void)
write_seqlock_irq(_lock);
wall_to_monotonic.tv_sec -= sys_tz.tz_minuteswest * 60;
xtime.tv_sec += sys_tz.tz_minuteswest * 60;
+   update_xtime_cache(0);
write_sequnlock_irq(_lock);
clock_was_set();
 }
Index: linux-2.6/kernel/time/timekeeping.c
===
--- linux-2.6.orig/kernel/time/timekeeping.c
+++ linux-2.6/kernel/time/timekeeping.c
@@ -47,7 +47,7 @@ struct timespec wall_to_monotonic __attr
 static unsigned long total_sleep_time; /* seconds */
 
 static struct timespec xtime_cache __attribute__ ((aligned (16)));
-static inline void update_xtime_cache(u64 nsec)
+void update_xtime_cache(u64 nsec)
 {
xtime_cache = xtime;
timespec_add_ns(_cache, nsec);
@@ -145,6 +145,7 @@ int do_settimeofday(struct timespec *tv)
 
set_normalized_timespec(, sec, nsec);
set_normalized_timespec(_to_monotonic, wtm_sec, wtm_nsec);
+   update_xtime_cache(0);
 
clock->error = 0;
ntp_clear();
@@ -252,8 +253,8 @@ void __init timekeeping_init(void)
xtime.tv_nsec = 0;
set_normalized_timespec(_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec);
+   update_xtime_cache(0);
total_sleep_time = 0;
-
write_sequnlock_irqrestore(_lock, flags);
 }
 
@@ -290,6 +291,7 @@ static int timekeeping_resume(struct sys
}
/* Make sure that we have the correct xtime reference */
timespec_add_ns(, timekeeping_suspend_nsecs);
+   update_xtime_cache(0);
/* re-base the last cycle value */
clock->cycle_last = clocksource_read(clock);
clock->error = 0;


--
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/


Re: Hang in work_resched

2008-01-31 Thread Peter Zijlstra

On Wed, 2008-01-30 at 23:54 +0100, Guillaume Chazarain wrote:
 On Jan 29, 2008 11:30 PM, Guillaume Chazarain [EMAIL PROTECTED] wrote:
   ===
  gnome-termina S 0027 0  2201  1
 f6711fb0 00200082 cb330d62 0027 f664105c 0b1e  
  cb331880
 0027 f660d780 009e3840 080ab7d8 080ab298 f6711000 c0103e7e 
  009e3840
 000e0002 0002 080ab7d8 080ab298 bfb41be8 080ab7d8 007b 
  c010007b
  Call Trace:
   [c0103e7e] work_resched+0x5/0x16
   ===
 
  This corresponds to the cli instruction:
  c0103e7e:   fa  cli
 
 I bisected it, and the resulting commit is appended. Rerverting this
 commit applies cleanly on today's git
 (dd430ca20c40ecccd6954a7efd13d4398f507728) and makes the hang go away
 -:)

 commit 37bb6cb4097e29ffee970065b74499cbf10603a3

Does this patch from thomas fix it as well?

---

From: Thomas Gleixner [EMAIL PROTECTED]

I justed walked trough the code, which updates xtime _AND_
wall_to_monotonic w/o updating xtime_cache:

There are a couple of places missing the xtime_cache update. 

Signed-off-by: Thomas Gleixner [EMAIL PROTECTED]
---
 include/linux/time.h  |1 +
 kernel/time.c |1 +
 kernel/time/timekeeping.c |6 --
 3 files changed, 6 insertions(+), 2 deletions(-)

Index: linux-2.6/include/linux/time.h
===
--- linux-2.6.orig/include/linux/time.h
+++ linux-2.6/include/linux/time.h
@@ -122,6 +122,7 @@ extern void monotonic_to_bootbased(struc
 extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
 extern int timekeeping_is_continuous(void);
 extern void update_wall_time(void);
+extern void update_xtime_cache(u64 nsec);
 
 /**
  * timespec_to_ns - Convert timespec to nanoseconds
Index: linux-2.6/kernel/time.c
===
--- linux-2.6.orig/kernel/time.c
+++ linux-2.6/kernel/time.c
@@ -129,6 +129,7 @@ static inline void warp_clock(void)
write_seqlock_irq(xtime_lock);
wall_to_monotonic.tv_sec -= sys_tz.tz_minuteswest * 60;
xtime.tv_sec += sys_tz.tz_minuteswest * 60;
+   update_xtime_cache(0);
write_sequnlock_irq(xtime_lock);
clock_was_set();
 }
Index: linux-2.6/kernel/time/timekeeping.c
===
--- linux-2.6.orig/kernel/time/timekeeping.c
+++ linux-2.6/kernel/time/timekeeping.c
@@ -47,7 +47,7 @@ struct timespec wall_to_monotonic __attr
 static unsigned long total_sleep_time; /* seconds */
 
 static struct timespec xtime_cache __attribute__ ((aligned (16)));
-static inline void update_xtime_cache(u64 nsec)
+void update_xtime_cache(u64 nsec)
 {
xtime_cache = xtime;
timespec_add_ns(xtime_cache, nsec);
@@ -145,6 +145,7 @@ int do_settimeofday(struct timespec *tv)
 
set_normalized_timespec(xtime, sec, nsec);
set_normalized_timespec(wall_to_monotonic, wtm_sec, wtm_nsec);
+   update_xtime_cache(0);
 
clock-error = 0;
ntp_clear();
@@ -252,8 +253,8 @@ void __init timekeeping_init(void)
xtime.tv_nsec = 0;
set_normalized_timespec(wall_to_monotonic,
-xtime.tv_sec, -xtime.tv_nsec);
+   update_xtime_cache(0);
total_sleep_time = 0;
-
write_sequnlock_irqrestore(xtime_lock, flags);
 }
 
@@ -290,6 +291,7 @@ static int timekeeping_resume(struct sys
}
/* Make sure that we have the correct xtime reference */
timespec_add_ns(xtime, timekeeping_suspend_nsecs);
+   update_xtime_cache(0);
/* re-base the last cycle value */
clock-cycle_last = clocksource_read(clock);
clock-error = 0;


--
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/


Re: Hang in work_resched

2008-01-31 Thread Guillaume Chazarain
On Jan 31, 2008 9:55 AM, Peter Zijlstra [EMAIL PROTECTED] wrote:
 Does this patch from thomas fix it as well?

Unfortunately, not.

For information, reverting just the first part of the offending commit
(sl-timer.cb_mode) fixed the problem, while reverting only the second
part (if (!hrtimer_active(t-timer))) had no effect.

Also, I found a trivially reproductible testcase : sleep 0.

It hangs in nanosleep({0, 0}).

-- 
Guillaume
--
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/


Re: Hang in work_resched

2008-01-31 Thread Peter Zijlstra

On Thu, 2008-01-31 at 12:29 +0100, Guillaume Chazarain wrote:
 On Jan 31, 2008 9:55 AM, Peter Zijlstra [EMAIL PROTECTED] wrote:
  Does this patch from thomas fix it as well?
 
 Unfortunately, not.
 
 For information, reverting just the first part of the offending commit
 (sl-timer.cb_mode) fixed the problem, while reverting only the second
 part (if (!hrtimer_active(t-timer))) had no effect.
 
 Also, I found a trivially reproductible testcase : sleep 0.
 
 It hangs in nanosleep({0, 0}).

Thanks, I'll go look.

--
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/


Re: Hang in work_resched

2008-01-31 Thread Peter Zijlstra

On Thu, 2008-01-31 at 12:29 +0100, Guillaume Chazarain wrote:
 On Jan 31, 2008 9:55 AM, Peter Zijlstra [EMAIL PROTECTED] wrote:
  Does this patch from thomas fix it as well?
 
 Unfortunately, not.
 
 For information, reverting just the first part of the offending commit
 (sl-timer.cb_mode) fixed the problem, while reverting only the second
 part (if (!hrtimer_active(t-timer))) had no effect.
 
 Also, I found a trivially reproductible testcase : sleep 0.
 
 It hangs in nanosleep({0, 0}).

works for me :-( (x86_64 rawhide userspace)

Could you send your .config?

--
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/


Re: Hang in work_resched

2008-01-31 Thread Guillaume Chazarain
On 1/31/08, Peter Zijlstra [EMAIL PROTECTED] wrote:
 works for me :-( (x86_64 rawhide userspace)

i386, !SMP, Fedora 8 here.

 Could you send your .config?

Here we go:

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.24
# Thu Jan 31 12:33:36 2008
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
# CONFIG_GENERIC_LOCKBREAK is not set
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
# CONFIG_GENERIC_GPIO is not set
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
CONFIG_ARCH_SUPPORTS_OPROFILE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=-gc
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_CGROUPS=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_CGROUP_NS=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_FAIR_USER_SCHED=y
# CONFIG_FAIR_CGROUP_SCHED is not set
# CONFIG_CGROUP_CPUACCT is not set
CONFIG_SYSFS_DEPRECATED=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_EXTRA_PASS=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_BLOCK=y
CONFIG_LBD=y
CONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_LSF is not set
CONFIG_BLK_DEV_BSG=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=m
CONFIG_IOSCHED_DEADLINE=m
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED=cfq
CONFIG_CLASSIC_RCU=y
# CONFIG_PREEMPT_RCU is not set

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_SMP is not set
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_X86_RDC321X is not set
# CONFIG_X86_VSMP is not set
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
CONFIG_MPENTIUMM=y
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=4

Re: Hang in work_resched

2008-01-30 Thread Guillaume Chazarain
On Jan 29, 2008 11:30 PM, Guillaume Chazarain <[EMAIL PROTECTED]> wrote:
>  ===
> gnome-termina S 0027 0  2201  1
>f6711fb0 00200082 cb330d62 0027 f664105c 0b1e  cb331880
>0027 f660d780 009e3840 080ab7d8 080ab298 f6711000 c0103e7e 009e3840
>000e0002 0002 080ab7d8 080ab298 bfb41be8 080ab7d8 007b c010007b
> Call Trace:
>  [] work_resched+0x5/0x16
>  ===
>
> This corresponds to the cli instruction:
> c0103e7e:   fa  cli

I bisected it, and the resulting commit is appended. Rerverting this
commit applies cleanly on today's git
(dd430ca20c40ecccd6954a7efd13d4398f507728) and makes the hang go away
-:)


commit 37bb6cb4097e29ffee970065b74499cbf10603a3
Author: Peter Zijlstra <[EMAIL PROTECTED]>
Date:   Fri Jan 25 21:08:32 2008 +0100

hrtimer: unlock hrtimer_wakeup

hrtimer_wakeup creates a

  base->lock
rq->lock

lock dependancy. Avoid this by switching to HRTIMER_CB_IRQSAFE_NO_SOFTIRQ
which doesn't hold base->lock.

This fully untangles hrtimer locks from the scheduler locks, and allows
hrtimer usage in the scheduler proper.

Signed-off-by: Peter Zijlstra <[EMAIL PROTECTED]>
Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 061ae28..bd5d6b5 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1293,7 +1293,7 @@ void hrtimer_init_sleeper(struct hrtimer_sleeper
*sl, struct task_struct *task)
sl->timer.function = hrtimer_wakeup;
sl->task = task;
 #ifdef CONFIG_HIGH_RES_TIMERS
-   sl->timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_RESTART;
+   sl->timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ;
 #endif
 }

@@ -1304,6 +1304,8 @@ static int __sched do_nanosleep(struct
hrtimer_sleeper *t, enum hrtimer_mode mod
do {
set_current_state(TASK_INTERRUPTIBLE);
hrtimer_start(>timer, t->timer.expires, mode);
+   if (!hrtimer_active(>timer))
+   t->task = NULL;

if (likely(t->task))
schedule();


-- 
Guillaume
--
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/


Re: Hang in work_resched

2008-01-30 Thread Guillaume Chazarain
On Jan 29, 2008 11:30 PM, Guillaume Chazarain [EMAIL PROTECTED] wrote:
  ===
 gnome-termina S 0027 0  2201  1
f6711fb0 00200082 cb330d62 0027 f664105c 0b1e  cb331880
0027 f660d780 009e3840 080ab7d8 080ab298 f6711000 c0103e7e 009e3840
000e0002 0002 080ab7d8 080ab298 bfb41be8 080ab7d8 007b c010007b
 Call Trace:
  [c0103e7e] work_resched+0x5/0x16
  ===

 This corresponds to the cli instruction:
 c0103e7e:   fa  cli

I bisected it, and the resulting commit is appended. Rerverting this
commit applies cleanly on today's git
(dd430ca20c40ecccd6954a7efd13d4398f507728) and makes the hang go away
-:)


commit 37bb6cb4097e29ffee970065b74499cbf10603a3
Author: Peter Zijlstra [EMAIL PROTECTED]
Date:   Fri Jan 25 21:08:32 2008 +0100

hrtimer: unlock hrtimer_wakeup

hrtimer_wakeup creates a

  base-lock
rq-lock

lock dependancy. Avoid this by switching to HRTIMER_CB_IRQSAFE_NO_SOFTIRQ
which doesn't hold base-lock.

This fully untangles hrtimer locks from the scheduler locks, and allows
hrtimer usage in the scheduler proper.

Signed-off-by: Peter Zijlstra [EMAIL PROTECTED]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]

diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 061ae28..bd5d6b5 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1293,7 +1293,7 @@ void hrtimer_init_sleeper(struct hrtimer_sleeper
*sl, struct task_struct *task)
sl-timer.function = hrtimer_wakeup;
sl-task = task;
 #ifdef CONFIG_HIGH_RES_TIMERS
-   sl-timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_RESTART;
+   sl-timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ;
 #endif
 }

@@ -1304,6 +1304,8 @@ static int __sched do_nanosleep(struct
hrtimer_sleeper *t, enum hrtimer_mode mod
do {
set_current_state(TASK_INTERRUPTIBLE);
hrtimer_start(t-timer, t-timer.expires, mode);
+   if (!hrtimer_active(t-timer))
+   t-task = NULL;

if (likely(t-task))
schedule();


-- 
Guillaume
--
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/