2.6.13-rc6-rt3
Subsystems (5)
i have released the 2.6.13-rc6-rt3 tree, which can be downloaded from the usual place:
http://redhat.com/~mingo/realtime-preempt/
Changes since 2.6.13-rc6-rt2:
- reverted an incorrect tasklist_lock -> lock_task() conversion that slipped in via an earlier hack in the HRT code. The issue it tried to solve is mooted by the RCU-tasklist-lock code.
- introduce mutex_chprio() as the mechanism for High Resolution timers to dynamically change the priority of the HRT softirq thread. [This fixes a latency/priority bug in where the dynamic prio would override the inherited priority, and when the PI mechanism restores priority it would override the HRT priority.]
- now that HR-timer dynamic priorities have the proper framework, removed the HIGH_RES_TIMERS_DYN_PRIO config option and made the feature unconditional.
to build a 2.6.13-rc6-rt3 tree, the following patches should be applied:
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2
http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.13-rc6.bz2
http://redhat.com/~mingo/realtime-preempt/patch-2.6.13-rc6-rt3
Ingo
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt5
I got the following on compile:
cd ~/work/kernels/svn/linux_realtime_ernie/ make
CHK include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/asm-i386/asm_offsets.h CHK include/linux/compile.h CHK usr/initramfs_list CC kernel/latency.o
kernel/latency.c: In function 'check_critical_timing':kernel/latency.c:1298: warning: 'flags' may be used uninitialized in this function kernel/latency.c: In function '__start_critical_timing':kernel/latency.c:1444: error: too few arguments to function '____trace' kernel/latency.c: In function '__stop_critical_timing':kernel/latency.c:1462: error: too few arguments to function '____trace' make[1]: *** [kernel/latency.o] Error 1
make: *** [kernel] Error 2
Here's a patch. I'm assuming this is what you want with flags. I haven't looked too deep into it ____trace. (I only look down a few '_' not 4 of them :-)
-- Steve
kernel/latency.c +3 -3
@@ -1295,7 +1295,7 @@ {unsigned long latency, t0, t1;cycles_t T0 ,T1 ,T2 , delta; -unsigned long flags; +unsigned long flags =0 ;if (trace_user_triggered)return ;
@@ -1441,7 +1441,7 @@_trace_cmdline (cpu, tr);raw_local_save_flags (flags); -____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 ); +____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 , flags);atomic_dec (&tr->disabled); }
@@ -1459,7 +1459,7 @@atomic_inc (&tr->disabled);raw_local_save_flags (flags); -____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 ); +____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 , flags);check_critical_timing (cpu, tr, eip); tr->critical_start =0 ;atomic_dec (&tr->disabled);
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt5
Ouch, what was I thinking for that initializing flags to zero:
Sorry, lets try that again:
kernel/latency.c +4 -3
@@ -1307,12 +1307,13 @@T1 =cycles (); delta =T1 -T0 ; +raw_local_save_flags (flags); +#ifndef CONFIG_CRITICAL_LATENCY_HIST if (!report_latency (delta)) goto out;#endif -raw_local_save_flags (flags);____trace (cpu,TRACE_FN , tr,CALLER_ADDR0 , parent_eip,0 ,0 ,0 , flags);/* * Update the timestamp, because the trace entry above
@@ -1441,7 +1442,7 @@_trace_cmdline (cpu, tr);raw_local_save_flags (flags); -____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 ); +____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 , flags);atomic_dec (&tr->disabled); }
@@ -1459,7 +1460,7 @@atomic_inc (&tr->disabled);raw_local_save_flags (flags); -____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 ); +____trace (cpu,TRACE_FN , tr, eip, parent_eip,0 ,0 ,0 , flags);check_critical_timing (cpu, tr, eip); tr->critical_start =0 ;atomic_dec (&tr->disabled);
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt5
OK, I compiled it now. Tried to boot, and it rebooted on me before showing any output :-(
So I'll start debugging it, but just incase I'm not looking for something that is already found, is there anything wrong with the following config?
-- Steve
CONFIG_X86=yCONFIG_MMU=yCONFIG_UID16=yCONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_IOMAP=yCONFIG_EXPERIMENTAL=yCONFIG_BROKEN=yCONFIG_BROKEN_ON_SMP=yCONFIG_LOCK_KERNEL=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_LOCALVERSION=""CONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_SYSCTL=yCONFIG_HOTPLUG=yCONFIG_KOBJECT_UEVENT=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=yCONFIG_EMBEDDED=yCONFIG_KALLSYMS=yCONFIG_KALLSYMS_ALL=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SHMEM=yCONFIG_CC_ALIGN_FUNCTIONS=0CONFIG_CC_ALIGN_LABELS=0CONFIG_CC_ALIGN_LOOPS=0CONFIG_CC_ALIGN_JUMPS=0CONFIG_BASE_SMALL=0CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_OBSOLETE_MODPARM=yCONFIG_KMOD=yCONFIG_X86_PC=yCONFIG_MPENTIUMIII=yCONFIG_X86_GENERIC=yCONFIG_X86_CMPXCHG=yCONFIG_X86_XADD=yCONFIG_X86_L1_CACHE_SHIFT=7CONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_X86_WP_WORKS_OK=yCONFIG_X86_INVLPG=yCONFIG_X86_BSWAP=yCONFIG_X86_POPAD_OK=yCONFIG_X86_GOOD_APIC=yCONFIG_X86_INTEL_USERCOPY=yCONFIG_X86_USE_PPRO_CHECKSUM=yCONFIG_HIGH_RES_TIMERS=yCONFIG_HIGH_RES_TIMER_TSC=yCONFIG_HIGH_RES_RESOLUTION=1000CONFIG_PREEMPT_RT=yCONFIG_PREEMPT=yCONFIG_PREEMPT_SOFTIRQS=yCONFIG_PREEMPT_HARDIRQS=yCONFIG_PREEMPT_BKL=yCONFIG_PREEMPT_RCU=yCONFIG_RCU_STATS=yCONFIG_RCU_TORTURE_TEST=yCONFIG_RWSEM_GENERIC_SPINLOCK=yCONFIG_ASM_SEMAPHORES=yCONFIG_X86_UP_APIC=yCONFIG_X86_UP_IOAPIC=yCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_IOAPIC_FAST=yCONFIG_X86_TSC=yCONFIG_NOHIGHMEM=yCONFIG_SELECT_MEMORY_MODEL=yCONFIG_FLATMEM_MANUAL=yCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=yCONFIG_MTRR=yCONFIG_HAVE_DEC_LOCK=yCONFIG_SECCOMP=yCONFIG_HZ_1000=yCONFIG_HZ=1000CONFIG_PHYSICAL_START=0x100000CONFIG_PCI=yCONFIG_PCI_GOANY=yCONFIG_PCI_BIOS=yCONFIG_PCI_DIRECT=yCONFIG_PCI_LEGACY_PROC=yCONFIG_PCI_NAMES=yCONFIG_ISA_DMA_API=yCONFIG_ISA=yCONFIG_BINFMT_ELF=yCONFIG_BINFMT_MISC=yCONFIG_NET=yCONFIG_PACKET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IP_FIB_HASH=yCONFIG_IP_TCPDIAG=yCONFIG_TCP_CONG_BIC=yCONFIG_NET_SCHED=yCONFIG_NET_SCH_CLK_JIFFIES=yCONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_PARPORT=yCONFIG_PNP=yCONFIG_ISAPNP=yCONFIG_BLK_DEV_FD=yCONFIG_BLK_DEV_LOOP=yCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_COUNT=16CONFIG_BLK_DEV_RAM_SIZE=4096CONFIG_INITRAMFS_SOURCE=""CONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_AS=yCONFIG_IOSCHED_DEADLINE=yCONFIG_IOSCHED_CFQ=yCONFIG_IDE=yCONFIG_BLK_DEV_IDE=yCONFIG_BLK_DEV_IDEDISK=yCONFIG_IDEDISK_MULTI_MODE=yCONFIG_BLK_DEV_IDECD=yCONFIG_IDE_GENERIC=yCONFIG_BLK_DEV_CMD640=yCONFIG_BLK_DEV_IDEPCI=yCONFIG_IDEPCI_SHARE_IRQ=yCONFIG_BLK_DEV_RZ1000=yCONFIG_BLK_DEV_IDEDMA_PCI=yCONFIG_IDEDMA_PCI_AUTO=yCONFIG_BLK_DEV_PIIX=yCONFIG_BLK_DEV_IDEDMA=yCONFIG_IDEDMA_AUTO=yCONFIG_SCSI=yCONFIG_SCSI_PROC_FS=yCONFIG_BLK_DEV_SD=yCONFIG_SCSI_MULTI_LUN=yCONFIG_SCSI_CONSTANTS=yCONFIG_SCSI_QLA2XXX=yCONFIG_NETDEVICES=yCONFIG_DUMMY=mCONFIG_NET_ETHERNET=yCONFIG_MII=yCONFIG_NET_PCI=yCONFIG_E100=yCONFIG_NETCONSOLE=mCONFIG_NETPOLL=yCONFIG_NETPOLL_RX=yCONFIG_NETPOLL_TRAP=yCONFIG_NET_POLL_CONTROLLER=yCONFIG_INPUT=yCONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_PSAUX=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ATKBD=yCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_INPORT=mCONFIG_MOUSE_LOGIBM=mCONFIG_MOUSE_PC110PAD=mCONFIG_MOUSE_VSXXXAA=mCONFIG_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_SERPORT=yCONFIG_SERIO_LIBPS2=yCONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_SERIAL_8250=yCONFIG_SERIAL_8250_CONSOLE=yCONFIG_SERIAL_8250_NR_UARTS=4CONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_LEGACY_PTYS=yCONFIG_LEGACY_PTY_COUNT=256CONFIG_RTC=yCONFIG_RTC_HISTOGRAM=yCONFIG_BLOCKER=yCONFIG_AGP=yCONFIG_AGP_ALI=yCONFIG_AGP_AMD=yCONFIG_AGP_INTEL=yCONFIG_AGP_SIS=yCONFIG_AGP_VIA=yCONFIG_DRM=yCONFIG_DRM_TDFX=yCONFIG_DRM_RADEON=yCONFIG_HWMON=yCONFIG_FB=yCONFIG_VIDEO_SELECT=yCONFIG_VGA_CONSOLE=yCONFIG_DUMMY_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE=yCONFIG_FONTS=y
CONFIG_FONT_8x16=yCONFIG_LOGO=yCONFIG_LOGO_LINUX_CLUT224=yCONFIG_SOUND=yCONFIG_USB_ARCH_HAS_HCD=yCONFIG_USB_ARCH_HAS_OHCI=yCONFIG_USB=yCONFIG_USB_STORAGE=yCONFIG_USB_HID=mCONFIG_USB_HIDINPUT=yCONFIG_USB_HIDDEV=yCONFIG_USB_MON=yCONFIG_EXT2_FS=yCONFIG_EXT3_FS=yCONFIG_EXT3_FS_XATTR=yCONFIG_JBD=yCONFIG_FS_MBCACHE=yCONFIG_REISERFS_FS=yCONFIG_INOTIFY=yCONFIG_DNOTIFY=yCONFIG_AUTOFS4_FS=yCONFIG_ISO9660_FS=yCONFIG_JOLIET=yCONFIG_ZISOFS=yCONFIG_ZISOFS_FS=yCONFIG_FAT_FS=mCONFIG_MSDOS_FS=mCONFIG_VFAT_FS=mCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"CONFIG_PROC_FS=yCONFIG_SYSFS=yCONFIG_TMPFS=yCONFIG_RAMFS=yCONFIG_NFS_FS=yCONFIG_NFSD=yCONFIG_NFSD_TCP=yCONFIG_LOCKD=yCONFIG_EXPORTFS=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_MSDOS_PARTITION=yCONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_DEBUG_KERNEL=yCONFIG_MAGIC_SYSRQ=yCONFIG_LOG_BUF_SHIFT=14CONFIG_DETECT_SOFTLOCKUP=yCONFIG_SCHEDSTATS=yCONFIG_DEBUG_SLAB=yCONFIG_DEBUG_PREEMPT=yCONFIG_DEBUG_IRQ_FLAGS=yCONFIG_WAKEUP_TIMING=yCONFIG_PREEMPT_TRACE=yCONFIG_CRITICAL_PREEMPT_TIMING=yCONFIG_CRITICAL_IRQSOFF_TIMING=yCONFIG_CRITICAL_TIMING=yCONFIG_LATENCY_TIMING=yCONFIG_LATENCY_TRACE=yCONFIG_MCOUNT=yCONFIG_RT_DEADLOCK_DETECT=yCONFIG_DEBUG_BUGVERBOSE=yCONFIG_DEBUG_INFO=yCONFIG_FRAME_POINTER=yCONFIG_EARLY_PRINTK=yCONFIG_DEBUG_STACKOVERFLOW=yCONFIG_DEBUG_STACK_USAGE=yCONFIG_X86_FIND_SMP_CONFIG=yCONFIG_X86_MPPARSE=yCONFIG_CRC32=yCONFIG_ZLIB_INFLATE=yCONFIG_GENERIC_HARDIRQS=yCONFIG_GENERIC_IRQ_PROBE=yCONFIG_X86_BIOS_REBOOT=y
Re: 2.6.13-rc6-rt5
Quoted 6 lines · Steven Rostedt
OK, I compiled it now. Tried to boot, and it rebooted on me before showing any output :-(
So I'll start debugging it, but just incase I'm not looking for something that is already found, is there anything wrong with the following config?
please send non-stripped .configs if possible, if you want me to try and reproduce your problem.
Ingo
Re: 2.6.13-rc6-rt5
In reply to Steven RostedtQuoted 6 lines · Steven Rostedt
OK, I compiled it now. Tried to boot, and it rebooted on me before showing any output :-(
So I'll start debugging it, but just incase I'm not looking for something that is already found, is there anything wrong with the following config?
your .config reboots here too. I suspect it's one of the latency tracing options that causes it. Perhaps some trace recursion?
Ingo
Re: 2.6.13-rc6-rt5
In reply to Steven Rostedti removed some debug options from your .config, and that booted. Here's the diff between the good and bad .config's. Trying to narrow it down further.
Ingo
.config.bad00 renamed from .config.good00 +15 -11
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.13-rc6-rt6 -# Tue Aug 16 18:10:47 2005 +# Tue Aug 16 18:05:14 2005 # CONFIG_X86=y CONFIG_MMU=y
@@ -156,7 +156,6 @@ # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y CONFIG_HAVE_DEC_LOCK=y -# CONFIG_REGPARM is not set CONFIG_SECCOMP=y # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set
@@ -1239,23 +1238,28 @@ CONFIG_LOG_BUF_SHIFT=14 CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_WAKEUP_TIMING is not set +CONFIG_DEBUG_SLAB=y +CONFIG_DEBUG_PREEMPT=y +CONFIG_DEBUG_IRQ_FLAGS=y +CONFIG_WAKEUP_TIMING=y +# CONFIG_WAKEUP_LATENCY_HIST is not set +CONFIG_PREEMPT_TRACE=y # CONFIG_CRITICAL_PREEMPT_TIMING is not set # CONFIG_CRITICAL_IRQSOFF_TIMING is not set -# CONFIG_RT_DEADLOCK_DETECT is not set +CONFIG_LATENCY_TIMING=y +CONFIG_LATENCY_TRACE=y +CONFIG_MCOUNT=y +CONFIG_RT_DEADLOCK_DETECT=y # CONFIG_DEBUG_RT_LOCKING_MODE is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_FS is not set -# CONFIG_USE_FRAME_POINTER is not set +CONFIG_FRAME_POINTER=y CONFIG_EARLY_PRINTK=y -# CONFIG_DEBUG_STACKOVERFLOW is not set +CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_KPROBES is not set -# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_STACK_USAGE=y # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_4KSTACKS is not set CONFIG_X86_FIND_SMP_CONFIG=y
Re: 2.6.13-rc6-rt5
Quoted 3 lines · Ingo Molnar
i removed some debug options from your .config, and that booted. Here's the diff between the good and bad .config's. Trying to narrow it down further.
even narrower diff below. My guess would be onCONFIG_DEBUG_STACKOVERFLOW.
Ingo
.config.bad00 renamed from .config.good01 +10 -7
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.13-rc6-rt6 -# Tue Aug 16 18:13:48 2005 +# Tue Aug 16 18:05:14 2005 # CONFIG_X86=y CONFIG_MMU=y
@@ -156,7 +156,6 @@ # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y CONFIG_HAVE_DEC_LOCK=y -# CONFIG_REGPARM is not set CONFIG_SECCOMP=y # CONFIG_HZ_100 is not set # CONFIG_HZ_250 is not set
@@ -1242,21 +1241,25 @@ CONFIG_DEBUG_SLAB=y CONFIG_DEBUG_PREEMPT=y CONFIG_DEBUG_IRQ_FLAGS=y -# CONFIG_WAKEUP_TIMING is not set +CONFIG_WAKEUP_TIMING=y +# CONFIG_WAKEUP_LATENCY_HIST is not set CONFIG_PREEMPT_TRACE=y # CONFIG_CRITICAL_PREEMPT_TIMING is not set # CONFIG_CRITICAL_IRQSOFF_TIMING is not set +CONFIG_LATENCY_TIMING=y +CONFIG_LATENCY_TRACE=y +CONFIG_MCOUNT=y CONFIG_RT_DEADLOCK_DETECT=y # CONFIG_DEBUG_RT_LOCKING_MODE is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_INFO=y # CONFIG_DEBUG_FS is not set -# CONFIG_USE_FRAME_POINTER is not set +CONFIG_FRAME_POINTER=y CONFIG_EARLY_PRINTK=y -# CONFIG_DEBUG_STACKOVERFLOW is not set +CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_KPROBES is not set -# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_STACK_USAGE=y # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_4KSTACKS is not set CONFIG_X86_FIND_SMP_CONFIG=y
Re: 2.6.13-rc6-rt5
it's the raw_local_irq_save() in ___trace() that causes trouble.
Ingo
2.6.13-rc6-rt6
Quoted 1 line · Ingo Molnar
it's the
raw_local_irq_save()in___trace()that causes trouble.
ok, i've uploaded 2.6.13-rc6-rt6, which should fix this. (i've pushed the IRQ tracing into the raw_local_*() primitives, and kept the __raw_local_*() primitives clean, and ___trace() is using them now)
Does it boot for you now?
-rt6 also includes the USB fixes from Alan Stern, and an x64 fix from Dave Jiang. (albeit x64 likely doesnt work yet)
Ingo
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 9 lines · Ingo Molnar
Quoted 1 line · Ingo Molnar
it's the
raw_local_irq_save()in___trace()that causes trouble.ok, i've uploaded 2.6.13-rc6-rt6, which should fix this. (i've pushed the IRQ tracing into the raw_local_*() primitives, and kept the __raw_local_*() primitives clean, and
___trace()is using them now)Does it boot for you now?
Ingo,
I just compiled it and got a bunch of uninitialized variable warnings. Are you sure you want this? Here's the problem.
In something like _trace_cmdline we have:
static void notrace _trace_cmdline(int cpu, struct cpu_trace *tr)
{
unsigned long flags;
raw_local_save_flags(flags);
____trace(cpu, TRACE_CMDLINE, tr, 0, 0, 0, 0, 0, flags);
}Now the raw_local_save_flags is defined as:
do { typecheck(unsigned long,flags); \
if (raw_irqs_disabled_flags(flags)) \
trace_irqs_off(); else trace_irqs_on(); \
__raw_local_save_flags(flags); } while (0)The test of raw_irqs_disabled_flags is checking an uninitialized variable. I haven't tried to run it yet since this just doesn't look good.
I changed it for now to the following, but it still desn't make sense to me. With a local_save_flags, which doesn't disable or restore the interrupts, why bother with the trace at all?
-- Steve
include/linux/rt_irq.h (working copy) renamed from include/linux/rt_irq.h (revision 294) +1 -1
@@ -26,7 +26,7 @@ # endif /* soft state does not follow the hard state */ -# define raw_local_save_flags(flags) do { typecheck(unsigned long,flags); if (raw_irqs_disabled_flags(flags)) trace_irqs_off(); else trace_irqs_on(); __raw_local_save_flags(flags); } while (0) +# define raw_local_save_flags(flags) do { typecheck(unsigned long,flags); if (raw_irqs_disabled()) trace_irqs_off(); else trace_irqs_on(); __raw_local_save_flags(flags); } while (0) # define raw_local_irq_enable() do { trace_irqs_on(); __raw_local_irq_enable(); } while (0) # define raw_local_irq_disable() do { __raw_local_irq_disable(); trace_irqs_off(); } while (0) # define raw_local_irq_save(flags) do { __raw_local_irq_save(flags); trace_irqs_off(); } while (0)
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 3 lines · Steven Rostedt
I changed it for now to the following, but it still desn't make sense to me. With a
local_save_flags, which doesn't disable or restore the interrupts, why bother with the trace at all?
Or should the following patch really be applied? (it boots and compiles nicely).
-- Steve
include/linux/rt_irq.h +1 -1
@@ -26,7 +26,7 @@# endif /* soft state does not follow the hard state */ -# define raw_local_save_flags (flags) do { typecheck(unsigned long,flags); if (raw_irqs_disabled_flags(flags)) trace_irqs_off(); else trace_irqs_on(); __raw_local_save_flags(flags); } while (0) +# define raw_local_save_flags (flags) do { typecheck(unsigned long,flags); __raw_local_save_flags(flags); } while (0)# define raw_local_irq_enable () do { trace_irqs_on(); __raw_local_irq_enable(); } while (0)# define raw_local_irq_disable () do { __raw_local_irq_disable(); trace_irqs_off(); } while (0)# define raw_local_irq_save (flags) do { __raw_local_irq_save(flags); trace_irqs_off(); } while (0)
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 9 lines · Steven Rostedt
Quoted 3 lines · Steven Rostedt
I changed it for now to the following, but it still desn't make sense to me. With a
local_save_flags, which doesn't disable or restore the interrupts, why bother with the trace at all?Or should the following patch really be applied? (it boots and compiles nicely).
Since the change made raw_local_save_flags the same for both PREEMPT_RT and !PREEMPT_RT, I moved it out of the #ifdef altogether. The __raw_local_save_flags already does the type checking (at least for intel).
-- Steve
include/linux/rt_irq.h +1 -2
@@ -26,7 +26,6 @@# endif /* soft state does not follow the hard state */ -# define raw_local_save_flags (flags) do { typecheck(unsigned long,flags); if (raw_irqs_disabled_flags(flags)) trace_irqs_off(); else trace_irqs_on(); __raw_local_save_flags(flags); } while (0)# define raw_local_irq_enable () do { trace_irqs_on(); __raw_local_irq_enable(); } while (0)# define raw_local_irq_disable () do { __raw_local_irq_disable(); trace_irqs_off(); } while (0)# define raw_local_irq_save (flags) do { __raw_local_irq_save(flags); trace_irqs_off(); } while (0)
@@ -35,7 +34,6 @@# define raw_safe_halt () __raw_safe_halt()#else # define RAW_LOCAL_ILLEGAL_MASK 0UL -# define raw_local_save_flags __raw_local_save_flags# define raw_local_irq_enable __raw_local_irq_enable# define raw_local_irq_disable __raw_local_irq_disable# define raw_local_irq_save __raw_local_irq_save
@@ -50,6 +48,7 @@# define irqs_disabled_flags __raw_irqs_disabled_flags#endif +#define raw_local_save_flags __raw_local_save_flags#define raw_irqs_disabled __raw_irqs_disabled#define raw_irqs_disabled_flags __raw_irqs_disabled_flags
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Ingo,
FYI, I ran this on my laptop (Pentium4 HT) and it locked up shortly after it started INIT. I rebooted, and now it's up and running with no problems!?! I'll reboot it a few more times to see if it will lock up again.
Unfortunately, my laptop doesn't have any serial so I don't have much to debug with it. I'll set up netconsole, but this is not as reliable under RT, or was this fixed. I remember before that it could call things that would schedule and had some hooks to keep interrupts on.
Oh, I also did get the message when it started:
WARNING: kstopmachine/859 changed soft IRQ-flags.
[<c0149e0b>] stop_machine+0x11b/0x160 (8) [<c0149e7e>] do_stop+0xe/0x70 (32) [<c0139c5a>] kthread+0xba/0xc0 (16) [<c0139ba0>] kthread+0x0/0xc0 (28) [<c0101385>] kernel_thread_helper+0x5/0x10 (16) ---------------------------
| preempt count: 00000000 ]
| 0-level deep critical section nesting:
----------------------------------------
------------------------------
| showing all locks held by: | (kstopmachine/859 [f74dc840, 0]):
------------------------------
The kernel I used was rt6 with my latest patch to the raw_local_save_flags.
Config attached.
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 6 lines · Steven Rostedt
Ingo,
FYI, I ran this on my laptop (Pentium4 HT) and it locked up shortly after it started INIT. I rebooted, and now it's up and running with no problems!?! I'll reboot it a few more times to see if it will lock up again.
With a small change it locks up all the time :-)
Quoted 6 lines
Unfortunately, my laptop doesn't have any serial so I don't have much to debug with it. I'll set up netconsole, but this is not as reliable under RT, or was this fixed. I remember before that it could call things that would schedule and had some hooks to keep interrupts on.
Quoted 8 lines
Oh, I also did get the message when it started:
WARNING: kstopmachine/859 changed soft IRQ-flags.
[<c0149e0b>] stop_machine+0x11b/0x160 (8) [<c0149e7e>] do_stop+0xe/0x70 (32) [<c0139c5a>] kthread+0xba/0xc0 (16) [<c0139ba0>] kthread+0x0/0xc0 (28) [<c0101385>] kernel_thread_helper+0x5/0x10 (16)
I replaced this with raw_local_irq_disable and it really locks up everytime now. I need to look into how this is best done.
Quoted 2 lines
The kernel I used was rt6 with my latest patch to the
raw_local_save_flags.
I just got the NMI working, but since it is now 1:44am my time, I'm going to bed. I'll run it again tomorrow and hopefully the NMI will show where and why it's locking up.
-- Steve
Re: 2.6.13-rc6-rt6
Quoted 9 lines · Steven Rostedt
Quoted 6 lines · Steven Rostedt
Ingo,
FYI, I ran this on my laptop (Pentium4 HT) and it locked up shortly after it started INIT. I rebooted, and now it's up and running with no problems!?! I'll reboot it a few more times to see if it will lock up again.
With a small change it locks up all the time :-)
unfortunately the space of "patches that break the kernel" is infinitely larger (and infinitely easier to generate) than the space of "patches that improve the kernel" - so i'll skip your patch for now ;-)
Quoted 11 lines
Quoted 8 lines
Oh, I also did get the message when it started:
WARNING: kstopmachine/859 changed soft IRQ-flags.
[<c0149e0b>] stop_machine+0x11b/0x160 (8) [<c0149e7e>] do_stop+0xe/0x70 (32) [<c0139c5a>] kthread+0xba/0xc0 (16) [<c0139ba0>] kthread+0x0/0xc0 (28) [<c0101385>] kernel_thread_helper+0x5/0x10 (16)I replaced this with
raw_local_irq_disableand it really locks up everytime now. I need to look into how this is best done.
how come it is stopping the machine during bootup? Or does the lockup occur during shutdown? changing the local_irq_disable() to raw_local_irq_disable() looks wrong because sooner or later we hit complete(). You are probably locking up earlier than that though, perhaps in stopmachine_set_state()?
but stop_machine() looks quite preempt-unsafe to begin with. The local_irq_disable() would not be needed at all if prior the for_each_online_cpu() loop we'd use set_cpus_allowed. The current method of achieving 'no preemption' is simply racy even during normal CONFIG_PREEMPT.
Ingo
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 4 lines · Ingo Molnar
unfortunately the space of "patches that break the kernel" is infinitely larger (and infinitely easier to generate) than the space of "patches that improve the kernel" - so i'll skip your patch for now ;-)
Yeah, I took out my "bad" fix and it still locks up. Since I got the NMI working I was able to get output. Unfortunately, the laptop doesn't have a serial (damn vendors getting rid of the very useful _for us_ uart). And so far the netconsole doesn't seem to be working yet.
Here's the output (typed from screen).
Freeing unused kernel memory: 296k freed NMI watchdog detected lockup on CPU#1 (50000/50000)
Pid: 796, comm: hotplug
EIP: 0060:[<c0331662>] CPU: 1
EIP is at _raw_spin_lock+0x72/0xa0
EFLAGS: 00000002 Not tainted (2.6.13-rc6-rt6)
EXI: 00000001 EBX: .... (I'm not about to type all the registers out). [...]try_to_wake_up+0x4e__reacquire_kernel_lock+0x2dpick_new_owner+0x6bwake_up_process+0x30rt_up+0x290chrdev_open+0xfdlock_kernel+0x28chrdev_open+0xfdtty_open+0x0chrdev_open+0xfdfile_move+0x20dentry_open+0x17afilp_open+0x68_spin_lock+0x23get_unused_fd+0xa2sys_open+0x4fsyscall_call+0x7
----
preempt count: 3
3-level deep critical section nesting:
----rt_up+0x2cadd_preempt_count+0x1aadd_preempt_count+0x1a
----
showing all locks held by: (hotplug/796 [...])
- No locks where shown.
Quoted 6 lines
how come it is stopping the machine during bootup? Or does the lockup occur during shutdown? changing the
local_irq_disable()toraw_local_irq_disable()looks wrong because sooner or later we hitcomplete(). You are probably locking up earlier than that though, perhaps instopmachine_set_state()?
This is on bootup. The stopmachine is used in sys_init_module.
Quoted 6 lines
but
stop_machine()looks quite preempt-unsafe to begin with. Thelocal_irq_disable()would not be needed at all if prior thefor_each_online_cpu()loop we'd useset_cpus_allowed. The current method of achieving 'no preemption' is simply racy even during normalCONFIG_PREEMPT.
I guess I'll need to look into this further.
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 12 lines · Steven Rostedt
Quoted 4 lines · Ingo Molnar
unfortunately the space of "patches that break the kernel" is infinitely larger (and infinitely easier to generate) than the space of "patches that improve the kernel" - so i'll skip your patch for now ;-)
Yeah, I took out my "bad" fix and it still locks up. Since I got the NMI working I was able to get output. Unfortunately, the laptop doesn't have a serial (damn vendors getting rid of the very useful
_forus_uart). And so far the netconsole doesn't seem to be working yet.
Silly me, I never compiled netconsole into the kernel for my laptop (I've done it on all my other machines that happen to have a serial!).
OK the output from netconsole still seems like netconsole itself is causing some problems. But I think it is also showing this lockup. I'll recompile my kernel as UP and see if netconsole works fine.
Here's what netconsole shows:
netconsole: device eth0 not up yet, forcing it
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is on for TX and on for RX. softirq-net-rx//6[CPU#0]: BUG in up_mutex at kernel/rt.c:1945
[<c012258c>] __WARN_ON+0x6c/0x90 (8) [<c02d3c4a>] net_rx_action+0x15a/0x1e0 (44) [<c01406e0>] up_mutex+0x410/0x440 (4) [<c02d3c4a>] net_rx_action+0x15a/0x1e0 (40) [<c0127b40>] ksoftirqd+0xf0/0x170 (40) [<c0127a50>] ksoftirqd+0x0/0x170 (32) [<c0139c5a>] kthread+0xba/0xc0 (4) [<c0139ba0>] kthread+0x0/0xc0 (28) [<c0101385>] kernel_thread_helper+0x5/0x10 (16) ---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c014201a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
[... a bunch more dumps ...]
netconsole: network logging started
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH4: IDE controller at PCI slot 0000:00:1f.1
[... normal output ...]
Freeing unused kernel memory: 296k freed
BUG: using smp_processor_id() in preemptible [00000000] code: kjournald/795 caller is netpoll_send_skb+0x38/0x100 [<c020bb74>] debug_smp_processor_id+0xb4/0xc0 (8) [<c02e1e48>] netpoll_send_skb+0x38/0x100 (8) [<c02e1e48>] netpoll_send_skb+0x38/0x100 (20) [<c02ad327>] write_msg+0x67/0xd0 (24) [<c0121962>] __call_console_drivers+0x62/0x70 (32) [<c0121ab3>] call_console_drivers+0xb3/0x150 (28) [<c0121f81>] release_console_sem+0x51/0xf0 (36) [<c0121dda>] vprintk+0x18a/0x240 (28) [<c011c05b>] __wake_up+0x4b/0x80 (76) [<c0121c47>] printk+0x17/0x20 (36) [<c01d4e01>] kjournald+0x91/0x250 (12) [<c01420ca>] sub_preempt_count+0x1a/0x20 (28) [<c0333502>] _raw_spin_unlock+0x12/0x30 (12) [<c01420ca>] sub_preempt_count+0x1a/0x20 (20) [<c011a507>] schedule_tail+0x87/0x110 (12) [<c01d4d50>] commit_timeout+0x0/0x10 (32) [<c01d4d70>] kjournald+0x0/0x250 (32) [<c0101385>] kernel_thread_helper+0x5/0x10 (16) ---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c014201a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
[ looks like the above is the NMI going off and netconsole screaming ]
[... a bunch more smp_processor_id() bug outputs ...] [ then ...]
Hotplug/796[CPU#1]: BUG in set_new_owner at kernel/rt.c:916 NMI watchdog detected lockup on CPU#1 (50000/50000)
Pid: 796, comm: hotplug
----
Then no more output. So netconsole sort of works, but seems to croak on a NMI. It may be best if I keep netconsole off. Or do you have any better ideas?
Quoted 38 lines
Here's the output (typed from screen).
Freeing unused kernel memory: 296k freed NMI watchdog detected lockup on CPU#1 (50000/50000)
Pid: 796, comm: hotplug
EIP: 0060:[<c0331662>] CPU: 1
EIP is at_raw_spin_lock+0x72/0xa0
EFLAGS: 00000002 Not tainted (2.6.13-rc6-rt6)
EXI: 00000001 EBX: .... (I'm not about to type all the registers out). [...]try_to_wake_up+0x4e__reacquire_kernel_lock+0x2dpick_new_owner+0x6bwake_up_process+0x30rt_up+0x290chrdev_open+0xfdlock_kernel+0x28chrdev_open+0xfdtty_open+0x0chrdev_open+0xfdfile_move+0x20dentry_open+0x17afilp_open+0x68_spin_lock+0x23get_unused_fd+0xa2sys_open+0x4fsyscall_call+0x7
----
preempt count: 3
3-level deep critical section nesting:
----rt_up+0x2cadd_preempt_count+0x1aadd_preempt_count+0x1a
----
showing all locks held by: (hotplug/796 [...])
Quoted 2 lines
- No locks where shown.
I kept the above just to see what is shown without netconsole, but I only get a screen shot with it.
If worse comes to worse, I'll switch the testing to my main machine (AMD SMP) and see if it crashes. It's just that this is the machine that I do my email with. But at least it has a serial.
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 3 lines · Steven Rostedt
OK the output from netconsole still seems like netconsole itself is causing some problems. But I think it is also showing this lockup. I'll recompile my kernel as UP and see if netconsole works fine.
Well, the UP kernel boots on my laptop, but netconsole gives strange warnings.
OK, what's the scoop with the illegal_API_call? What is it about, and what is the expected work around?
I'm also getting the following output on shutdown:
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.7
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM ver 1.5
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
BUG: nonzero lock count 1 at exit time?
nfsd: 4696 [f7183830, 115]
[<c0136922>] check_no_held_locks+0x62/0x330 (8)
[<c011df67>] do_exit+0x257/0x480 (32)
[<c013d052>] __module_put_and_exit+0x52/0x70 (40)
[<f8d54583>] nfsd+0x2b3/0x340 [nfsd] (12)
[<f8d542d0>] nfsd+0x0/0x340 [nfsd] (48)
[<c010140d>] kernel_thread_helper+0x5/0x18 (16)
---------------------------| preempt count: 00000000 ]
| 0-level deep critical section nesting:
----------------------------------------
------------------------------
| showing all locks held by: | (nfsd/4696 [f7183830, 116]):
------------------------------
#001: [c038e184] {kernel_sem.lock}
... acquired at: lock_kernel+0x21/0x40
BUG: nfsd/4696, BKL held at task exit time!
And it goes on and on. This happens everytime. Without netconsole, I only get the nonzero lock count error. Also, one of my lockups on SMP had to do with the kernel_thread_helper:
Using IPI Shortcut mode
khelper/794[CPU#0]: BUG in set_new_owner at kernel/rt.c:916 NMI watchdog detected lockup on CPU#1 (50000/50000)
Pid: 24, comm: khelper
EIP: 0060:[<c0140368>] CPU: 1
EIP is at up_mutex+0x98/0x440
EFLAGS: 00000082 Not tainted (2.6.13-rc6-rt6)
EAX: c04278a4 EBX: cf68feec ECX: 00000206 EDX: c0396b8c
ESI: cf68fec8 EDI: 00000246 EBP: c011c191 DS: 007b ES: 007b
CR0: 8005003b CR2: 00000000 CR3: 00478000 CR4: 000006d0
[<c011c191>] complete+0x51/0x80 (40) [<c0133fef>] worker_thread+0x1cf/0x290 (40) [<c0133a60>] __call_usermodehelper+0x0/0x70 (24) [<c011bf70>] default_wake_function+0x0/0x30 (28) [<c011bf70>] default_wake_function+0x0/0x30 (32) [<c032fc6b>] schedule+0x4b/0x120 (12) [<c0133e20>] worker_thread+0x0/0x290 (24) [<c0139c5a>] kthread+0xba/0xc0 (4) [<c0139ba0>] kthread+0x0/0xc0 (28) [<c0101385>] kernel_thread_helper+0x5/0x10 (16) ---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c014201a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
------------------------------
| showing all locks held by: | (khelper/24 [c19df120, 111]):
------------------------------
NMI watchdog detected lockup on CPU#0 (50000/50000)
Pid: 794, comm: khelper
EIP: 0060:[<c013ef1f>] CPU: 0
EIP is at __down_trylock+0x9f/0x330
EFLAGS: 00000082 Not tainted (2.6.13-rc6-rt6)
EAX: c0395238 EBX: 00000000 ECX: 00008000 EDX: 000043b0
ESI: c0395224 EDI: cf4d2000 EBP: 00000086 DS: 007b ES: 007b
CR0: 8005003b CR2: fff3f000 CR3: 00478000 CR4: 000006d0
[<c0141033>] rt_down_trylock+0x33/0x480 (44) [<c0121db2>] vprintk+0x162/0x240 (8) [<c020986b>] vscnprintf+0x2b/0x40 (8) [<c0121db2>] vprintk+0x162/0x240 (24) [<c014201a>] add_preempt_count+0x1a/0x20 (36) [<c0333059>] _raw_spin_lock+0x19/0xa0 (12) [<c01420ca>] sub_preempt_count+0x1a/0x20 (12) [<c0141f27>] add_preempt_count_ti+0x27/0x100 (4) [<c014201a>] add_preempt_count+0x1a/0x20 (28) [<c0121c47>] printk+0x17/0x20 (20) [<c0122587>] __WARN_ON+0x67/0x90 (12) [<c033100a>] __down_mutex+0x2fa/0x5d0 (48) [<c01247f0>] do_exit+0x170/0x490 (112) [<c01419cd>] atomic_dec_and_spin_lock+0x2d/0x80 (8) [<c01247f0>] do_exit+0x170/0x490 (8) [<c01247f0>] do_exit+0x170/0x490 (20) [<c01339a8>] ____call_usermodehelper+0xe8/0xf0 (40) [<c01338c0>] ____call_usermodehelper+0x0/0xf0 (12) [<c0101385>] kernel_thread_helper+0x5/0x10 (12) ---------------------------
| preempt count: 00000003 ]
| 3-level deep critical section nesting:
----------------------------------------
.. [<c014201a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
.. [<c014201a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
.. [<c014201a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
------------------------------
| showing all locks held by: | (khelper/794 [cf4f3740, 112]):
------------------------------
-- Steve
Re: 2.6.13-rc6-rt6
Quoted 11 lines · Steven Rostedt
Quoted 3 lines · Steven Rostedt
OK the output from netconsole still seems like netconsole itself is causing some problems. But I think it is also showing this lockup. I'll recompile my kernel as UP and see if netconsole works fine.
Well, the UP kernel boots on my laptop, but netconsole gives strange warnings.
OK, what's the scoop with the
illegal_API_call? What is it about, and what is the expected work around?
this is a recent change: i've started flagging "naked" use of local_irq_disable(), because it's a problem on PREEMPT_RT and it's a potential SMP bug on upstream kernels. A local_irq_disable() is converted either to raw_local_irq_disable() when justified (it's mostly only justified for lowlevel arch code), or is eliminated totally. (either by merging it into a nearby spin_lock API call, or by removing it altogether, making sure that code doesnt break).
Right now we print a warning on the first such API use, and then shut up about it. All local_irq_() APIs map to NOPs. (we keep the PF_IRQSOFF flag for compatibility, but only to get irqs_off() right which in turn shuts off a number of BUG_ON(!irqs_disabled()) warnings, and it doesnt have any other functional purpose.)
the desired end-result would be the total elimination of local_irq_*() API calls.
Quoted 23 lines
I'm also getting the following output on shutdown:
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.7
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM ver 1.5
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initializedBUG: nonzero lock count 1 at exit time? nfsd: 4696 [f7183830, 115] [<c0136922>] check_no_held_locks+0x62/0x330 (8) [<c011df67>] do_exit+0x257/0x480 (32) [<c013d052>] __module_put_and_exit+0x52/0x70 (40) [<f8d54583>] nfsd+0x2b3/0x340 [nfsd] (12) [<f8d542d0>] nfsd+0x0/0x340 [nfsd] (48) [<c010140d>] kernel_thread_helper+0x5/0x18 (16) ---------------------------| preempt count: 00000000 ]
| 0-level deep critical section nesting:
----------------------------------------
Quoted 8 lines
------------------------------
| showing all locks held by: | (nfsd/4696 [f7183830, 116]):
------------------------------#001: [
c038e184] {kernel_sem.lock}
... acquired at:lock_kernel+0x21/0x40BUG: nfsd/4696, BKL held at task exit time!
hm, it seems nfsd forgets to do an unlock_kernel() in some exit path it seems? We are enforcing strict balanced lock use in PREEMPT_RT - the upstream kernel is more relaxed about it.
Quoted 6 lines
And it goes on and on. This happens everytime. Without netconsole, I only get the nonzero lock count error. Also, one of my lockups on SMP had to do with the
kernel_thread_helper:Using IPI Shortcut mode
khelper/794[CPU#0]: BUG inset_new_owneratkernel/rt.c:916
this is a 'must not happen'. Somehow lock->held list got non-empty. Maybe some use-after-free thing? Havent seen it myself.
Ingo
Re: 2.6.13-rc6-rt6
Quoted 52 lines · Ingo Molnar
Quoted 10 lines · Steven Rostedt
Quoted 3 lines · Steven Rostedt
OK the output from netconsole still seems like netconsole itself is causing some problems. But I think it is also showing this lockup. I'll recompile my kernel as UP and see if netconsole works fine.
Well, the UP kernel boots on my laptop, but netconsole gives strange warnings.
OK, what's the scoop with the
illegal_API_call? What is it about, and what is the expected work around?this is a recent change: i've started flagging "naked" use of
local_irq_disable(), because it's a problem onPREEMPT_RTand it's a potential SMP bug on upstream kernels. Alocal_irq_disable()is converted either toraw_local_irq_disable()when justified (it's mostly only justified for lowlevel arch code), or is eliminated totally. (either by merging it into a nearbyspin_lockAPI call, or by removing it altogether, making sure that code doesnt break).Right now we print a warning on the first such API use, and then shut up about it. All
local_irq_()APIs map to NOPs. (we keep thePF_IRQSOFFflag for compatibility, but only to getirqs_off()right which in turn shuts off a number of BUG_ON(!irqs_disabled()) warnings, and it doesnt have any other functional purpose.)the desired end-result would be the total elimination of local_irq_*() API calls.
Quoted 30 lines
I'm also getting the following output on shutdown:
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP ver 2.7
Bluetooth: L2CAP socket layer initialized
Bluetooth: RFCOMM ver 1.5
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initializedBUG: nonzero lock count 1 at exit time? nfsd: 4696 [f7183830, 115] [<c0136922>] check_no_held_locks+0x62/0x330 (8) [<c011df67>] do_exit+0x257/0x480 (32) [<c013d052>] __module_put_and_exit+0x52/0x70 (40) [<f8d54583>] nfsd+0x2b3/0x340 [nfsd] (12) [<f8d542d0>] nfsd+0x0/0x340 [nfsd] (48) [<c010140d>] kernel_thread_helper+0x5/0x18 (16) ---------------------------| preempt count: 00000000 ]
| 0-level deep critical section nesting:
----------------------------------------------------------------------
| showing all locks held by: | (nfsd/4696 [f7183830, 116]):
------------------------------#001: [
c038e184] {kernel_sem.lock}
... acquired at:lock_kernel+0x21/0x40
Quoted 8 lines
Quoted 1 line
BUG: nfsd/4696, BKL held at task exit time!hm, it seems nfsd forgets to do an
unlock_kernel()in some exit path it seems? We are enforcing strict balanced lock use inPREEMPT_RT- the upstream kernel is more relaxed about it.
This one has been biting me in the shorts since going to the 2.6.13-rc? RT series on my older SMP system at home. In every case the system hangs on shutdown and requires a hard reset. I just hadn't had the time to check into it. I was just in the process of building 2.6.13-rc6 without RT to check if it still happened. Guess I won't bother now. :-)
Aug 16 11:11:09 porky kernel: BUG: nonzero lock count 1 at exit time?
Aug 16 11:11:09 porky kernel: nfsd: 4476 [dd1691a0, 115]
Aug 16 11:11:09 porky kernel: [<c010418e>] dump_stack+0x1e/0x20 (20)
Aug 16 11:11:09 porky kernel: [<c013b7ff>] check_no_held_locks+0x1af/0x370 (36)
Aug 16 11:11:09 porky kernel: [<c0122e3f>] do_exit+0x26f/0x480 (44)
Aug 16 11:11:09 porky kernel: [<c01413c1>] __module_put_and_exit+0x51/0x70 (16)
Aug 16 11:11:09 porky kernel: [<e5a8558d>] nfsd+0x2bd/0x340 [nfsd] (68)
Aug 16 11:11:09 porky kernel: [<c0101315>] kernel_thread_helper+0x5/0x10 (65485
2124)
Aug 16 11:11:09 porky kernel: ---------------------------
Aug 16 11:11:09 porky kernel: | preempt count: 00000000 ]
Aug 16 11:11:09 porky kernel: | 0-level deep critical section nesting:
Aug 16 11:11:09 porky kernel: ----------------------------------------
Aug 16 11:11:09 porky kernel:
Aug 16 11:11:09 porky kernel: ------------------------------
Aug 16 11:11:09 porky kernel: | showing all locks held by: | (nfsd/4476 [dd1691
a0, 116]):
Aug 16 11:11:09 porky kernel: ------------------------------
Aug 16 11:11:09 porky kernel:
Aug 16 11:11:09 porky kernel: #001: [c0390fe4] {kernel_sem.lock}
Aug 16 11:11:09 porky kernel: ... acquired at: lock_kernel+0x28/0x50
Aug 16 11:11:09 porky kernel:
Aug 16 11:11:09 porky kernel: BUG: nfsd/4476, BKL held at task exit time!
Aug 16 11:11:09 porky kernel: BKL acquired at: nfsd+0x273/0x340 [nfsd]
Aug 16 11:11:09 porky kernel: [c0390fe4] {kernel_sem.lock}
Aug 16 11:11:09 porky kernel: .. held by: nfsd: 4476 [dd1691a0, 116]
Aug 16 11:11:09 porky kernel: ... acquired at: lock_kernel+0x28/0x50
Aug 16 11:46:44 porky syslogd 1.4.1: restart.Quoted 18 lines
Quoted 7 lines
And it goes on and on. This happens everytime. Without netconsole, I only get the nonzero lock count error. Also, one of my lockups on SMP had to do with the
kernel_thread_helper:Using IPI Shortcut mode
khelper/794[CPU#0]: BUG inset_new_owneratkernel/rt.c:916this is a 'must not happen'. Somehow
lock->heldlist got non-empty. Maybe some use-after-free thing? Havent seen it myself.Ingo
-
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/
Signature · 1 line
kr
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 5 lines · K.R. Foley
This one has been biting me in the shorts since going to the 2.6.13-rc? RT series on my older SMP system at home. In every case the system hangs on shutdown and requires a hard reset. I just hadn't had the time to check into it. I was just in the process of building 2.6.13-rc6 without RT to check if it still happened. Guess I won't bother now. :-)
On my AMD SMP box, the system boots with no problems. It did lock up on shutdown right after it showed the nfsd bug. My laptop still locks up on start-up so I need to take a look at it. It's hyper-threaded and not normal SMP, although I don't think that would make much of a difference. I'll copy over my config of my AMD box to my laptop, and make just the changes that are required for the hardware, and see if it boots farther.
When I ran my laptop in UP, on shutdown it also saw the nfsd problem, but it never locked up. My AMD SMP box did lock up.
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 1 line · Steven Rostedt
On my AMD SMP box, the system boots with no problems.
I shouldn't say no problems. I got this really nasty stuff on the serial but not on the vga. Below is the patch.
I'm currently compiling my laptop to try this out. I started converting to my AMD box and decided to try this first. Unfortunately, I modified enough to do a full compile from scratch again.
BUG: stack overflow: only 984 bytes left! [c05c0424...(c05c0000-c05c2000)] -----------------------------> | new stack-footprint maximum: swapper/0, 7096 bytes (out of 8136 bytes). ------------| [<c05c2000>] no_halt+0x0/0x20 (20) [<c01430cb>] __mcount+0x4b/0xe0 (20) [<c0142a77>] fill_worst_stack+0x67/0x70 (12) [<c0142c30>] debug_stackoverflow+0x70/0xd0 (16) [<c01223d0>] printk+0x20/0x30 (8) [<c01223ee>] vprintk+0xe/0x2b0 (4) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223ee>] vprintk+0xe/0x2b0 (20) [<c0142b8a>] print_worst_stack+0x1a/0x50 (8) [<c01223bb>] printk+0xb/0x30 (60) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223d0>] printk+0x20/0x30 (20) [<c0142aab>] __print_worst_stack+0x2b/0xf0 (20) [<c01457ac>] sub_preempt_count+0x1c/0x20 (8) [<c0142b8a>] print_worst_stack+0x1a/0x50 (24) [<c0142baf>] print_worst_stack+0x3f/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (4) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c01430cb>] __mcount+0x4b/0xe0 (32) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (40) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0113d8c>] mcount+0x14/0x18 (8) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (20) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0142b8a>] print_worst_stack+0x1a/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c01225dd>] vprintk+0x1fd/0x2b0 (12) [<c01430cb>] __mcount+0x4b/0xe0 (28) [<c01223bb>] printk+0xb/0x30 (40) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223bb>] printk+0xb/0x30 (20) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (20) [<c0142b8a>] print_worst_stack+0x1a/0x50 (32) [<c0142baf>] print_worst_stack+0x3f/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (4) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c01430cb>] __mcount+0x4b/0xe0 (32) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (40) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0113d8c>] mcount+0x14/0x18 (8) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (20) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0142b8a>] print_worst_stack+0x1a/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c01225dd>] vprintk+0x1fd/0x2b0 (12) [<c01430cb>] __mcount+0x4b/0xe0 (28) [<c01223bb>] printk+0xb/0x30 (40) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223bb>] printk+0xb/0x30 (20) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (20) [<c0142b8a>] print_worst_stack+0x1a/0x50 (32) [<c0142baf>] print_worst_stack+0x3f/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (4) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c01430cb>] __mcount+0x4b/0xe0 (32) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (40) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0113d8c>] mcount+0x14/0x18 (8) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (20) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0142b8a>] print_worst_stack+0x1a/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c01225dd>] vprintk+0x1fd/0x2b0 (12) [<c01430cb>] __mcount+0x4b/0xe0 (28) [<c01223bb>] printk+0xb/0x30 (40) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223bb>] printk+0xb/0x30 (20) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (20) [<c0142b8a>] print_worst_stack+0x1a/0x50 (32) [<c0142baf>] print_worst_stack+0x3f/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (4) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c01430cb>] __mcount+0x4b/0xe0 (32) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (40) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0113d8c>] mcount+0x14/0x18 (8) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (20) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12) [<c0142b8a>] print_worst_stack+0x1a/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c01225dd>] vprintk+0x1fd/0x2b0 (12) [<c01430cb>] __mcount+0x4b/0xe0 (28) [<c01223bb>] printk+0xb/0x30 (40) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223bb>] printk+0xb/0x30 (20) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (20) [<c0142b8a>] print_worst_stack+0x1a/0x50 (32) [<c0142baf>] print_worst_stack+0x3f/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (4) [<c01425fb>] check_raw_flags+0xb/0x60 (4) [<c01430cb>] __mcount+0x4b/0xe0 (32) [<c02ec334>] _raw_spin_lock_irqsave+0x14/0xb0 (40) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (12)
[...]
[<c01223bb>] printk+0xb/0x30 (40) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223bb>] printk+0xb/0x30 (20) [<c0142ae1>] __print_worst_stack+0x61/0xf0 (20) [<c0122753>] release_console_sem+0x33/0xf0 (32) [<c0142baf>] print_worst_stack+0x3f/0x50 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (8) [<c0142c17>] debug_stackoverflow+0x57/0xd0 (20) [<c01430cb>] __mcount+0x4b/0xe0 (20) [<c0122184>] call_console_drivers+0x14/0x150 (40) [<c0113d8c>] mcount+0x14/0x18 (20) [<c0122184>] call_console_drivers+0x14/0x150 (20) [<c0122753>] release_console_sem+0x33/0xf0 (44) [<c0122628>] vprintk+0x248/0x2b0 (32) [<c01223bb>] printk+0xb/0x30 (68) [<c0113d8c>] mcount+0x14/0x18 (20) [<c01223d0>] printk+0x20/0x30 (20) [<c05d2d4c>] sched_init+0x12c/0x150 (20) [<c0113d8c>] mcount+0x14/0x18 (8) [<c05c2901>] start_kernel+0x51/0x220 (32)
-- Steve
kernel/latency.c +4 -1
@@ -377,8 +377,11 @@print_worst_stack (); tr->stack_check++; }else -if (worst_stack_printed != worst_stack_left) +if (worst_stack_printed != worst_stack_left) { + tr->stack_check--;print_worst_stack (); + tr->stack_check++; + } out:atomic_dec (&tr->disabled); }
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
In reply to Ingo MolnarQuoted 6 lines · Ingo Molnar
Quoted 3 lines
Using IPI Shortcut mode
khelper/794[CPU#0]: BUG inset_new_owneratkernel/rt.c:916this is a 'must not happen'. Somehow
lock->heldlist got non-empty. Maybe some use-after-free thing? Havent seen it myself.
Well, I added all my patches and the laptop still locked up.
I then used my AMD SMP box config on my laptop and just changed the processor, and it booted. Not very well, since I didn't bother to change any of the other configurations. But it didn't lock up.
So I went back to the laptop's original config, and did one change. I disabled CONFIG_SCHED_SMT, rebooted, and the system booted up. It hasn't locked up after four boots. It did once get into some crazy bug with scheduling while atomic, but it just spit out so many of them that I couldn't see what caused it. I'll turn back on netconsole to see if I can capture that bug, but it seems to be related to someting different.
So I think something's wrong with the scheduling for hyper threading.
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 8 lines · Steven Rostedt
So I went back to the laptop's original config, and did one change. I disabled
CONFIG_SCHED_SMT, rebooted, and the system booted up. It hasn't locked up after four boots. It did once get into some crazy bug with scheduling while atomic, but it just spit out so many of them that I couldn't see what caused it. I'll turn back on netconsole to see if I can capture that bug, but it seems to be related to someting different.So I think something's wrong with the scheduling for hyper threading.
Spoke too soon. I added netconsole and booted a couple of more times, and I got a crash again. So it seems to happen less often with CONFIG_SCHED_SMT, (don't know why) but it is not the problem.
Here's the latest dump. May be due to having HR timers configured. I'll add my logger and do some more in depth debugging tomorrow.
(the bug happened same place, same time, but not all the time)
-- Steve
Freeing unused kernel memory: 296k freed softirq-timer/0/4[CPU#0]: BUG in set_new_owner at kernel/rt.c:916 NMI watchdog detected lockup on CPU#1 (50000/50000)
Pid: 14, comm: softirq-timer/1
EIP: 0060:[<c032ea3f>] CPU: 1
EIP is at __down_mutex+0xdf/0x5d0
EFLAGS: 00000082 Not tainted (2.6.13-rc6-rt8)
EAX: c1831884 EBX: 00000000 ECX: 00000000 EDX: cf6bdeec
ESI: cf6ba7c0 EDI: cf6bdefc EBP: c1831870 DS: 007b ES: 007b
CR0: 8005003b CR2: 00000000 CR3: 00474000 CR4: 000006d0
[<c0141d44>] check_wakeup_timing+0xd4/0x170 (20) [<c0141db8>] check_wakeup_timing+0x148/0x170 (12) [<c0141c0a>] sub_preempt_count+0x1a/0x20 (64) [<c011bd5e>] __wake_up+0x1e/0x80 (12) [<c0330813>] _spin_lock_irqsave+0x23/0x60 (12) [<c011bd5e>] __wake_up+0x1e/0x80 (8) [<c0141a67>] add_preempt_count_ti+0x27/0x100 (4) [<c011bd5e>] __wake_up+0x1e/0x80 (12) [<c0141b5a>] add_preempt_count+0x1a/0x20 (16) [<c012ba65>] run_timer_softirq+0x2b5/0x470 (32) [<c0127680>] ksoftirqd+0xf0/0x170 (56) [<c0127590>] ksoftirqd+0x0/0x170 (32) [<c013979a>] kthread+0xba/0xc0 (4) [<c01396e0>] kthread+0x0/0xc0 (28) [<c0101385>] kernel_thread_helper+0x5/0x10 (16) ---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c0141b5a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
------------------------------
| showing all locks held by: | (softirq-timer/1/14 [cf6ba7c0, 98]):
------------------------------
NMI watchdog detected lockup on CPU#0 (50000/50000)
Pid: 4, comm: softirq-timer/0
EIP: 0060:[<c013ea5f>] CPU: 0
EIP is at __down_trylock+0x9f/0x330
EFLAGS: 00000082 Not tainted (2.6.13-rc6-rt8)
EAX: c0392238 EBX: 00000000 ECX: 00008000 EDX: 00004773
ESI: c0392224 EDI: cf69c000 EBP: 00000086 DS: 007b ES: 007b
CR0: 8005003b CR2: fff3f000 CR3: 00474000 CR4: 000006d0
[<c0140b73>] rt_down_trylock+0x33/0x480 (44) [<c01218f2>] vprintk+0x162/0x240 (8) [<c02092cb>] vscnprintf+0x2b/0x40 (8) [<c01218f2>] vprintk+0x162/0x240 (24) [<c0141a67>] add_preempt_count_ti+0x27/0x100 (64) [<c0141b5a>] add_preempt_count+0x1a/0x20 (28) [<c0121787>] printk+0x17/0x20 (20) [<c01220c7>] __WARN_ON+0x67/0x90 (12) [<c032ec5a>] __down_mutex+0x2fa/0x5d0 (48) [<c0331152>] _raw_spin_unlock+0x12/0x30 (100) [<c011bd5e>] __wake_up+0x1e/0x80 (8) [<c0330813>] _spin_lock_irqsave+0x23/0x60 (12) [<c011bd5e>] __wake_up+0x1e/0x80 (8) [<c0141a67>] add_preempt_count_ti+0x27/0x100 (4) [<c011bd5e>] __wake_up+0x1e/0x80 (12) [<c0141b5a>] add_preempt_count+0x1a/0x20 (16) [<c012ba65>] run_timer_softirq+0x2b5/0x470 (32) [<c0127680>] ksoftirqd+0xf0/0x170 (56) [<c0127590>] ksoftirqd+0x0/0x170 (32) [<c013979a>] kthread+0xba/0xc0 (4) [<c01396e0>] kthread+0x0/0xc0 (28) [<c0101385>] kernel_thread_helper+0x5/0x10 (16) ---------------------------
| preempt count: 00000003 ]
| 3-level deep critical section nesting:
----------------------------------------
.. [<c0141b5a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
.. [<c0141b5a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
.. [<c0141b5a>] .... add_preempt_count+0x1a/0x20
.....[<00000000>] .. ( <= stext+0x3feffd68/0x8)
------------------------------
| showing all locks held by: | (softirq-timer/0/4 [cf697840, 98]):
------------------------------
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Here's a patch to move the pi_lock out of the "fast path". Thus, only threads that need to do PI will need to take it.
Comments?
Please look for any race conditions or side effects that I might have missed.
Thanks,
-- Steve
(Ingo and Thomas, this is what I already sent you)
kernel/fork.c +1 -0
@@ -1011,6 +1011,7 @@plist_init (&p->pi_waiters,MAX_PRIO );preempt_enable (); p->blocked_on =NULL ;/* not blocked yet */ +spin_lock_init (&p->rt_lock); p->tgid = p->pid;if (clone_flags &CLONE_THREAD )
kernel/rt.c +17 -6
@@ -759,6 +759,7 @@* If the task is blocked on some other task then boost that * other task (or tasks) too: */ +__raw_spin_lock (&p->rt_lock);for (;;) {struct rt_mutex_waiter *w = p->blocked_on;#ifdef CONFIG_RT_DEADLOCK_DETECT
@@ -777,7 +778,6 @@TRACE_BUG_ON_LOCKED (!lock);TRACE_BUG_ON_LOCKED (!lock_owner (lock));if (rt_task (p) &&plist_empty (&w->pi_list)) { -TRACE_BUG_ON_LOCKED (was_rt);plist_init (&w->pi_list, prio);plist_add (&w->pi_list, &lock_owner (lock)->task->pi_waiters);
@@ -803,8 +803,10 @@ pi_walk++; +__raw_spin_unlock (&p->rt_lock); p =lock_owner (lock)->task;TRACE_BUG_ON_LOCKED (!p); +__raw_spin_lock (&p->rt_lock);/* * If the dependee is already higher-prio then * no need to boost it, and all further tasks down
@@ -813,6 +815,7 @@if (p->prio <= prio)break ; } +__raw_spin_unlock (&p->rt_lock); }/*
@@ -869,7 +872,7 @@/* mark the current thread as blocked on the lock */ waiter->eip = eip;#endif -__raw_spin_lock (&pi_lock); +__raw_spin_lock (&task->rt_lock); task->blocked_on = waiter; waiter->lock = lock; waiter->ti = ti;
@@ -881,15 +884,23 @@if (!rt_task (task)) {plist_add (&waiter->list, &lock->wait_list);set_lock_owner_pending (lock); -__raw_spin_unlock (&pi_lock); +__raw_spin_unlock (&task->rt_lock);return ; }#endif -plist_add (&waiter->pi_list, &lock_owner (lock)->task->pi_waiters); +__raw_spin_unlock (&task->rt_lock); +__raw_spin_lock (&pi_lock);/* -* Add RT tasks to the head: +* We could have been added to the pi list from another task +* doing a pi_setprio. */ -plist_add (&waiter->list, &lock->wait_list); +if (likely (plist_empty (&waiter->pi_list))) { +plist_add (&waiter->pi_list, &lock_owner (lock)->task->pi_waiters); +/* +* Add RT tasks to the head: +*/ +plist_add (&waiter->list, &lock->wait_list); + }set_lock_owner_pending (lock);/* * If the waiter has higher priority than the owner
include/linux/init_task.h +1 -0
@@ -112,6 +112,7 @@ .proc_lock = SPIN_LOCK_UNLOCKED(tsk.proc_lock), \ .delayed_put = LIST_HEAD_INIT(tsk.delayed_put), \ .pi_waiters = PLIST_INIT(tsk.pi_waiters, MAX_PRIO), \ + .rt_lock = RAW_SPIN_LOCK_UNLOCKED, \ .journal_info = NULL, \ .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ .fs_excl = ATOMIC_INIT(0), \
include/linux/sched.h +1 -0
@@ -950,6 +950,7 @@/* RT deadlock detection and priority inheritance handling */ struct rt_mutex_waiter *blocked_on;struct rt_mutex *pending_owner; +raw_spinlock_t rt_lock;unsigned long rt_flags;
Steven Rostedt
reviewer[RFC] RT-patch update to remove the global pi_lock
Quoted 1 line · Ingo Molnar
any ideas how to get rid of
pi_lockaltogether?
I've toyed with the idea of adding another raw_spin_lock to the mutex. A
lock specific pi_lock. Instead of grabbing a global pi_lock, grab thepi_lock of a lock. To modify any lock w.r.t PI, you must first grab all the lock's pi_locks being referenced.
The idea stems from the fact that the kernel must order its taking of locks to prevent deadlocks. This way the order of locks that are taken are also always in order.
So if you have the following case:
P1 blocked_on L1 owned_by P2 blocked_on L2 owned_by P3 ...
The L1, L2, L3 ... must always be in the same order, otherwise the kernel itself can have a deadlock.
OK, let me prove this (for myself as well ;-)
Lets go by contradiction.
If we assume that the locks _can_ be in different orders and that no deadlock would result.
So we could have:
P1 blocked_on L1 owned_by P2 ... blocked on Ln owned_by Pn+1
According to our assumtion, there can exist another list here where
Lx owned_by Px+1 ... blocked_on Ly owned by Py+1
where y < x <= n and 1 <= y < x
This means that there exists a process that owns Lx and is blocked on a lock Ly, and also this means that there's some process that owns Ly is blocked on Lx. This is a deadlock!
So knowing that this list of locks will always be in the same order, than there must be someway to capitalize on that and take just the locks of the locks used instead of a global one.
I haven't fully looked into this idea, but there might be something to it. I'm sure it will be complex, and perhaps slow things down on a 2x system. But it should be scalable, since you are only taking locks that are being used, and not a global one.
What do you guys think?
-- Steve
Re: [RFC] RT-patch update to remove the global pi_lock
Quoted 8 lines · Steven Rostedt
Quoted 1 line · Ingo Molnar
any ideas how to get rid of
pi_lockaltogether?I've toyed with the idea of adding another
raw_spin_lockto the mutex. A
lock specificpi_lock. Instead of grabbing a globalpi_lock, grab thepi_lockof a lock. To modify any lock w.r.t PI, you must first grab all the lock'spi_locksbeing referenced.
Are you saying that you want to convert the current system to lock all the pi_locks for all the locks in the sequence?
It seems like you could make it a per task lock, then only lock the task's pi_lock for pi operations.
Quoted 6 lines
The idea stems from the fact that the kernel must order its taking of locks to prevent deadlocks. This way the order of locks that are taken are also always in order.
So if you have the following case:
Quoted 8 lines
P1
blocked_onL1owned_byP2blocked_onL2owned_byP3 ...The L1, L2, L3 ... must always be in the same order, otherwise the kernel itself can have a deadlock.
OK, let me prove this (for myself as well ;-)
Lets go by contradiction.
Proof seems straight forward enough.
One downside would be an increase in mutex structure size though.
Daniel
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 10 lines · Daniel Walker
Quoted 8 lines · Steven Rostedt
Quoted 1 line · Ingo Molnar
any ideas how to get rid of
pi_lockaltogether?I've toyed with the idea of adding another
raw_spin_lockto the mutex. A
lock specificpi_lock. Instead of grabbing a globalpi_lock, grab thepi_lockof a lock. To modify any lock w.r.t PI, you must first grab all the lock'spi_locksbeing referenced.
Quoted 5 lines
Are you saying that you want to convert the current system to lock all the
pi_locksfor all the locks in the sequence?It seems like you could make it a per task lock, then only lock the task's
pi_lockfor pi operations.
How would you add to a lock with just holding a lock for a task? When you are grabbing a lock, you must first grab a raw lock associated to the lock being grabbed. Although, I'm starting to look into this idea, and I'm going to first see if the current wait_lock could suffice. I may also need to add an additional lock to the task to follow the lock -> task -> lock route. The tasks order should be the same as the locks when the are bound (holding) a lock. Since the task won't be able to release it without holding the raw lock of the lock it is releasing. (boy this gets confusing to talk about, since you need to talk about locks and the locking method within the lock!)
Quoted 12 lines
Quoted 12 lines
The idea stems from the fact that the kernel must order its taking of locks to prevent deadlocks. This way the order of locks that are taken are also always in order.
So if you have the following case:
P1
blocked_onL1owned_byP2blocked_onL2owned_byP3 ...The L1, L2, L3 ... must always be in the same order, otherwise the kernel itself can have a deadlock.
Quoted 7 lines
Quoted 3 lines
OK, let me prove this (for myself as well ;-)
Lets go by contradiction.
Proof seems straight forward enough.
One downside would be an increase in mutex structure size though.
If I do need to add an additional lock to the mutex, I would abstract it all, so that the old global pi_lock can be used if configured. This way, a UP or a low memory 2x SMP machine can still use the old method, but when it needs to grow, switch over to the new non-global pi_locking method. But, maybe I can still get away with just using the wait_lock and not add any more overhead to the size of the mutex.
I've just started to expiremnent with this idea, so I really don't know yet how this will work.
-- Steve
Re: [RFC] RT-patch update to remove the global pi_lock
Quoted 11 lines · Steven Rostedt
How would you add to a lock with just holding a lock for a task? When you are grabbing a lock, you must first grab a raw lock associated to the lock being grabbed. Although, I'm starting to look into this idea, and I'm going to first see if the current
wait_lockcould suffice. I may also need to add an additional lock to the task to follow the lock -> task -> lock route. The tasks order should be the same as the locks when the are bound (holding) a lock. Since the task won't be able to release it without holding the raw lock of the lock it is releasing. (boy this gets confusing to talk about, since you need to talk about locks and the locking method within the lock!)
You might need to explain that one more time . I'm sure it needs more though, but the pi_lock just protects another cpu from enter pi_setprio() . What we really want is to protect only the specific structures modified inside pi_setprio() . Or that's my understanding . Are you thinking of something else?
I think you would at least need to lock the wait_lock for each lock that is looped over inside pi_setprio() . Because you access the wait_list inside the loop .
There is also a pi_waiters list that is per task. You would need to make a lock for that, I think . Or protect it somehow .
Daniel
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 14 lines · Daniel Walker
Quoted 11 lines · Steven Rostedt
How would you add to a lock with just holding a lock for a task? When you are grabbing a lock, you must first grab a raw lock associated to the lock being grabbed. Although, I'm starting to look into this idea, and I'm going to first see if the current
wait_lockcould suffice. I may also need to add an additional lock to the task to follow the lock -> task -> lock route. The tasks order should be the same as the locks when the are bound (holding) a lock. Since the task won't be able to release it without holding the raw lock of the lock it is releasing. (boy this gets confusing to talk about, since you need to talk about locks and the locking method within the lock!)
Quoted 5 lines
You might need to explain that one more time . I'm sure it needs more though, but the
pi_lockjust protects another cpu from enterpi_setprio(). What we really want is to protect only the specific structures modified insidepi_setprio(). Or that's my understanding . Are you thinking of something else?
Nope, nothing else. That's pretty much it.
Quoted 4 lines
I think you would at least need to lock the
wait_lockfor each lock that is looped over insidepi_setprio(). Because you access thewait_listinside the loop .
That's what I was thinking. The wait_list locks could be the lock that is used to replace the pi_lock.
Quoted 4 lines
There is also a
pi_waiterslist that is per task. You would need to make a lock for that, I think . Or protect it somehow .
Yeah this is sort of what I was thinking of when I follow the lock->task->lock route.
Here's a visual:
X=> : blocked on
-> : owned by
P1 X=> L1 -+
^ |
P2 X===+ |
|
+->P4 X=> L3 -> P5
|P3 X=> L2 -+
So P4 owns locks L1 and L2 with tasks P1 and P2 blocked on L1 and P3 blocked on L2. And P4 is blocked on lock L3 owned by P5.
This has the following lists:
L1->wait_list => P1 => P2L2->wait_list => P3L3->wait_list => P4
P4->pi_waiters => P1 => P2 => P3P5->pi_waiters => P4
OK, we add another lock to the task that protects the pi_waiters. Always grab this lock _after_ grabbing all the necessary wait_locks.
So when P5 needs to update it's pi_waiters, it first grabs the L3->wait_lock, and then the P5->pi_lock.
So when blocking on a lock, you would grab the lock->wait_locks of all the locks that you are blocked on. When P2 blocked on a L1 it would have grabbed (in this order) L1->wait_lock, L3->wait_lock, P4->pi_lock.
Actually, for simplicity, since the pi_lock is associated to the task, we may be able to safely grab the task pi_lock before a wait_lock. Say if we have P5 blocked on L4 owned by P6. When updating the P4->pi_waiters (say when P2 blocked on L1), we could do this:
Grab L1->wait_lock, L3->wait_lock, P4->pi_lock, L4->wait_lock. Since we should never be grabbing the L4->wait_lock (or higher) when grabbing the P4->pi_lock.
God, I think a thesis can be made out of this. Well, let me start coding, since I'm one of those that write code better than I design. I'm a Spiral type of guy, not a Waterfall one ;-)
Code crap, write about it, recode it as gold!
-- Steve
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 6 lines · Steven Rostedt
God, I think a thesis can be made out of this. Well, let me start coding, since I'm one of those that write code better than I design. I'm a Spiral type of guy, not a Waterfall one ;-)
Code crap, write about it, recode it as gold!
I'm really made a mess of the code now and having a lot of fun ;-)
I think this can be pulled off, but I'm seeing that the easiest way is to do the grabbing of locks with lock -> owner -> lock -> owner ...
So if you have the chain.
P1 X=> L1 -> P2 X=> L2 X=> P3
You would always need to grab the locks in this order:
P1->pi_lock, L1->wait_lock, P2->pi_lock, L2->wait_lock, P3->pi_lock
So on a __down, if you don't get the lock, this makes for easy transition in the pi_setprio. You have the current->pi_lock, and then grab the lock->wait_lock that current is blocked on. In the loop, you need to first grab p->wait_lock, to prevent the race with p->blocked_on and setting it up. Having to get the lock->wait_lock first would mean there's a race to get blocked_on, and knowing what it was blocked on.
Now the PITA is with the __up. Here we have the lock, and we need to change the owner. So we need to unlock the lock (as well as the current owner pi_lock), before giving it to the new owner. So the race is, if you have the lock->wait_lock, find the new owner, then unlock the lock->wait_lock, lock new_owner->pi_lock and then grab the lock->wait_lock again, in this time a higher priority process could have come and blocked on this lock. So the new_owner should really be the high priority process that just came in. This skips by the pending owner algorithm.
There's more than one solution to solve this. The easy, inefficient way, is to have a test to see if this occurred and try again. But I was thinking of the following.
When grabbing a lock, you check if there are waiters (although there may not be an owner or even a pending owner), if you are the highest priority process, grab the lock and go, otherwise, just add yourself to the waiting list (and perhaps the pi_list). So when the original owner giving up the lock finally runs, it won't need to do anymore work. If the lock is owned, then it just unlocks everything, and then it's someone elses problem.
The situation could even occur that the higher priority process that came in and took the lock gave it back to the "new" guy, and the lock isn't owned at all. So a simple check of, is the "new" guy still blocked on the lock and the lock is not owned should be good enough to finish the change owner job.
It's all complex, but what did you expect when removing a global lock that makes life simple :-)
-- Steve
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [RFC] RT-patch update to remove the global pi_lock
Quoted 6 lines · Steven Rostedt
Also Thomas,
I'm still triggering that "huh?" statement in
pi_setprio, and it is always with the softirq-hrtimer thread. It likes to change its priorities, but there's a time whenp->normal_prio!=normal_prio(p). And this is what's giving me a headache.
Yes, the normal_prio() check detects this. I have a look into this.
tglx
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
In reply to a message not in the archiveWell, after turning off hrtimers, I keep getting one bug. A possible soft lockup with the ext3 code. But this didn't seem to be caused by the changes I made. So just to be sure, I ran my test on the vanilla 2.6.13-rc6-rt11 and it gave the same bug too. So, it looks like my changes are now at par with what is out there with the rt11 release. They both give the same bug! ;-)
Attached is the test I ran. I did a
while : ; do ./test3a_rt ; done
Where test3a_rt is a C program that does adding, deleting and reading of files, by different tasks that are each at a different priority. Here's the soft lockup I'm getting:
NFSD: starting 90-second grace period
BUG: test3a_rt:6138, possible softlockup detected on CPU#0! [<c01043f3>] dump_stack+0x23/0x30 (20) [<c014cf81>] softlockup_detected+0x41/0x60 (24) [<c014d090>] softlockup_tick+0xf0/0x100 (24) [<c012bbbb>] update_process_times+0x5b/0x80 (28) [<c011415e>] smp_apic_timer_interrupt+0xee/0x100 (36) [<c0103ec1>] apic_timer_interrupt+0x21/0x28 (124) [<c01c1641>] ext3_add_entry+0xd1/0x210 (60) [<c01c1e0d>] ext3_add_nondir+0x2d/0x80 (32) [<c01c1f1b>] ext3_create+0xbb/0x110 (40) [<c0180721>] vfs_create+0xf1/0x170 (44) [<c018105b>] open_namei+0x61b/0x6e0 (72) [<c016eb5f>] filp_open+0x3f/0x70 (92) [<c016f033>] sys_open+0x53/0x100 (44) [<c01033da>] syscall_call+0x7/0xb (-8116) ---------------------------
| preempt count: 00010000 ]
| 0-level deep critical section nesting:
----------------------------------------
------------------------------
| showing all locks held by: | (test3a_rt/6138 [f7ef61a0, 89]):
------------------------------
#001: [f2eaddac] {(struct semaphore *)(&inode->i_sem)}
... acquired at: open_namei+0xf9/0x6e0
NMI show regs on CPU#0:
Pid: 6138, comm: test3a_rt
EIP: 0060:[<c0114929>] CPU: 0
EIP is at nmi_show_all_regs+0x89/0xd0
EFLAGS: 00000046 Not tainted (2.6.13-rc6-rt11-real)
EAX: 00000000 EBX: 000017fa ECX: 00000060 EDX: 00000080
ESI: 00000000 EDI: 0006c692 EBP: f07dbd48 DS: 007b ES: 007b
CR0: 8005003b CR2: b7e37ae0 CR3: 30850000 CR4: 000006d0
[<c01013b4>] show_regs+0x164/0x16c (36) [<c0114a98>] nmi_watchdog_tick+0x128/0x2b0 (56) [<c01054bf>] default_do_nmi+0x7f/0x190 (52) [<c0105630>] do_nmi+0x50/0x60 (24) [<c010405a>] nmi_stack_correct+0x1d/0x22 (72) [<c014cf86>] softlockup_detected+0x46/0x60 (24) [<c014d090>] softlockup_tick+0xf0/0x100 (24) [<c012bbbb>] update_process_times+0x5b/0x80 (28) [<c011415e>] smp_apic_timer_interrupt+0xee/0x100 (36) [<c0103ec1>] apic_timer_interrupt+0x21/0x28 (124) [<c01c1641>] ext3_add_entry+0xd1/0x210 (60) [<c01c1e0d>] ext3_add_nondir+0x2d/0x80 (32) [<c01c1f1b>] ext3_create+0xbb/0x110 (40) [<c0180721>] vfs_create+0xf1/0x170 (44) [<c018105b>] open_namei+0x61b/0x6e0 (72) [<c016eb5f>] filp_open+0x3f/0x70 (92) [<c016f033>] sys_open+0x53/0x100 (44) [<c01033da>] syscall_call+0x7/0xb (-8116) ---------------------------
| preempt count: 00010001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c0143f5c>] .... add_preempt_count+0x1c/0x20
.....[<c0114a7d>] .. ( <= nmi_watchdog_tick+0x10d/0x2b0)
------------------------------
| showing all locks held by: | (test3a_rt/6138 [f7ef61a0, 89]):
------------------------------
#001: [f2eaddac] {(struct semaphore *)(&inode->i_sem)}
... acquired at: open_namei+0xf9/0x6e0
NMI show regs on CPU#1:
Pid: 6137, comm: test3a_rt
EIP: 0060:[<c01cd9c3>] CPU: 1
EIP is at do_get_write_access+0x83/0x560
EFLAGS: 00000206 Not tainted (2.6.13-rc6-rt11-real)
EAX: 000e201d EBX: f7ffe000 ECX: f71e49bc EDX: f71e49bc
ESI: f7f6b3bc EDI: f71e49bc EBP: f1409e94 DS: 007b ES: 007b
CR0: 8005003b CR2: b7fdb000 CR3: 326fb000 CR4: 000006d0
[<c01013b4>] show_regs+0x164/0x16c (36) [<c0114a98>] nmi_watchdog_tick+0x128/0x2b0 (56) [<c01054bf>] default_do_nmi+0x7f/0x190 (52) [<c0105630>] do_nmi+0x50/0x60 (24) [<c010405a>] nmi_stack_correct+0x1d/0x22 (132) [<c01cded5>] journal_get_write_access+0x35/0x50 (28) [<c01c2b02>] ext3_orphan_del+0x1a2/0x230 (80) [<c01bae03>] ext3_delete_inode+0x73/0x110 (24) [<c018cad9>] generic_delete_inode+0x99/0x160 (28) [<c018cd1d>] generic_drop_inode+0x1d/0x30 (12) [<c018cda0>] iput+0x70/0x80 (20) [<c0181ee0>] sys_unlink+0x110/0x140 (96) [<c01033da>] syscall_call+0x7/0xb (-8116) ---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c0143f5c>] .... add_preempt_count+0x1c/0x20
.....[<c0114a7d>] .. ( <= nmi_watchdog_tick+0x10d/0x2b0)
------------------------------
| showing all locks held by: | (test3a_rt/6137 [f5d437f0, 90]):
------------------------------
#001: [f709cc88] {(struct semaphore *)(&s->s_lock)}
... acquired at: ext3_orphan_del+0x3a/0x230
Well, looking at this further, it seems to release somehow, and continue, since I've got multiple "possible soft lockups", by different threads. But It doesn't seem to go any further. Somethings spinning quite a bit, and something else must be starved. I'll look further into this.
So, Ingo, what do you think of the changes so far? Do you feel that it is stable enough to send you an actual real patch. That way we can work together in cleaning it up and get all the other kinks out.
Also, let me know if you are getting this. The last couple of messages I sent, never reached me on the LKML, and I sent the last one 4 hours ago. :-(
Thomas, I did get your reply.
-- Steve
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
#include <signal.h>
#include <ctype.h>
#include <sched.h>
#define __USE_GNU
#include <sys/ipc.h>
#ifdef SDR_TOOLS
#include <dump_log.h>
#include <linux/logdev.h>
#include <dump_log.h>
#include <tracer_xml.h>
#include "dump_trace.h"
int logfd = -1;
#else
#define logdev_print(x...) do {} while(0)
#define logdev_switch_set(x) (0)
#endif
#include <list.h>
static char *testdir = "/tmp/test3a";
static int reader (int i);
static int deleter (int i);
static int creator (int i);
typedef int (*callfunc_t)(int);
#define NR_PROCS 5pid_t pids[NR_PROCS];callfunc_t dofunc[NR_PROCS] = {
deleter,
creator,
reader,
reader,
reader
};
int priorities[NR_PROCS] = {
9,
10,
11,
12,
13,
};key_t semkey;key_t shmkey;
int semid = -1;
int shmid = -1;
int safe = 0;
int *flags;
static void remove_testdir(void);
void cleanup(void)
{
int i;
for (i=0; i < NR_PROCS; i++) {
if (pids[i])
kill(pids[i],SIGKILL);
}
if (semid >= 0)
semctl(semid, 0, IPC_RMID);
if (shmid >= 0)
shmctl(shmid, IPC_RMID, NULL);
remove_testdir();#ifdef SDR_TOOLS if (logfd >= 0) close_logdev(logfd);
#endif
}
void catchall(int sig)
{
cleanup();
psignal(sig,"Caught: ");
exit(-1);
}static int compare_timeval(const struct timeval *a, const struct timeval *b)
{
return (a->tv_sec > b->tv_sec) ? 1 :
(a->tv_sec < b->tv_sec) ? -1:
(a->tv_usec > b->tv_usec) ? 1:
(a->tv_usec < b->tv_usec) ? -1:
0;
}static void add_timeval(const struct timeval *a, const struct timeval *b, struct timeval *c) {
c->tv_usec = a->tv_usec + b->tv_usec;
c->tv_sec = a->tv_sec + b->tv_sec;
while (c->tv_usec > 1000000) {
c->tv_usec -= 1000000;
c->tv_sec++;
}}
static void sub_timeval(const struct timeval *a, const struct timeval *b, struct timeval *c) {
c->tv_usec = a->tv_usec - b->tv_usec;
c->tv_sec = a->tv_sec - b->tv_sec;
while (c->tv_usec < 0) {
c->tv_usec += 1000000;
c->tv_sec--;
}}
struct dir_item {
struct list_head list;
char *dir;
};LIST_HEAD_DECLARE(dirs);
static void read_dirs(char *dirname)
{
DIR *dir;
struct dirent *dent;
struct stat st;
struct dir_item *item;
int len = strlen(dirname);
char *name;
struct sembuf sops;
int semid;
memset(&sops,0,sizeof(sops));
if ((semid = semget(semkey,1,0)) < 0) {
perror("semget");
return;
}
if ((dir = opendir(dirname)) == NULL)
return;
while ((dent = readdir(dir))) {
if (strcmp(dent->d_name,".") == 0 ||
strcmp(dent->d_name,"..") == 0)
continue;
name = malloc(strlen(dent->d_name)+len+2);
if (!name) {
goto out;
}
strcpy(name,dirname);
name[len] = '/';
strcpy(name+len+1,dent->d_name);
if (stat(name,&st) < 0) {
perror(name);
free(name);
continue;
}
if ((S_ISDIR(st.st_mode))) {
item = malloc(sizeof(*item));
if (!item) {
free(name);
goto out;
}
item->dir = name;
list_add_tail(&item->list,&dirs);
} else {
free(name);
}
}
out:
closedir(dir);
}static int reader(int i)
{
struct sembuf sops;
int semid;
struct timeval starttv;
struct timeval endtv;
struct timeval tv;
struct timeval lasttv;
struct timeval deltatv;
struct timespec ts = {0,250000000UL};
time_t t;
char timebuf[30];
unsigned long long starttsc, nowtsc;
memset(&sops,0,sizeof(sops));
if ((semid = semget(semkey,1,0)) < 0) {
perror("semget");
return -1;
}
if (gettimeofday(&starttv,NULL) < 0) {
perror("gettimeofday");
return -1;
}
memset (&deltatv,0,sizeof(deltatv));
endtv.tv_sec = 10;
endtv.tv_usec = 0;
add_timeval(&starttv,&endtv,&endtv);
printf("reader %d grabbing waiting on sem\n",i);
printf("(id=%d) start time is %ld.%06ld\n",i,starttv.tv_sec,starttv.tv_usec);
if (semop(semid, &sops, 1) < 0) {
perror("semop");
return -1;
}
logdev_print(logfd,"reader %d past semaphore\n",i);
t = time(NULL);
ctime_r(&t,timebuf);
timebuf[strlen(timebuf)-1] = 0;
printf("reader %d starting loop (%s)\n",i,timebuf);
logdev_print(logfd,"reader %d (pid %d) starting loop (%s)\n",i,getpid(),timebuf);
lasttv = starttv;
asm ("rdtsc" : "=A"(starttsc));
chdir("/");
read_dirs("/tmp");
do {
struct list_head *p;
struct dir_item *item;
asm ("rdtsc" : "=A"(nowtsc));
if (safe && (nowtsc - starttsc > 8000000000ULL)) {
printf("now - start > 8000000000\n");
break;
}
if (list_empty(&dirs)) {
nanosleep(&ts,NULL);
read_dirs("/tmp");
if (list_empty(&dirs))
/* ?? */
break;
}
p = dirs.next;
list_del(p);
item = list_entry(p,struct dir_item, list);
printf("%d: reading dir %s\n",i,item->dir);
read_dirs(item->dir);
free(item->dir);
free(item);
if (gettimeofday(&tv,NULL) < 0) {
perror("gettimeofday (in loop)");
return -1;
}
sub_timeval(&tv,&lasttv,&lasttv);
if (compare_timeval(&deltatv,&lasttv) < 0)
deltatv = lasttv;
lasttv = tv;
} while(compare_timeval(&endtv,&tv) > 0);
t = time(NULL);
ctime_r(&t,timebuf);
timebuf[strlen(timebuf)-1] = 0;
logdev_print(logfd,"spinner %d (pid %d) done (%s)\n",i,getpid(),timebuf);
printf("spinner %d ended loop (%s) (%d.%06d secs delta)\n",
i,timebuf,(int)deltatv.tv_sec,(int)deltatv.tv_usec);
printf(" (id=%d) end time is %ld.%06ld\n",i,tv.tv_sec,tv.tv_usec);
printf(" (id=%d) end time should be %ld.%06ld\n",i,endtv.tv_sec,endtv.tv_usec);
/*
* When the readers are done, stop the others that don't
* have any other test to stop with. No locks needed, we
* all just set it to one.
*/
*flags = 1;
return 0;
}void delete_all(char *dirname)
{
DIR *dir;
struct dirent *dent;
int len = strlen(dirname);
char *name;
struct sembuf sops;
int semid;
memset(&sops,0,sizeof(sops));
if ((semid = semget(semkey,1,0)) < 0) {
perror("semget");
return;
}
if ((dir = opendir(dirname)) == NULL)
return;
while ((dent = readdir(dir))) {
if (strcmp(dent->d_name,".") == 0 ||
strcmp(dent->d_name,"..") == 0)
continue;
name = malloc(strlen(dent->d_name)+len+2);
if (!name) {
goto out;
}
strcpy(name,dirname);
name[len] = '/';
strcpy(name+len+1,dent->d_name);
unlink(name);
free(name);
}
out:
closedir(dir);
}static int deleter(int i)
{
struct sembuf sops;
int semid;
memset(&sops,0,sizeof(sops));
if ((semid = semget(semkey,1,0)) < 0) {
perror("semget");
return -1;
}
printf("deleter %d grabbing waiting on sem\n",i);
if (semop(semid, &sops, 1) < 0) {
perror("semop");
return -1;
}
logdev_print(logfd,"deleter %d past semaphore\n",i);
while (!*flags) {
delete_all(testdir);
}
return 0;
}static int creator(int i)
{
struct sembuf sops;
int semid;
int x;
char name[100];
memset(&sops,0,sizeof(sops));
if ((semid = semget(semkey,1,0)) < 0) {
perror("semget");
return -1;
}
mkdir(testdir,0777);
printf("creator %d grabbing waiting on sem\n",i);
if (semop(semid, &sops, 1) < 0) {
perror("semop");
return -1;
}
logdev_print(logfd,"creator %d past semaphore\n",i);
while (!*flags) {
int fd;
char *garbage = "garbage\n";
snprintf(name,100,"%s/dummy%d",testdir,x++);
if ((fd = open(name,O_CREAT|O_WRONLY,0777)) < 0) {
perror(name);
continue;
}
write(fd,garbage,strlen(garbage));
close(fd);
}
return 0;
}static void remove_testdir(void)
{
delete_all(testdir);
rmdir(testdir);
}void usage(char **argv)
{
char *arg = argv[0];
char *p = arg+strlen(arg);
while (p >= arg && *p != '/') p--;
p++;
printf("\nusage: %s [-sn]\n"
" -s : safe mode. Have the readers use the tsc to stop\n"
" -n : run without RT\n"
"\n",p);
exit(-1);
}int main (int argc, char **argv)
{
int ret=0;
int i;
int nr_procs=0;
int noprio = 0;
struct sembuf sops;
int c;
opterr = 0;
while ((c=getopt(argc,argv,"hsn")) >= 0) {
switch (c) {
case 's':
safe = 1;
break;
case 'n':
noprio = 1;
break;
case 'h':
default:
printf("\n");
if (c != ':' && tolower(optopt) != 'h' && optopt != '?')
printf("unknown option: %c\n",optopt);
usage(argv);
}
}
semkey = ftok(argv[0],123);
shmkey = ftok(argv[0],456);
if ((semid = semget(semkey,1,IPC_CREAT|IPC_EXCL|0600)) < 0) {
perror("semget");
exit (-1);
}
if ((shmid = shmget(shmkey,30,IPC_CREAT|IPC_EXCL|0600)) < 0) {
perror("shmget");
goto out;
}
if ((flags = shmat(shmid, NULL, 0)) == (void*)-1) {
perror("shmat");
goto out;
}
*flags = 0;
#ifdef SDR_TOOLS
if ((logfd = open_logdev(NULL,O_RDWR)) < 0) {
perror("open_logdev");
goto out;
}
if (logdev_switch_set(1)) {
perror("logdev_switch_on");
}#endif
/* Grab the semaphore before anyone else can take it. */
memset(&sops,0,sizeof(sops));
// sops.sem_flg = SEM_UNDO;
sops.sem_op = 1;
if (semop(semid, &sops, 1) < 0) {
perror("semop");
ret = -1;
goto out;
}
for (i=0; i < NR_PROCS; i++) {
struct sched_param p;
if ((pids[i] = fork()) < 0) {
perror("fork");
ret = -1;
goto out;
} else if (pids[i] == 0) {
/* child */
ret = dofunc[i](i);
exit(ret);
}
nr_procs++;
if (!noprio && priorities[i]) {
p.sched_priority = priorities[i];
if (sched_setscheduler(pids[i],SCHED_FIFO,&p)) {
perror("sched_setscheduler");
goto out;
}
}
/* parent */
}
signal(SIGINT,catchall);
signal(SIGILL,catchall);
signal(SIGFPE,catchall);
signal(SIGSEGV,catchall);
signal(SIGBUS,catchall);
sleep(1);
printf("parent zeroing semaphore\n");
sops.sem_op = -1;
if (semop(semid,&sops,1) < 0) {
perror("semop");
ret = -1;
goto out;
}
while (nr_procs) {
int status;
pid_t pid;
if ((pid = wait(&status)) < 0) {
perror("wait");
break;
}
for (i=0; i < NR_PROCS; i++) {
if (pids[i] == pid) {
pids[i] = 0;
nr_procs--;
}
}
}
if (logdev_switch_set(0)) {
perror("logdev_switch_off");
}out:
cleanup(); exit(ret); }
#ifndef __USER_LIST_H
#define __USER_LIST_H
#include <sys/types.h>
#include <unistd.h>
#define DEBUG_LIST
#ifdef DEBUG_LIST
#include <sys/types.h>
#include <signal.h>
#ifndef LIST_BUG
#define LIST_BUG() do { printf(">>>>> list bug <<<< at %d\n",__LINE__); kill(getpid(),SIGSEGV); } while(0) #endif
#define __LIST_MAGIC 0xdeabbeef
#define __LIST_MAGIC_POISON 0xbeefdead
#define __LIST_MAGIC_COMMA , __LIST_MAGIC
#define __LIST_MAGIC_ASSIGN(x) (x).magic = __LIST_MAGIC;
#else
#define __LIST_MAGIC
#define __LIST_MAGIC_COMMA
#define __LIST_MAGIC_ASSIGN(x)
#endif
#define __LIST_POISON ((struct list_head *)-1)
struct list_head {
struct list_head *next;
struct list_head *prev;
#ifdef DEBUG_LIST
int magic;#endif
};
#define LIST_HEAD_INIT(x) { &x, &x __LIST_MAGIC_COMMA}
#define LIST_HEAD_DECLARE(x) struct list_head x = LIST_HEAD_INIT(x)
#define INIT_LIST_HEAD(x) do { (x).next = &x; (x).prev = &x; __LIST_MAGIC_ASSIGN(x)} while (0)
#define list_for_each(p,list) for(p=(list)->next; p != list; p=p->next) #define list_for_each_reverse(p,list) for(p=(list)->prev; p != list; p=p->prev) #define list_for_each_safe(p,n,list) for(p=(list)->next,n=p->next; p != list; p=n,n=p->next)
#ifdef DEBUG_LIST
static inline void list_check(struct list_head *x)
{
struct list_head *p;
list_for_each_reverse(p,x) { if (p->magic != __LIST_MAGIC) LIST_BUG(); }
list_for_each(p,x) { if (p->magic != __LIST_MAGIC) LIST_BUG(); }
}#endif
static inline void list_add(struct list_head *x,struct list_head *list) {
#ifdef DEBUG_LIST if (x->magic == __LIST_MAGIC_POISON && (x->next != __LIST_POISON || x->prev != __LIST_POISON)) LIST_BUG(); #endif x->next = list->next; x->prev = list; list->next->prev = x; list->next = x; #ifdef DEBUG_LIST x->magic = __LIST_MAGIC; list_check(list);
#endif
}
static inline void list_add_tail(struct list_head *x, struct list_head *list) {
#ifdef DEBUG_LIST if (x->magic == __LIST_MAGIC && (x->next != __LIST_POISON || x->prev != __LIST_POISON)) LIST_BUG(); #endif x->prev = list->prev; x->next = list; list->prev->next = x; list->prev = x; #ifdef DEBUG_LIST x->magic = __LIST_MAGIC; list_check(list);
#endif
}
#define list_entry(p,type,list) ((type*)(((char*)(p))-((char*)&(((type*)NULL)->list))))
#define list_empty(list) ((list)->next == (list))
#define list_head(list) ((list)->next)
static inline void list_del(struct list_head *x)
{
#ifdef DEBUG_LIST if (x->magic != __LIST_MAGIC) LIST_BUG(); list_check(x); x->magic = __LIST_MAGIC_POISON; #endif x->prev->next = x->next; x->next->prev = x->prev; x->next = __LIST_POISON; x->prev = __LIST_POISON; }
static inline struct list_head * pop_list_head(struct list_head *head)
{
struct list_head *p;
if (list_empty(head))
return NULL;
p = head->next;
list_del(p);
#ifdef DEBUG_LIST
list_check(head);
#endif
return p;
}#endif /* __USER_LIST_H */
Re: [RFC] RT-patch update to remove the global pi_lock
Quoted 7 lines · Steven Rostedt
Well, after turning off hrtimers, I keep getting one bug. A possible soft lockup with the ext3 code. But this didn't seem to be caused by the changes I made. So just to be sure, I ran my test on the vanilla 2.6.13-rc6-rt11 and it gave the same bug too. So, it looks like my changes are now at par with what is out there with the rt11 release. They both give the same bug! ;-)
Quoted 7 lines
Attached is the test I ran. I did a
while : ; do ./test3a_rt ; done
Where
test3a_rtis a C program that does adding, deleting and reading of files, by different tasks that are each at a different priority. Here's the soft lockup I'm getting:
I got a report of a possible softlockup with setiathome, the trace wasn't a little garbled though . I'm not sure the checking is working correctly . But if it is maybe these spot need some performance analysis . Didn't you changes catch anything that stays in the kernel for 10 seconds or more ?
Daniel
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 7 lines · Daniel Walker
I got a report of a possible softlockup with setiathome, the trace wasn't a little garbled though . I'm not sure the checking is working correctly . But if it is maybe these spot need some performance analysis . Didn't you changes catch anything that stays in the kernel for 10 seconds or more ?
I haven't looked that hard yet. If Ingo is ready for my changes, to replace the pi_lock, then I can spend time tracking this down.
Something is definity wrong, regardless whether or not the output is right. The tests constantly spit crap out, but when this happens, everything is silent. So something is definity amiss.
Try it out and see what I mean.
-- Steve
Re: [RFC] RT-patch update to remove the global pi_lock
In reply to Steven RostedtQuoted 3 lines · Steven Rostedt
So, Ingo, what do you think of the changes so far? Do you feel that it is stable enough to send you an actual real patch. That way we can work together in cleaning it up and get all the other kinks out.
yeah, please send me a patch against 2.6.13-rc7-rt1 if possible.
Ingo
Re: [RFC] RT-patch update to remove the global pi_lock
In reply to Steven RostedtQuoted 6 lines · Steven Rostedt
Well, after turning off hrtimers, I keep getting one bug. A possible soft lockup with the ext3 code. But this didn't seem to be caused by the changes I made. So just to be sure, I ran my test on the vanilla 2.6.13-rc6-rt11 and it gave the same bug too. So, it looks like my changes are now at par with what is out there with the rt11 release. They both give the same bug! ;-)
does the system truly lock up, or is this some transitional condition? In any case, i agree that this should be debugged independently of the pi_lock patch.
Ingo
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · Steven Rostedt
Well, after turning off hrtimers, I keep getting one bug. A possible soft lockup with the ext3 code. But this didn't seem to be caused by the changes I made. So just to be sure, I ran my test on the vanilla 2.6.13-rc6-rt11 and it gave the same bug too. So, it looks like my changes are now at par with what is out there with the rt11 release. They both give the same bug! ;-)
Quoted 3 lines
does the system truly lock up, or is this some transitional condition? In any case, i agree that this should be debugged independently of the
pi_lockpatch.
Hmm, I forgot that you took out the bit_spin_lock fixes. I think this may be caused by them. I haven't look further into it yet.
Oh, and I'm sending you this on your latest patch with my pi_lock patch applied. (no debugging turned on either and this is an SMP machine).
-- Steve
Re: [RFC] RT-patch update to remove the global pi_lock
Quoted 6 lines · Steven Rostedt
Quoted 3 lines
does the system truly lock up, or is this some transitional condition? In any case, i agree that this should be debugged independently of the
pi_lockpatch.Hmm, I forgot that you took out the
bit_spin_lockfixes. I think this may be caused by them. I haven't look further into it yet.
yeah, i took them out because they clashed with upstream changes. Note that i meanwhile also introduced a per-bh lock, which might make it easier to fix the deadlock:
--- linux.orig/fs/buffer.c
+++ linux/fs/buffer.c
@@ -537,8 +537,7 @@ static void end_buffer_async_read(struct
* decide that the page is now completely done.
*/
first = page_buffers(page);
- local_irq_save(flags);
- bit_spin_lock(BH_Uptodate_Lock, &first->b_state);
+ spin_lock_irqsave(&first->b_uptodate_lock, flags);
clear_buffer_async_read(bh);
unlock_buffer(bh);
tmp = bh;could jbd reuse this lock - or would it need another lock?
Ingo
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 26 lines · Ingo Molnar
Quoted 6 lines · Steven Rostedt
Quoted 3 lines
does the system truly lock up, or is this some transitional condition? In any case, i agree that this should be debugged independently of the
pi_lockpatch.Hmm, I forgot that you took out the
bit_spin_lockfixes. I think this may be caused by them. I haven't look further into it yet.yeah, i took them out because they clashed with upstream changes. Note that i meanwhile also introduced a per-bh lock, which might make it easier to fix the deadlock:
---
linux.orig/fs/buffer.c
+++linux/fs/buffer.c
@@ -537,8 +537,7 @@ static void end_buffer_async_read(struct* decide that the page is now completely done. */ first = page_buffers(page); - local_irq_save(flags); - bit_spin_lock(BH_Uptodate_Lock, &first->b_state); + spin_lock_irqsave(&first->b_uptodate_lock, flags); clear_buffer_async_read(bh); unlock_buffer(bh); tmp = bh;
Quoted 1 line
could jbd reuse this lock - or would it need another lock?
I think it can. I'm looking into right now, but first I'm updating my logdev to the latest release. I stripped it all out after submitting
that pi_lock patch and now I have to put it back in! I didn't save the
updates that I added earlier, so I'm reworking things now. The logging definitely helps me, since that was a major factor in getting that pi_lock patch done so quick.
-- Steve
Re: [RFC] RT-patch update to remove the global pi_lock
In reply to Steven RostedtQuoted 8 lines · Steven Rostedt
Quoted 1 line
One downside would be an increase in mutex structure size though.
If I do need to add an additional lock to the mutex, I would abstract it all, so that the old global
pi_lockcan be used if configured. This way, a UP or a low memory 2x SMP machine can still use the old method, but when it needs to grow, switch over to the new non-globalpi_lockingmethod. But, maybe I can still get away with just using thewait_lockand not add any more overhead to the size of the mutex.
We want to reduce configurability, not increase it. Having something like a selectable _core design property_ leads to madness and hard to maintain code very quickly.
also, we already have a per-lock spinlock. Why not use that?
Ingo
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
In reply to Steven RostedtOK, here it is. Against 2.6.13-rc7-rt1.
Please, test it well. Make sure to turn off any debugging, especially CONFIG_RT_DEADLOCK_DETECT. Since that would use a global trace_lock that defeats the purpose of removing the pi_lock.
The patch to remove the single pi_lock:
-- Steve
kernel/rt.c +184 -67
@@ -22,6 +22,9 @@* * Copyright (C) 2005, Kihon Technologies Inc., Steven Rostedt * +* (also by Steven Rostedt) +* - Converted single pi_lock to individual task locks. +* */ #include <linux/config.h> #include <linux/sched.h>
@@ -36,6 +39,26 @@#define CAPTURE_LOCK /* +* Lock order: +* +* To keep from having a single lock for PI, each task and lock +* has their own locking. The order is as follows: +* +* blocked task->pi_lock -> lock->wait_lock -> owner task->pi_lock. +* +* This is safe since a owner task should never block on a lock that +* is owned by a blocking task. Otherwise you would have a deadlock +* in the normal system. +* The same goes for the locks. A lock held by one task, should not be +* taken by task that holds a lock that is blocking this lock's owner. +* +* A task that is about to grab a lock is first considered to be a +* blocking task, even if the task successfully acquires the lock. +* This is because the taking of the locks happen before the +* task becomes the owner. +*/ + +/* * These flags are used for allowing of stealing of ownerships. */ #define RT_PENDOWNER 1/* pending owner on a lock */
@@ -83,14 +106,6 @@*/ //#define ALL_TASKS_PI -/* -* We need a global lock for priority inheritance handling. -* This is only for the slow path, but still, we might want -* to optimize it later to be more scalable. -*/ -static __cacheline_aligned_in_smp raw_spinlock_t pi_lock = -RAW_SPIN_LOCK_UNLOCKED ; -#ifdef CONFIG_RT_DEADLOCK_DETECT # define __EIP_DECL__ , unsigned long eip# define __EIP__ , eip
@@ -174,6 +189,8 @@if (trace_on) { \ trace_on =0 ; \console_verbose (); \ +if (spin_is_locked (¤t->pi_lock)) \ +__raw_spin_unlock (¤t->pi_lock); \spin_unlock (&trace_lock); \ } \ }while (0 )
@@ -228,7 +245,6 @@*/ void zap_rt_locks (void ) { -spin_lock_init (&pi_lock);#ifdef CONFIG_RT_DEADLOCK_DETECT spin_lock_init (&trace_lock);#endif
@@ -589,11 +605,11 @@printk ("exiting task is not even the owner??\n" ); goto restart; } -__raw_spin_lock (&pi_lock); +__raw_spin_lock (&task->pi_lock);plist_for_each (curr1, &task->pi_waiters) { w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);TRACE_OFF (); -__raw_spin_unlock (&pi_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);printk ("hm, PI interest held at exit time? Task:\n" );
@@ -601,7 +617,7 @@printk_waiter (w);return ; } -__raw_spin_unlock (&pi_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti); }
@@ -674,6 +690,7 @@struct rt_mutex_waiter *w;struct plist *curr1; +__raw_spin_lock (&old_owner->task->pi_lock);plist_for_each (curr1, &old_owner->task->pi_waiters) { w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);if (w->lock == lock) {
@@ -682,9 +699,10 @@printk_waiter (w);printk ("\n" );TRACE_WARN_ON (1 ); - return; + break; } } +__raw_spin_unlock (&old_owner->task->pi_lock); }#else
@@ -732,13 +750,24 @@int pi_walk, pi_null, pi_prio, pi_initialized; -static void pi_setprio (struct rt_mutex *lock,struct task_struct *p,int prio) +/* +* The lock->wait_lock and p->pi_lock must be held. +*/ +static void pi_setprio (struct rt_mutex *lock,struct task_struct *task,int prio) { +struct rt_mutex *l = lock; +struct task_struct *p = task; +/* +* We don't want to release the parameters locks. +*/ +if (unlikely (!p->pid)) { pi_null++;return ; } +TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED (!spin_is_locked (&p->pi_lock));#ifdef CONFIG_RT_DEADLOCK_DETECT pi_prio++;if (p->policy !=SCHED_NORMAL && prio >normal_prio (p)) {
@@ -759,7 +788,6 @@* If the task is blocked on some other task then boost that * other task (or tasks) too: */ -__raw_spin_lock (&p->pi_lock);for (;;) {struct rt_mutex_waiter *w = p->blocked_on;#ifdef CONFIG_RT_DEADLOCK_DETECT
@@ -774,16 +802,27 @@* it RT, then register the task in the PI list and * requeue it to the wait list: */ - lock = w->lock; + +/* +* Don't unlock the original lock->wait_lock +*/ +if (l != lock) +__raw_spin_unlock (&l->wait_lock); + l = w->lock;TRACE_BUG_ON_LOCKED (!lock); -TRACE_BUG_ON_LOCKED (!lock_owner (lock)); + +if (l != lock) +__raw_spin_lock (&l->wait_lock); + +TRACE_BUG_ON_LOCKED (!lock_owner (l));if (rt_task (p) &&plist_empty (&w->pi_list)) { +TRACE_BUG_ON_LOCKED (was_rt);plist_init (&w->pi_list, prio); -plist_add (&w->pi_list, &lock_owner (lock)->task->pi_waiters); +plist_add (&w->pi_list, &lock_owner (l)->task->pi_waiters); -plist_del (&w->list, &lock->wait_list); +plist_del (&w->list, &l->wait_list);plist_init (&w->list, prio); -plist_add (&w->list, &lock->wait_list); +plist_add (&w->list, &l->wait_list); }/* * If the task is blocked on a lock, and we just restored
@@ -795,16 +834,18 @@*/ if (!rt_task (p) && !plist_empty (&w->pi_list)) {TRACE_BUG_ON_LOCKED (!was_rt); -plist_del (&w->pi_list, &lock_owner (lock)->task->pi_waiters); -plist_del (&w->list, &lock->wait_list); +plist_del (&w->pi_list, &lock_owner (l)->task->pi_waiters); +plist_del (&w->list, &l->wait_list);plist_init (&w->list, prio); -plist_add (&w->list, &lock->wait_list); +plist_add (&w->list, &l->wait_list); } pi_walk++; + +if (p != task) +__raw_spin_unlock (&p->pi_lock); -__raw_spin_unlock (&p->pi_lock); - p =lock_owner (lock)->task; + p =lock_owner (l)->task;TRACE_BUG_ON_LOCKED (!p);__raw_spin_lock (&p->pi_lock);/*
@@ -815,7 +856,10 @@if (p->prio <= prio)break ; } -__raw_spin_unlock (&p->pi_lock); +if (l != lock) +__raw_spin_unlock (&l->wait_lock); +if (p != task) +__raw_spin_unlock (&p->pi_lock); }/*
@@ -831,7 +875,9 @@unsigned long flags;int oldprio; -spin_lock_irqsave (&pi_lock, flags); +spin_lock_irqsave (&p->pi_lock,flags); +if (p->blocked_on) +spin_lock (&p->blocked_on->lock->wait_lock); oldprio = p->normal_prio;if (oldprio == prio)
@@ -858,10 +904,17 @@else mutex_setprio (p, prio); out: -spin_unlock_irqrestore (&pi_lock, flags); +if (p->blocked_on) +spin_unlock (&p->blocked_on->lock->wait_lock); +spin_unlock_irqrestore (&p->pi_lock, flags); + } +/* +* This is called with both the waiter->task->pi_lock and +* lock->wait_lock held. +*/ static void task_blocks_on_lock (struct rt_mutex_waiter *waiter,struct thread_info *ti, struct rt_mutex *lock __EIP_DECL__)
@@ -872,7 +925,6 @@/* mark the current thread as blocked on the lock */ waiter->eip = eip;#endif -__raw_spin_lock (&task->pi_lock); task->blocked_on = waiter; waiter->lock = lock; waiter->ti = ti;
@@ -884,31 +936,24 @@if (!rt_task (task)) {plist_add (&waiter->list, &lock->wait_list);set_lock_owner_pending (lock); -__raw_spin_unlock (&task->pi_lock);return ; }#endif -__raw_spin_unlock (&task->pi_lock); -__raw_spin_lock (&pi_lock); +plist_add (&waiter->pi_list, &lock_owner (lock)->task->pi_waiters);/* -* We could have been added to the pi list from another task -* doing a pi_setprio. +* Add RT tasks to the head: */ -if (likely (plist_empty (&waiter->pi_list))) { -plist_add (&waiter->pi_list, &lock_owner (lock)->task->pi_waiters); -/* -* Add RT tasks to the head: -*/ -plist_add (&waiter->list, &lock->wait_list); - } +plist_add (&waiter->list, &lock->wait_list);set_lock_owner_pending (lock);/* * If the waiter has higher priority than the owner * then temporarily boost the owner: */ -if (task->prio <lock_owner (lock)->task->prio) +if (task->prio <lock_owner (lock)->task->prio) { +__raw_spin_lock (&lock_owner (lock)->task->pi_lock);pi_setprio (lock,lock_owner (lock)->task, task->prio); -__raw_spin_unlock (&pi_lock); +__raw_spin_unlock (&lock_owner (lock)->task->pi_lock); + } }/*
@@ -942,6 +987,10 @@ }EXPORT_SYMBOL (__init_rwsem); +/* +* This must be called with both the old_owner and new_owner pi_locks held. +* As well as the lock->wait_lock. +*/ static inline void set_new_owner (struct rt_mutex *lock,struct thread_info *old_owner, struct thread_info *new_owner __EIP_DECL__)
@@ -975,6 +1024,8 @@/* * handle the lock release when processes blocked on it that can now run * - the spinlock must be held by the caller +* +* The lock->wait_lock must be held, and the lock's owner->pi_lock must not. */ static struct thread_info * pick_new_owner(struct rt_mutex *lock, struct thread_info *old_owner,
@@ -990,14 +1041,34 @@*/ waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list); + try_again:trace_special_pid (waiter->ti->task->pid, waiter->ti->task->prio,0 );#ifdef ALL_TASKS_PI check_pi_list_present (lock, waiter, old_owner);#endif new_owner = waiter->ti; +/* +* The new owner is still blocked on this lock, so we +* must release the lock->wait_lock before grabing +* the new_owner lock. +*/ +__raw_spin_unlock (&lock->wait_lock); +__raw_spin_lock (&new_owner->task->pi_lock); +__raw_spin_lock (&lock->wait_lock); +/* +* In this split second of releasing the lock, a high priority +* process could have come along and blocked as well. +*/ + waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list); +if (unlikely (waiter->ti != new_owner)) { +__raw_spin_unlock (&new_owner->task->pi_lock); + goto try_again; + }plist_del_init (&waiter->list, &lock->wait_list); +__raw_spin_lock (&old_owner->task->pi_lock); +plist_del (&waiter->pi_list, &old_owner->task->pi_waiters);plist_init (&waiter->pi_list, waiter->ti->task->prio);
@@ -1008,6 +1079,9 @@ new_owner->task->blocked_on =NULL ;TRACE_WARN_ON (save_state != lock->save_state); +__raw_spin_unlock (&old_owner->task->pi_lock); +__raw_spin_unlock (&new_owner->task->pi_lock); +return new_owner; }
@@ -1060,9 +1134,7 @@* is still sleeping and hasn't woken up to get the lock. */ -/* Test the simple case first, is it already running? */ -if (!TASK_PENDING (owner)) -return 0 ; +TRACE_BUG_ON_LOCKED (!owner);/* The owner is pending on a lock, but is it this lock? */ if (owner->pending_owner != lock)
@@ -1134,17 +1206,35 @@return 0 ;trace_lock_irqsave (&trace_lock, flags, ti); +/* +* We are no longer blocked on the lock, so we are considered a +* owner. So we must grab the lock->wait_lock first. +*/ __raw_spin_lock (&lock->wait_lock); +__raw_spin_lock (&task->pi_lock);if (!(task->rt_flags &RT_PENDOWNER )) { -/* someone else stole it */ +/* +* Someone else stole it. +* We are grabbing a lock now, so we must release the +* locks again and retake them in the opposite order. +*/ +__raw_spin_unlock (&task->pi_lock); +__raw_spin_unlock (&lock->wait_lock); + +__raw_spin_lock (&task->pi_lock); +__raw_spin_lock (&lock->wait_lock); + old_owner =lock_owner (lock);TRACE_BUG_ON_LOCKED (old_owner == ti);if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* we got it back! */ -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __W_EIP__(waiter)); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __W_EIP__(waiter)); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __W_EIP__(waiter)); ret =0 ; }else {/* Add ourselves back to the list */
@@ -1159,6 +1249,7 @@ }__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);return ret;
@@ -1196,6 +1287,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);INIT_WAITER (&waiter);
@@ -1205,10 +1297,14 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__);__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);FREE_WAITER (&waiter);
@@ -1223,6 +1319,7 @@TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ());/* we don't need to touch the lock struct anymore */ __raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);might_sleep ();
@@ -1273,6 +1370,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);INIT_WAITER (&waiter);
@@ -1282,10 +1380,14 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__);__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);FREE_WAITER (&waiter);
@@ -1306,6 +1408,7 @@/* we don't need to touch the lock struct anymore */ __raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock (&trace_lock, ti);/*
@@ -1396,7 +1499,6 @@TRACE_WARN_ON_LOCKED (list_empty (&lock->held_list));list_del_init (&lock->held_list);#endif -__raw_spin_lock (&pi_lock);#ifdef ALL_TASKS_PI if (plist_empty (&lock->wait_list))
@@ -1409,7 +1511,6 @@ __up_mutex_waiter_nosavestate(lock __EIP__); }else lock->owner =NULL ; -__raw_spin_unlock (&pi_lock);__raw_spin_unlock (&lock->wait_lock);#ifdef CONFIG_DEBUG_PREEMPT if (current->lock_count <0 || current->lock_count >=MAX_LOCK_STACK ) {
@@ -1640,6 +1741,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);INIT_WAITER (&waiter);
@@ -1649,10 +1751,14 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__);__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);FREE_WAITER (&waiter);
@@ -1667,6 +1773,7 @@TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ());/* we don't need to touch the lock struct anymore */ __raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);might_sleep ();
@@ -1684,6 +1791,7 @@* didnt get the lock - else return success: */ trace_lock_irq (&trace_lock, ti); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);if (waiter.ti) {plist_del_init (&waiter.list, &lock->wait_list);
@@ -1692,17 +1800,16 @@* (No big problem if our PI effect lingers * a bit - owner will restore prio.) */ -__raw_spin_lock (&pi_lock);TRACE_WARN_ON_LOCKED (waiter.ti != ti);TRACE_WARN_ON_LOCKED (current->blocked_on != &waiter);plist_del (&waiter.pi_list, &task->pi_waiters);plist_init (&waiter.pi_list, task->prio); waiter.ti =NULL ; current->blocked_on =NULL ; -__raw_spin_unlock (&pi_lock); ret = -EINTR ; }__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irq (&trace_lock, ti);break ; }
@@ -1741,6 +1848,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock); old_owner =lock_owner (lock);
@@ -1749,13 +1857,18 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock); ret =1 ; } -__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);return ret;
@@ -1817,6 +1930,7 @@* to the previous priority (or to the next highest prio * waiter's priority): */ +__raw_spin_lock (&old_owner->pi_lock); prio = old_owner->normal_prio;if (unlikely (!plist_empty (&old_owner->pi_waiters))) { w = plist_first_entry(&old_owner->pi_waiters, struct rt_mutex_waiter, pi_list);
@@ -1825,6 +1939,7 @@ }if (unlikely (prio != old_owner->prio))pi_setprio (lock, old_owner, prio); +__raw_spin_unlock (&old_owner->pi_lock);#ifdef CAPTURE_LOCK if (lock != &kernel_sem.lock) { new_owner->rt_flags |=RT_PENDOWNER ;
@@ -1851,6 +1966,7 @@* to the previous priority (or to the next highest prio * waiter's priority): */ +__raw_spin_lock (&old_owner->pi_lock); prio = old_owner->normal_prio;if (unlikely (!plist_empty (&old_owner->pi_waiters))) { w = plist_first_entry(&old_owner->pi_waiters, struct rt_mutex_waiter, pi_list);
@@ -1859,6 +1975,7 @@ }if (unlikely (prio != old_owner->prio))pi_setprio (lock, old_owner, prio); +__raw_spin_unlock (&old_owner->pi_lock);#ifdef CAPTURE_LOCK if (lock != &kernel_sem.lock) { new_owner->rt_flags |=RT_PENDOWNER ;
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 16 lines · Steven Rostedt
OK, here it is. Against 2.6.13-rc7-rt1.
(quoted diff) +6
-1@@ -1134,17 +1206,35 @@ return 0; trace_lock_irqsave(&trace_lock, flags, ti); + /* + * We are no longer blocked on the lock, so we are considered a + * owner. So we must grab the lock->wait_lock first. + */ __raw_spin_lock(&lock->wait_lock); + __raw_spin_lock(&task->pi_lock); if (!(task->rt_flags & RT_PENDOWNER)) { - /* someone else stole it */ + /*
Review line 1227
Quoted 10 lines
(quoted diff) +10
-0+ * Someone else stole it. + * We are grabbing a lock now, so we must release the + * locks again and retake them in the opposite order. + */ + __raw_spin_unlock(&task->pi_lock); + __raw_spin_unlock(&lock->wait_lock); + + __raw_spin_lock(&task->pi_lock); + __raw_spin_lock(&lock->wait_lock); +
The above code is added to capture_lock, and I don't like it. I was thinking that since the locking order was to be:
P1 blocked_on L1 owned_by P2 blocked_on ... Ln-1 owned by Pn
So you always need to grab the process lock before grabbing the mutex lock that it is blocked on, and always grab the mutex lock before grabbing the process lock that owns it.
Here it is a little ambiguous. The process use to own the lock, but someone stole it. When grabbing a lock, I always grab the process lock first before grabbing the lock's lock, but this isn't necessary. So if you already have the two locks (mutex and process) as is the case above, you don't need to unlock them and regrab them (although this doesn't hurt, except for performance), because any race would have been with the grabbing of these two locks in the first place.
Now, here's why it's safe. The process that use to own the mutex and had it stolen now is out of the chain. The pi_lock and the wait_lock here are not in any order. So no one who is grabbing the process' pi_lock should have owned the wait_lock and vice versa.
So here's an updated patch without this lock switching:
-- Steve
kernel/rt.c +176 -67
@@ -22,6 +22,9 @@* * Copyright (C) 2005, Kihon Technologies Inc., Steven Rostedt * +* (also by Steven Rostedt) +* - Converted single pi_lock to individual task locks. +* */ #include <linux/config.h> #include <linux/sched.h>
@@ -36,6 +39,26 @@#define CAPTURE_LOCK /* +* Lock order: +* +* To keep from having a single lock for PI, each task and lock +* has their own locking. The order is as follows: +* +* blocked task->pi_lock -> lock->wait_lock -> owner task->pi_lock. +* +* This is safe since a owner task should never block on a lock that +* is owned by a blocking task. Otherwise you would have a deadlock +* in the normal system. +* The same goes for the locks. A lock held by one task, should not be +* taken by task that holds a lock that is blocking this lock's owner. +* +* A task that is about to grab a lock is first considered to be a +* blocking task, even if the task successfully acquires the lock. +* This is because the taking of the locks happen before the +* task becomes the owner. +*/ + +/* * These flags are used for allowing of stealing of ownerships. */ #define RT_PENDOWNER 1/* pending owner on a lock */
@@ -83,14 +106,6 @@*/ //#define ALL_TASKS_PI -/* -* We need a global lock for priority inheritance handling. -* This is only for the slow path, but still, we might want -* to optimize it later to be more scalable. -*/ -static __cacheline_aligned_in_smp raw_spinlock_t pi_lock = -RAW_SPIN_LOCK_UNLOCKED ; -#ifdef CONFIG_RT_DEADLOCK_DETECT # define __EIP_DECL__ , unsigned long eip# define __EIP__ , eip
@@ -174,6 +189,8 @@if (trace_on) { \ trace_on =0 ; \console_verbose (); \ +if (spin_is_locked (¤t->pi_lock)) \ +__raw_spin_unlock (¤t->pi_lock); \spin_unlock (&trace_lock); \ } \ }while (0 )
@@ -228,7 +245,6 @@*/ void zap_rt_locks (void ) { -spin_lock_init (&pi_lock);#ifdef CONFIG_RT_DEADLOCK_DETECT spin_lock_init (&trace_lock);#endif
@@ -589,11 +605,11 @@printk ("exiting task is not even the owner??\n" ); goto restart; } -__raw_spin_lock (&pi_lock); +__raw_spin_lock (&task->pi_lock);plist_for_each (curr1, &task->pi_waiters) { w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);TRACE_OFF (); -__raw_spin_unlock (&pi_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);printk ("hm, PI interest held at exit time? Task:\n" );
@@ -601,7 +617,7 @@printk_waiter (w);return ; } -__raw_spin_unlock (&pi_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti); }
@@ -674,6 +690,7 @@struct rt_mutex_waiter *w;struct plist *curr1; +__raw_spin_lock (&old_owner->task->pi_lock);plist_for_each (curr1, &old_owner->task->pi_waiters) { w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);if (w->lock == lock) {
@@ -682,9 +699,10 @@printk_waiter (w);printk ("\n" );TRACE_WARN_ON (1 ); - return; + break; } } +__raw_spin_unlock (&old_owner->task->pi_lock); }#else
@@ -732,13 +750,24 @@int pi_walk, pi_null, pi_prio, pi_initialized; -static void pi_setprio (struct rt_mutex *lock,struct task_struct *p,int prio) +/* +* The lock->wait_lock and p->pi_lock must be held. +*/ +static void pi_setprio (struct rt_mutex *lock,struct task_struct *task,int prio) { +struct rt_mutex *l = lock; +struct task_struct *p = task; +/* +* We don't want to release the parameters locks. +*/ +if (unlikely (!p->pid)) { pi_null++;return ; } +TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock)); +TRACE_BUG_ON_LOCKED (!spin_is_locked (&p->pi_lock));#ifdef CONFIG_RT_DEADLOCK_DETECT pi_prio++;if (p->policy !=SCHED_NORMAL && prio >normal_prio (p)) {
@@ -759,7 +788,6 @@* If the task is blocked on some other task then boost that * other task (or tasks) too: */ -__raw_spin_lock (&p->pi_lock);for (;;) {struct rt_mutex_waiter *w = p->blocked_on;#ifdef CONFIG_RT_DEADLOCK_DETECT
@@ -774,16 +802,27 @@* it RT, then register the task in the PI list and * requeue it to the wait list: */ - lock = w->lock; + +/* +* Don't unlock the original lock->wait_lock +*/ +if (l != lock) +__raw_spin_unlock (&l->wait_lock); + l = w->lock;TRACE_BUG_ON_LOCKED (!lock); -TRACE_BUG_ON_LOCKED (!lock_owner (lock)); + +if (l != lock) +__raw_spin_lock (&l->wait_lock); + +TRACE_BUG_ON_LOCKED (!lock_owner (l));if (rt_task (p) &&plist_empty (&w->pi_list)) { +TRACE_BUG_ON_LOCKED (was_rt);plist_init (&w->pi_list, prio); -plist_add (&w->pi_list, &lock_owner (lock)->task->pi_waiters); +plist_add (&w->pi_list, &lock_owner (l)->task->pi_waiters); -plist_del (&w->list, &lock->wait_list); +plist_del (&w->list, &l->wait_list);plist_init (&w->list, prio); -plist_add (&w->list, &lock->wait_list); +plist_add (&w->list, &l->wait_list); }/* * If the task is blocked on a lock, and we just restored
@@ -795,16 +834,18 @@*/ if (!rt_task (p) && !plist_empty (&w->pi_list)) {TRACE_BUG_ON_LOCKED (!was_rt); -plist_del (&w->pi_list, &lock_owner (lock)->task->pi_waiters); -plist_del (&w->list, &lock->wait_list); +plist_del (&w->pi_list, &lock_owner (l)->task->pi_waiters); +plist_del (&w->list, &l->wait_list);plist_init (&w->list, prio); -plist_add (&w->list, &lock->wait_list); +plist_add (&w->list, &l->wait_list); } pi_walk++; + +if (p != task) +__raw_spin_unlock (&p->pi_lock); -__raw_spin_unlock (&p->pi_lock); - p =lock_owner (lock)->task; + p =lock_owner (l)->task;TRACE_BUG_ON_LOCKED (!p);__raw_spin_lock (&p->pi_lock);/*
@@ -815,7 +856,10 @@if (p->prio <= prio)break ; } -__raw_spin_unlock (&p->pi_lock); +if (l != lock) +__raw_spin_unlock (&l->wait_lock); +if (p != task) +__raw_spin_unlock (&p->pi_lock); }/*
@@ -831,7 +875,9 @@unsigned long flags;int oldprio; -spin_lock_irqsave (&pi_lock, flags); +spin_lock_irqsave (&p->pi_lock,flags); +if (p->blocked_on) +spin_lock (&p->blocked_on->lock->wait_lock); oldprio = p->normal_prio;if (oldprio == prio)
@@ -858,10 +904,17 @@else mutex_setprio (p, prio); out: -spin_unlock_irqrestore (&pi_lock, flags); +if (p->blocked_on) +spin_unlock (&p->blocked_on->lock->wait_lock); +spin_unlock_irqrestore (&p->pi_lock, flags); + } +/* +* This is called with both the waiter->task->pi_lock and +* lock->wait_lock held. +*/ static void task_blocks_on_lock (struct rt_mutex_waiter *waiter,struct thread_info *ti, struct rt_mutex *lock __EIP_DECL__)
@@ -872,7 +925,6 @@/* mark the current thread as blocked on the lock */ waiter->eip = eip;#endif -__raw_spin_lock (&task->pi_lock); task->blocked_on = waiter; waiter->lock = lock; waiter->ti = ti;
@@ -884,31 +936,24 @@if (!rt_task (task)) {plist_add (&waiter->list, &lock->wait_list);set_lock_owner_pending (lock); -__raw_spin_unlock (&task->pi_lock);return ; }#endif -__raw_spin_unlock (&task->pi_lock); -__raw_spin_lock (&pi_lock); +plist_add (&waiter->pi_list, &lock_owner (lock)->task->pi_waiters);/* -* We could have been added to the pi list from another task -* doing a pi_setprio. +* Add RT tasks to the head: */ -if (likely (plist_empty (&waiter->pi_list))) { -plist_add (&waiter->pi_list, &lock_owner (lock)->task->pi_waiters); -/* -* Add RT tasks to the head: -*/ -plist_add (&waiter->list, &lock->wait_list); - } +plist_add (&waiter->list, &lock->wait_list);set_lock_owner_pending (lock);/* * If the waiter has higher priority than the owner * then temporarily boost the owner: */ -if (task->prio <lock_owner (lock)->task->prio) +if (task->prio <lock_owner (lock)->task->prio) { +__raw_spin_lock (&lock_owner (lock)->task->pi_lock);pi_setprio (lock,lock_owner (lock)->task, task->prio); -__raw_spin_unlock (&pi_lock); +__raw_spin_unlock (&lock_owner (lock)->task->pi_lock); + } }/*
@@ -942,6 +987,10 @@ }EXPORT_SYMBOL (__init_rwsem); +/* +* This must be called with both the old_owner and new_owner pi_locks held. +* As well as the lock->wait_lock. +*/ static inline void set_new_owner (struct rt_mutex *lock,struct thread_info *old_owner, struct thread_info *new_owner __EIP_DECL__)
@@ -975,6 +1024,8 @@/* * handle the lock release when processes blocked on it that can now run * - the spinlock must be held by the caller +* +* The lock->wait_lock must be held, and the lock's owner->pi_lock must not. */ static struct thread_info * pick_new_owner(struct rt_mutex *lock, struct thread_info *old_owner,
@@ -990,14 +1041,34 @@*/ waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list); + try_again:trace_special_pid (waiter->ti->task->pid, waiter->ti->task->prio,0 );#ifdef ALL_TASKS_PI check_pi_list_present (lock, waiter, old_owner);#endif new_owner = waiter->ti; +/* +* The new owner is still blocked on this lock, so we +* must release the lock->wait_lock before grabing +* the new_owner lock. +*/ +__raw_spin_unlock (&lock->wait_lock); +__raw_spin_lock (&new_owner->task->pi_lock); +__raw_spin_lock (&lock->wait_lock); +/* +* In this split second of releasing the lock, a high priority +* process could have come along and blocked as well. +*/ + waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list); +if (unlikely (waiter->ti != new_owner)) { +__raw_spin_unlock (&new_owner->task->pi_lock); + goto try_again; + }plist_del_init (&waiter->list, &lock->wait_list); +__raw_spin_lock (&old_owner->task->pi_lock); +plist_del (&waiter->pi_list, &old_owner->task->pi_waiters);plist_init (&waiter->pi_list, waiter->ti->task->prio);
@@ -1008,6 +1079,9 @@ new_owner->task->blocked_on =NULL ;TRACE_WARN_ON (save_state != lock->save_state); +__raw_spin_unlock (&old_owner->task->pi_lock); +__raw_spin_unlock (&new_owner->task->pi_lock); +return new_owner; }
@@ -1060,9 +1134,7 @@* is still sleeping and hasn't woken up to get the lock. */ -/* Test the simple case first, is it already running? */ -if (!TASK_PENDING (owner)) -return 0 ; +TRACE_BUG_ON_LOCKED (!owner);/* The owner is pending on a lock, but is it this lock? */ if (owner->pending_owner != lock)
@@ -1134,17 +1206,27 @@return 0 ;trace_lock_irqsave (&trace_lock, flags, ti); +/* +* We are no longer blocked on the lock, so we are considered a +* owner. So we must grab the lock->wait_lock first. +*/ __raw_spin_lock (&lock->wait_lock); +__raw_spin_lock (&task->pi_lock);if (!(task->rt_flags &RT_PENDOWNER )) { -/* someone else stole it */ +/* +* Someone else stole it. +*/ old_owner =lock_owner (lock);TRACE_BUG_ON_LOCKED (old_owner == ti);if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* we got it back! */ -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __W_EIP__(waiter)); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __W_EIP__(waiter)); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __W_EIP__(waiter)); ret =0 ; }else {/* Add ourselves back to the list */
@@ -1159,6 +1241,7 @@ }__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);return ret;
@@ -1196,6 +1279,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);INIT_WAITER (&waiter);
@@ -1205,10 +1289,14 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__);__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);FREE_WAITER (&waiter);
@@ -1223,6 +1311,7 @@TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ());/* we don't need to touch the lock struct anymore */ __raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);might_sleep ();
@@ -1273,6 +1362,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);INIT_WAITER (&waiter);
@@ -1282,10 +1372,14 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__);__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);FREE_WAITER (&waiter);
@@ -1306,6 +1400,7 @@/* we don't need to touch the lock struct anymore */ __raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock (&trace_lock, ti);/*
@@ -1396,7 +1491,6 @@TRACE_WARN_ON_LOCKED (list_empty (&lock->held_list));list_del_init (&lock->held_list);#endif -__raw_spin_lock (&pi_lock);#ifdef ALL_TASKS_PI if (plist_empty (&lock->wait_list))
@@ -1409,7 +1503,6 @@ __up_mutex_waiter_nosavestate(lock __EIP__); }else lock->owner =NULL ; -__raw_spin_unlock (&pi_lock);__raw_spin_unlock (&lock->wait_lock);#ifdef CONFIG_DEBUG_PREEMPT if (current->lock_count <0 || current->lock_count >=MAX_LOCK_STACK ) {
@@ -1640,6 +1733,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);INIT_WAITER (&waiter);
@@ -1649,10 +1743,14 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__);__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);FREE_WAITER (&waiter);
@@ -1667,6 +1765,7 @@TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ());/* we don't need to touch the lock struct anymore */ __raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);might_sleep ();
@@ -1684,6 +1783,7 @@* didnt get the lock - else return success: */ trace_lock_irq (&trace_lock, ti); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock);if (waiter.ti) {plist_del_init (&waiter.list, &lock->wait_list);
@@ -1692,17 +1792,16 @@* (No big problem if our PI effect lingers * a bit - owner will restore prio.) */ -__raw_spin_lock (&pi_lock);TRACE_WARN_ON_LOCKED (waiter.ti != ti);TRACE_WARN_ON_LOCKED (current->blocked_on != &waiter);plist_del (&waiter.pi_list, &task->pi_waiters);plist_init (&waiter.pi_list, task->prio); waiter.ti =NULL ; current->blocked_on =NULL ; -__raw_spin_unlock (&pi_lock); ret = -EINTR ; }__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irq (&trace_lock, ti);break ; }
@@ -1741,6 +1840,7 @@trace_lock_irqsave (&trace_lock, flags, ti);TRACE_BUG_ON_LOCKED (!raw_irqs_disabled ()); +__raw_spin_lock (&task->pi_lock);__raw_spin_lock (&lock->wait_lock); old_owner =lock_owner (lock);
@@ -1749,13 +1849,18 @@if (likely (!old_owner) ||__grab_lock (lock, task, old_owner->task)) {/* granted */ TRACE_WARN_ON_LOCKED (!plist_empty (&lock->wait_list) && !old_owner); -__raw_spin_lock (&pi_lock); - set_new_owner(lock, old_owner, ti __EIP__); -__raw_spin_unlock (&pi_lock); +if (old_owner) { +__raw_spin_lock (&old_owner->task->pi_lock); + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&old_owner->task->pi_lock); + }else + set_new_owner(lock, old_owner, ti __EIP__); +__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock); ret =1 ; } -__raw_spin_unlock (&lock->wait_lock); +__raw_spin_unlock (&task->pi_lock);trace_unlock_irqrestore (&trace_lock, flags, ti);return ret;
@@ -1817,6 +1922,7 @@* to the previous priority (or to the next highest prio * waiter's priority): */ +__raw_spin_lock (&old_owner->pi_lock); prio = old_owner->normal_prio;if (unlikely (!plist_empty (&old_owner->pi_waiters))) { w = plist_first_entry(&old_owner->pi_waiters, struct rt_mutex_waiter, pi_list);
@@ -1825,6 +1931,7 @@ }if (unlikely (prio != old_owner->prio))pi_setprio (lock, old_owner, prio); +__raw_spin_unlock (&old_owner->pi_lock);#ifdef CAPTURE_LOCK if (lock != &kernel_sem.lock) { new_owner->rt_flags |=RT_PENDOWNER ;
@@ -1851,6 +1958,7 @@* to the previous priority (or to the next highest prio * waiter's priority): */ +__raw_spin_lock (&old_owner->pi_lock); prio = old_owner->normal_prio;if (unlikely (!plist_empty (&old_owner->pi_waiters))) { w = plist_first_entry(&old_owner->pi_waiters, struct rt_mutex_waiter, pi_list);
@@ -1859,6 +1967,7 @@ }if (unlikely (prio != old_owner->prio))pi_setprio (lock, old_owner, prio); +__raw_spin_unlock (&old_owner->pi_lock);#ifdef CAPTURE_LOCK if (lock != &kernel_sem.lock) { new_owner->rt_flags |=RT_PENDOWNER ;
Re: [RFC] RT-patch update to remove the global pi_lock
Quoted 8 lines · Steven Rostedt
Here it is a little ambiguous. The process use to own the lock, but someone stole it. When grabbing a lock, I always grab the process lock first before grabbing the lock's lock, but this isn't necessary. So if you already have the two locks (mutex and process) as is the case above, you don't need to unlock them and regrab them (although this doesn't hurt, except for performance), because any race would have been with the grabbing of these two locks in the first place.
Quoted 6 lines
Now, here's why it's safe. The process that use to own the mutex and had it stolen now is out of the chain. The
pi_lockand thewait_lockhere are not in any order. So no one who is grabbing the process'pi_lockshould have owned thewait_lockand vice versa.So here's an updated patch without this lock switching:
your patch works great here, on 3 separate systems: a 1-way, a 2/4-way and an 8-way.
the 1-way system performed so well running the SMP kernel that i first thought i booted the UP kernel by accident :-)
on the 8-way box, "hackbench 10" got _3.7_ times faster (!!!).
i have booted the 8-way box without your patch once more because i didnt believe the results initially and thought they were some benchmarking fluke. But no, it wasnt a fluke. The kernel profiles are nicely flat now.
i've released 2.6.13-rc7-rt2 with your patch included. This is certainly a major milestone for PREEMPT_RT, it is now a first-class scalability citizen on SMP too. Great work Steven!
Ingo
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 13 lines · Ingo Molnar
your patch works great here, on 3 separate systems: a 1-way, a 2/4-way and an 8-way.
the 1-way system performed so well running the SMP kernel that i first thought i booted the UP kernel by accident :-)
on the 8-way box, "hackbench 10" got _3.7_ times faster (!!!).
i have booted the 8-way box without your patch once more because i didnt believe the results initially and thought they were some benchmarking fluke. But no, it wasnt a fluke. The kernel profiles are nicely flat now.
Quoted 5 lines
i've released 2.6.13-rc7-rt2 with your patch included. This is certainly a major milestone for
PREEMPT_RT, it is now a first-class scalability citizen on SMP too. Great work Steven!Ingo
A word of caution (aka. disclaimer). This is still new. I still expect there are some cases in the code that was missed and can cause a dead lock or other bad side effect. Hopefully, we can iron these all out. Also, I noticed that since the task takes it's own pi_lock for most of the code, if something locks up and a NMI goes off, the down_trylock in printk will also lock when it tries to take it's own pi_lock.
I stated earlier, that I converted printk to use early_printk (serial) on a oops_in_progress, so I wouldn't need to worry about the unlocking circus that needs to be done. So, I'm sure if something goes wrong now, you won't see anything, even with an NMI.
If someone else would like to fix that, I'm sure Ingo would be willing to accept patches :-)
-- Steve
Re: [RFC] RT-patch update to remove the global pi_lock
Quoted 6 lines · Steven Rostedt
A word of caution (aka. disclaimer). This is still new. I still expect there are some cases in the code that was missed and can cause a dead lock or other bad side effect. Hopefully, we can iron these all out. Also, I noticed that since the task takes it's own
pi_lockfor most of the code, if something locks up and a NMI goes off, thedown_trylockin printk will also lock when it tries to take it's ownpi_lock.
maybe it's time for ALL_TASKS_PI ?
Daniel
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
In reply to Steven RostedtQuoted 6 lines · Steven Rostedt
A word of caution (aka. disclaimer). This is still new. I still expect there are some cases in the code that was missed and can cause a dead lock or other bad side effect. Hopefully, we can iron these all out. Also, I noticed that since the task takes it's own
pi_lockfor most of the code, if something locks up and a NMI goes off, thedown_trylockin printk will also lock when it tries to take it's ownpi_lock.
OK, found my first bug :-)
Just so everyone knows. In rt.c, all pi_waiter access (reading or writing) must be protected by the task's pi_lock, and all access to the lock's wait_list must be protected by the lock's wait_lock. The magic is in the locking order :-).
-- Steve
kernel/rt.c +9 -4
@@ -671,6 +671,7 @@struct rt_mutex_waiter *w;struct plist *curr1; +__raw_spin_lock (old_owner->task->pi_lock);TRACE_WARN_ON_LOCKED (plist_empty (&waiter->pi_list));TRACE_WARN_ON_LOCKED (lock_owner (lock));
@@ -681,6 +682,7 @@ }TRACE_WARN_ON_LOCKED (1 ); ok: +__raw_spin_unlock (old_owner->task->pi_lock);return ; }
@@ -734,6 +736,8 @@if (old_owner == new_owner)return ; +TRACE_BUG_ON_LOCKED (!spin_is_locked (&old_owner->task->pi_lock)); +TRACE_BUG_ON_LOCKED (!spin_is_locked (&new_owner->task->pi_lock));plist_for_each_safe (curr1, next1, &old_owner->task->pi_waiters) { w = plist_entry(curr1, struct rt_mutex_waiter, pi_list);if (w->lock == lock) {
@@ -932,6 +936,8 @@/* * Add SCHED_NORMAL tasks to the end of the waitqueue (FIFO): */ +TRACE_BUG_ON_LOCKED (!spin_is_locked (&task->pi_lock)); +TRACE_BUG_ON_LOCKED (!spin_is_locked (&lock->wait_lock));#ifndef ALL_TASKS_PI if (!rt_task (task)) {plist_add (&waiter->list, &lock->wait_list);
@@ -939,6 +945,7 @@ return; }#endif +__raw_spin_lock (&lock_owner (lock)->task->pi_lock);plist_add (&waiter->pi_list, &lock_owner (lock)->task->pi_waiters);/* * Add RT tasks to the head:
@@ -949,11 +956,9 @@* If the waiter has higher priority than the owner * then temporarily boost the owner: */ -if (task->prio <lock_owner (lock)->task->prio) { -__raw_spin_lock (&lock_owner (lock)->task->pi_lock); +if (task->prio <lock_owner (lock)->task->prio)pi_setprio (lock,lock_owner (lock)->task, task->prio); -__raw_spin_unlock (&lock_owner (lock)->task->pi_lock); - } +__raw_spin_unlock (&lock_owner (lock)->task->pi_lock); }/*
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Ingo,
The following code segment from pick_new_owner:
waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list);
try_again:
trace_special_pid(waiter->ti->task->pid, waiter->ti->task->prio, 0);
#ifdef ALL_TASKS_PI
check_pi_list_present(lock, waiter, old_owner);
#endif
new_owner = waiter->ti;
/*
* The new owner is still blocked on this lock, so we
* must release the lock->wait_lock before grabing
* the new_owner lock.
*/
__raw_spin_unlock(&lock->wait_lock);
__raw_spin_lock(&new_owner->task->pi_lock);
__raw_spin_lock(&lock->wait_lock);
/*
* In this split second of releasing the lock, a high priority
* process could have come along and blocked as well.
*/
waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list);
if (unlikely(waiter->ti != new_owner)) {
__raw_spin_unlock(&new_owner->task->pi_lock);
goto try_again;
}Is basically a waste on UP. Should the following patch be applied instead?
kernel/rt.c renamed from kernel/rt.c.orig +4 -0
@@ -1046,7 +1046,9 @@ pick_new_owner(struct rt_mutex *lock, st*/ waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list); +#ifdef CONFIG_SMP try_again: +#endif trace_special_pid (waiter->ti->task->pid, waiter->ti->task->prio,0 );#ifdef ALL_TASKS_PI
@@ -1065,11 +1067,13 @@ pick_new_owner(struct rt_mutex *lock, st* In this split second of releasing the lock, a high priority * process could have come along and blocked as well. */ +#ifdef CONFIG_SMP waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list);if (unlikely (waiter->ti != new_owner)) {__raw_spin_unlock (&new_owner->task->pi_lock); goto try_again; } +#endif plist_del_init (&waiter->list, &lock->wait_list);__raw_spin_lock (&old_owner->task->pi_lock);
-- Steve
PS. I notice I have a large CC on this thread. If anyone wants me to take them off, just send me a private email, and I'll do that.
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
OK, I'm looking for a second set of eyes (or third or more :-) to see if there's a danger of a deadlock here.
The task->pi_lock is dependent on the order of locking, which I said was proven to be true, otherwise there would be a deadlock.
L1->P1->L2->P2-L3->P3
Where lock L1 is owned by P1 which is blocked on L2 and so on.
The problem comes when we have to deal with this BKL. This lock is special in that it can be grabbed and released and break this chain. Mainly with semaphores, since BKL shouldn't be released when scheduling where the old spin_locks were replaced. But since we replaced semaphores with mutexes, the BKL starts to change the rules.
(Ingo, my last patch is flawed since it only covers the case of semaphores, so please don't apply it, yet).
Now we can have:
BKL->P1->L1->P2->BKL
Where there's a loop. The good news is that this only happens when P1 is about to release the BKL, otherwise it would be a real deadlock in the kernel and not with the PI.
My fear of a deadlock is in the __up code. Where we have the locking order of:
P2->BKL->P1
Is there someplace that can cause this to deadlock?
To deadlock, we need another process on another CPU to lock in the following order:
P1->L1->P2->BKL
Which I guess can happen and we would get a deadlock. This task could be holding P1 and L1 and be waiting on P2 while the __up could have P2 and BKL and be waiting on P1.
So would this solve the problem with this deadlock? This would be in pick_new_owner where the caller is the __up. (the P2->BKL-P1 side) This is not a patch, but I put +'s at the added code.
#ifdef CONFIG_SMP
try_again:
#endif trace_special_pid(waiter->ti->task->pid, waiter->ti->task->prio, 0);
#ifdef ALL_TASKS_PI
check_pi_list_present(lock, waiter, old_owner);
#endif
new_owner = waiter->ti;
/*
* The new owner is still blocked on this lock, so we
* must release the lock->wait_lock before grabing
* the new_owner lock.
*/
__raw_spin_unlock(&lock->wait_lock);
__raw_spin_lock(&new_owner->task->pi_lock);
__raw_spin_lock(&lock->wait_lock);
/*
* In this split second of releasing the lock, a high priority
* process could have come along and blocked as well.
*/
#ifdef CONFIG_SMP
waiter = plist_first_entry(&lock->wait_list, struct rt_mutex_waiter, list);
if (unlikely(waiter->ti != new_owner)) {
__raw_spin_unlock(&new_owner->task->pi_lock);
goto try_again;
}+ /*
+ * Once again the BKL comes to play. Since the BKL can be grabbed and released
+ * out of the normal P1->L1->P2 order, there's a chance that someone has the
+ * BKL owner's lock and is waiting on the new owner lock.
+ */
+ if (unlikely(lock == &kernel_sem.lock)) {
+ if (!__raw_spin_trylock(&old_owner->task->pi_lock)) {
+ __raw_spin_unlock(&lock->wait_lock);
+ __raw_spin_unlock(&new_owner->task->pi_lock);
+ goto try_again;
+ }
+ } else
#endif __raw_spin_lock(&old_owner->task->pi_lock);
-- Steve
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Quoted 2 lines · Steven Rostedt
OK, I'm looking for a second set of eyes (or third or more :-) to see if there's a danger of a deadlock here.
Unless someone sees a problem with the patch, here it is. I noticed that I unlocked the lock->wait_lock when I should not have. (scares me since I'm currently running the kernel with that bug!)
Ingo, in the pi_setprio, I can stop the loop if the owner of the BKL has a task lock_depth >= 0 correct? This means that the owner is either running, or is going to go to sleep. If it was blocked on another task, via a mutex, then this count would be -1. Correct? I may need to move the setting of lock_depth = -1 to inside the protection of the task pi_lock.
-- Steve
kernel/rt.c +13 -3
@@ -1089,11 +1089,21 @@__raw_spin_unlock (&new_owner->task->pi_lock); goto try_again; } +/* +* Once again the BKL comes to play. Since the BKL can be grabbed and released +* out of the normal P1->L1->P2 order, there's a chance that someone has the +* BKL owner's lock and is waiting on the new owner lock. +*/ +if (unlikely (lock == &kernel_sem.lock)) { +if (!__raw_spin_trylock (&old_owner->task->pi_lock)) { +__raw_spin_unlock (&new_owner->task->pi_lock); + goto try_again; + } + } else#endif +__raw_spin_lock (&old_owner->task->pi_lock); +plist_del_init (&waiter->list, &lock->wait_list); - -__raw_spin_lock (&old_owner->task->pi_lock); -plist_del (&waiter->pi_list, &old_owner->task->pi_waiters);plist_init (&waiter->pi_list, waiter->ti->task->prio);
Steven Rostedt
reviewerRe: [RFC] RT-patch update to remove the global pi_lock
Ingo,
This patch contains my previous change as well as an update to fix the race conditions that the BKL may hold. It is against -rt2.
The first part of the patch will stop the pi_setprio loop if the process has a lock_depth greater than or equal to zero. Since that would mean that the process either is running, or is about to release the BKL.
I still kept the change from rt1 to rt2 but changed the comment.
I added the lock release logic in the __up code incase the BKL is causing loops in the pi chain.
I'm currently runnig -rt2 with these changes as I type.
-- Steve
kernel/rt.c +34 -8
@@ -800,7 +800,24 @@#endif mutex_setprio (p, prio); -if (!w) + +/* +* The BKL can really be a pain. It can happen where the +* BKL is being held by one task that is just about to +* block on another task that is waiting for the BKL. +* This isn't a deadlock, since the BKL is released +* when the task goes to sleep. This also means that +* all holders of the BKL are not blocked, or are just +* about to be blocked. +* +* Another side-effect of this is that there's a small +* window where the spinlocks are not held, and the blocked +* process hasn't released the BKL. So if we are going +* to boost the owner of the BKL, stop after that, +* since that owner is either running, or about to sleep +* but don't go any further or we are in a loop. +*/ +if (!w ||unlikely (p->lock_depth >=0 ))break ;/* * If the task is blocked on a lock, and we just made
@@ -817,10 +834,9 @@TRACE_BUG_ON_LOCKED (!lock);/* -* The BKL can really be a pain. It can happen that the lock -* we are blocked on is owned by a task that is waiting for -* the BKL, and we own it. So, if this is the BKL and we own -* it, then end the loop here. +* The current task that is blocking can also the one +* holding the BKL, and blocking on a task that wants +* it. So if it were to get this far, we would deadlock. */ if (unlikely (l == &kernel_sem.lock) &&lock_owner (l) ==current_thread_info ()) {/*
@@ -1089,11 +1105,21 @@__raw_spin_unlock (&new_owner->task->pi_lock); goto try_again; } +/* +* Once again the BKL comes to play. Since the BKL can be grabbed and released +* out of the normal P1->L1->P2 order, there's a chance that someone has the +* BKL owner's lock and is waiting on the new owner lock. +*/ +if (unlikely (lock == &kernel_sem.lock)) { +if (!__raw_spin_trylock (&old_owner->task->pi_lock)) { +__raw_spin_unlock (&new_owner->task->pi_lock); + goto try_again; + } + } else#endif +__raw_spin_lock (&old_owner->task->pi_lock); +plist_del_init (&waiter->list, &lock->wait_list); - -__raw_spin_lock (&old_owner->task->pi_lock); -plist_del (&waiter->pi_list, &old_owner->task->pi_waiters);plist_init (&waiter->pi_list, waiter->ti->task->prio);
Steven Rostedt
reviewer[FYI] 2.6.13-rt3 and a nanosleep jitter test.
In reply to Steven RostedtThomas,
I just was wondering how the HR Timers were in the latest -rtX patch and wrote my own little jitter test using nanosleep. Here's the results:
On vanilla 2.6.13-rc7-git1 (Yes I need to get over to 2.6.13)
# ./jitter starting calibrate finished calibrate: 2133.9060MHz 2133906034 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.011997701 min: 0.011890522 avg: 0.011993485 greatest time over: 1997.701 usecs never ran under (good!) average time over: 1993.485 usecs
On 2.6.13-rt3:
# ./jitter starting calibrate finished calibrate: 2133.2960MHz 2133295991 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010034857 min: 0.010006309 avg: 0.010009213 greatest time over: 34.857 usecs never ran under (good!) average time over: 9.213 usecs
Not bad. I then ran a clean kernel compile as root with a -j3 (this is an 2x SMP machine), and tried the test again.
# ./jitter starting calibrate finished calibrate: 2133.3005MHz 2133300491 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010044836 min: 0.010014244 avg: 0.010030741 greatest time over: 44.836 usecs never ran under (good!) average time over: 30.741 usecs
Since the ticks per second is also calculated here, I ran it again using the calibration of the first run (still running that make):
./jitter -c 2133295991
passed in calibrate: 2133.2960MHz 2133295991
time slept: 0.010000000 sec: 0 nsec: 10000000
max: 0.010051293
min: 0.010012155
avg: 0.010030237
greatest time over: 51.293 usecs
never ran under (good!)
average time over: 30.237 usecs
And once more using the calibration found by 2.6.13-rc7-git1 (still running that make):
# ./jitter -c 2133906034 passed in calibrate: 2133.9060MHz 2133906034 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010058339 min: 0.010016418 avg: 0.010025571 greatest time over: 58.339 usecs never ran under (good!) average time over: 25.571 usecs
Some info on my machine:
$ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 10 model name : AMD Athlon(tm) MP 2800+ stepping : 0 cpu MHz : 2133.286 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow bogomips : 4259.84
processor : 1vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(tm) Processor
stepping : 0
cpu MHz : 2133.286
cache size : 512 KBfdiv_bug : nohlt_bug : nof00f_bug : nocoma_bug : no
fpu : yesfpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 4259.84
And attached is the jitter.c test. Must be run as root since it ups the priority to the max.
Have fun,
-- Steve
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <getopt.h>
#include <sched.h>
#include <unistd.h>
#define rdtsc(low,high) \
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))#define rdtscl(low) \
__asm__ __volatile__("rdtsc" : "=a" (low) : : "edx")#define rdtscll(val) \
__asm__ __volatile__("rdtsc" : "=A" (val))#define LOOPS 100.0
int main(int argc, char **argv)
{
int c;
unsigned long long start, end, tps = 0;
double cal;
double max=0,min=0,avg=0;
int i;
pid_t pid;
struct sched_param sp;
double sleeptime;
unsigned long sec,nsec;
sleeptime = 0.01;
sec = sleeptime;
nsec = (sleeptime-sec) * 1000000000;
pid = getpid();
memset(&sp,0,sizeof(sp));
sp.sched_priority = sched_get_priority_max(SCHED_FIFO);
sched_setscheduler(pid,SCHED_FIFO,&sp);
while ((c=getopt(argc,argv,"c:")) != -1) {
switch (c) {
case 'c':
tps = strtoll(optarg,NULL,10);
break;
default:
exit(0);
}
}
if (!tps) {
printf("starting calibrate\n");
rdtscll(start);
sleep(8);
rdtscll(end);
tps = end - start;
tps >>= 3;
printf("finished calibrate: ");
} else {
printf("passed in calibrate: ");
}
cal = tps;
cal /= 1000000.0;
printf("%.4fMHz %llu\n",cal,tps);
for (i=0; i < LOOPS; i++) {
struct timespec req = { sec, nsec };
unsigned long long t;
rdtscll(start);
nanosleep(&req,NULL);
rdtscll(end);
t = end - start;
cal = t;
cal /= (double)tps;
if (!i || cal > max)
max = cal;
if (!i || cal < min)
min = cal;
avg += cal;
}
avg /= LOOPS;
printf("time slept: %.9f sec: %lu nsec: %lu\n",sleeptime,sec,nsec);
printf("max: %.9f\n",max);
printf("min: %.9f\n",min);
printf("avg: %.9f\n",avg);
printf("greatest time over: %.3f usecs\n",(max-sleeptime)*1000000.0);
if (min > sleeptime) {
printf("never ran under (good!)\n");
} else {
printf("Ran under!!! (by %.9f) nsecs\n",sleeptime-min);
}
if (avg > sleeptime)
printf("average time over: %.3f usecs\n",(avg-sleeptime)*1000000.0);
else
printf("average time ran under???\n");
exit(0);
}Re: [FYI] 2.6.13-rt3 and a nanosleep jitter test.
There is already a suite HRT of tests they include a nanosleep jitter test with 8 or 9 other tests..
find them inside the hrt-support patch at http://high-res-timer.sf.net
Daniel
Quoted 124 lines · Steven Rostedt
Thomas,
I just was wondering how the HR Timers were in the latest -rtX patch and wrote my own little jitter test using nanosleep. Here's the results:
On vanilla 2.6.13-rc7-git1 (Yes I need to get over to 2.6.13)
# ./jitter starting calibrate finished calibrate: 2133.9060MHz 2133906034 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.011997701 min: 0.011890522 avg: 0.011993485 greatest time over: 1997.701 usecs never ran under (good!) average time over: 1993.485 usecsOn 2.6.13-rt3:
# ./jitter starting calibrate finished calibrate: 2133.2960MHz 2133295991 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010034857 min: 0.010006309 avg: 0.010009213 greatest time over: 34.857 usecs never ran under (good!) average time over: 9.213 usecsNot bad. I then ran a clean kernel compile as root with a -j3 (this is an 2x SMP machine), and tried the test again.
# ./jitter starting calibrate finished calibrate: 2133.3005MHz 2133300491 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010044836 min: 0.010014244 avg: 0.010030741 greatest time over: 44.836 usecs never ran under (good!) average time over: 30.741 usecsSince the ticks per second is also calculated here, I ran it again using the calibration of the first run (still running that make):
./jitter -c 2133295991
passed in calibrate: 2133.2960MHz 2133295991
time slept: 0.010000000 sec: 0 nsec: 10000000
max: 0.010051293
min: 0.010012155
avg: 0.010030237
greatest time over: 51.293 usecs
never ran under (good!)
average time over: 30.237 usecsAnd once more using the calibration found by 2.6.13-rc7-git1 (still running that make):
# ./jitter -c 2133906034 passed in calibrate: 2133.9060MHz 2133906034 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010058339 min: 0.010016418 avg: 0.010025571 greatest time over: 58.339 usecs never ran under (good!) average time over: 25.571 usecsSome info on my machine:
$ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 10 model name : AMD Athlon(tm) MP 2800+ stepping : 0 cpu MHz : 2133.286 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow bogomips : 4259.84processor : 1
vendor_id: AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(tm) Processor
stepping : 0
cpu MHz : 2133.286
cache size : 512 KBfdiv_bug: nohlt_bug: nof00f_bug: nocoma_bug: no
fpu : yesfpu_exception: yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 4259.84And attached is the
jitter.ctest. Must be run as root since it ups the priority to the max.Have fun,
-- Steve
Steven Rostedt
reviewerRe: [FYI] 2.6.13-rt3 and a nanosleep jitter test.
Quoted 4 lines · Daniel Walker
There is already a suite HRT of tests they include a nanosleep jitter test with 8 or 9 other tests..
find them inside the hrt-support patch at http://high-res-timer.sf.net
Wow, they are hidden nicely :-)
I was looking for a tar ball or something. Not a patch. Well, anyway I took a look at it, and it is pretty much like mine. But I wanted to eliminate any more system calls than I needed. Grant you, that my test is not portable to anything other than ia86. But it gives me the results that I wanted.
Thanks,
-- Steve
Re: [FYI] 2.6.13-rt3 and a nanosleep jitter test.
In reply to Steven RostedtSorry, that's http://high-res-timers.sf.net/
Daniel
Quoted 124 lines · Steven Rostedt
Thomas,
I just was wondering how the HR Timers were in the latest -rtX patch and wrote my own little jitter test using nanosleep. Here's the results:
On vanilla 2.6.13-rc7-git1 (Yes I need to get over to 2.6.13)
# ./jitter starting calibrate finished calibrate: 2133.9060MHz 2133906034 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.011997701 min: 0.011890522 avg: 0.011993485 greatest time over: 1997.701 usecs never ran under (good!) average time over: 1993.485 usecsOn 2.6.13-rt3:
# ./jitter starting calibrate finished calibrate: 2133.2960MHz 2133295991 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010034857 min: 0.010006309 avg: 0.010009213 greatest time over: 34.857 usecs never ran under (good!) average time over: 9.213 usecsNot bad. I then ran a clean kernel compile as root with a -j3 (this is an 2x SMP machine), and tried the test again.
# ./jitter starting calibrate finished calibrate: 2133.3005MHz 2133300491 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010044836 min: 0.010014244 avg: 0.010030741 greatest time over: 44.836 usecs never ran under (good!) average time over: 30.741 usecsSince the ticks per second is also calculated here, I ran it again using the calibration of the first run (still running that make):
./jitter -c 2133295991
passed in calibrate: 2133.2960MHz 2133295991
time slept: 0.010000000 sec: 0 nsec: 10000000
max: 0.010051293
min: 0.010012155
avg: 0.010030237
greatest time over: 51.293 usecs
never ran under (good!)
average time over: 30.237 usecsAnd once more using the calibration found by 2.6.13-rc7-git1 (still running that make):
# ./jitter -c 2133906034 passed in calibrate: 2133.9060MHz 2133906034 time slept: 0.010000000 sec: 0 nsec: 10000000 max: 0.010058339 min: 0.010016418 avg: 0.010025571 greatest time over: 58.339 usecs never ran under (good!) average time over: 25.571 usecsSome info on my machine:
$ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 10 model name : AMD Athlon(tm) MP 2800+ stepping : 0 cpu MHz : 2133.286 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow bogomips : 4259.84processor : 1
vendor_id: AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(tm) Processor
stepping : 0
cpu MHz : 2133.286
cache size : 512 KBfdiv_bug: nohlt_bug: nof00f_bug: nocoma_bug: no
fpu : yesfpu_exception: yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 4259.84And attached is the
jitter.ctest. Must be run as root since it ups the priority to the max.Have fun,
-- Steve
Steven Rostedt
reviewerRe: [FYI] 2.6.13-rt3 and a nanosleep jitter test.
Quoted 1 line · Daniel Walker
Sorry, that's http://high-res-timers.sf.net/
Thanks,
But I always seem to prefer to rewrite the wheel than to use one that already exists. ;-) Probably explains why my cars are always in the shop!
-- Steve
Re: [FYI] 2.6.13-rt3 and a nanosleep jitter test.
No problem .. There are some other tests in there though .. I've been using them for stress testing .. Apparently you don't need HRT on to use them either.
Daniel
Quoted 12 lines · Steven Rostedt
Quoted 1 line · Daniel Walker
Sorry, that's http://high-res-timers.sf.net/
Thanks,
But I always seem to prefer to rewrite the wheel than to use one that already exists. ;-) Probably explains why my cars are always in the shop!
-- Steve
Re: 2.6.13-rc6-rt6
In reply to Steven RostedtQuoted 2 lines · Steven Rostedt
Here's a patch to move the
pi_lockout of the "fast path". Thus, only threads that need to do PI will need to take it.
ok, looks good, applied it. I've renamed p->rt_lock to p->pi_lock. The patch gave a 10% wall-clock improvement in hackbench numbers on an 8-way box. (This box has pretty high cachemiss costs, so the positive effects of such patches show up nicely.)
Ingo
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
In reply to Ingo MolnarQuoted 7 lines · Ingo Molnar
Quoted 7 lines
And it goes on and on. This happens everytime. Without netconsole, I only get the nonzero lock count error. Also, one of my lockups on SMP had to do with the
kernel_thread_helper:Using IPI Shortcut mode
khelper/794[CPU#0]: BUG inset_new_owneratkernel/rt.c:916
This was with netconsole and showed up after a bunch of other bugs. So this is a side effect of what happened earlier.
Quoted 4 lines
this is a 'must not happen'. Somehow
lock->heldlist got non-empty. Maybe some use-after-free thing? Havent seen it myself.
I started debugging netconsole with the RT patch and found this happening. After seeing what's wrong, I looked at the latest git branch, and it seems to already have a similar solution that I was going to make. Here's a description of what's wrong.
In net/core/dev.c the following code is in net_rx_action:
netpoll_poll_lock(dev);
if (dev->quota <= 0 || dev->poll(dev, &budget)) {
netpoll_poll_unlock(dev);
raw_local_irq_disable();
list_del(&dev->poll_list);
list_add_tail(&dev->poll_list, &queue->poll_list);
if (dev->quota < 0)
dev->quota += dev->weight;
else
dev->quota = dev->weight;
} else {
netpoll_poll_unlock(dev);The netpoll_poll_lock and netpoll_poll_unlock look like this (in current RT):
static inline netpoll_poll_lock(struct net_device *dev)
{
if (dev->npinfo) {
spin_lock(&dev->npinfo->poll_lock);
dev->npinfo->poll_owner = smp_processor_id();
}
}static inline void netpoll_poll_unlock(struct net_device *dev)
{
if (dev->npinfo) {
dev->npinfo->poll_owner = -1;
spin_unlock(&dev->npinfo->poll_lock);
}
}The problem here is that between netpoll_poll_lock and netpoll_poll_unlock the dev->npinfo gets assigned. So we unlock the dev->npinfo->poll_lock without ever locking it.
Here's the port from the latest git to solve this. I've CCed the netdev, since I'm not sure I got all the places for rcu_lock for the netpoll. At least to solve this problem. I did boot up the kernel and this patch did fix my bugs that I was getting using netconsole. (I have one more patch to send to fix the illegal API messages).
-- Steve
include/linux/netpoll.h +12 -6
@@ -60,25 +60,31 @@ return ret; } -static inline void netpoll_poll_lock (struct net_device *dev) +static inline void *netpoll_poll_lock (struct net_device *dev) { +rcu_read_lock ();if (dev->npinfo) {spin_lock (&dev->npinfo->poll_lock); dev->npinfo->poll_owner =smp_processor_id (); +return dev->npinfo; } +return NULL ; } -static inline void netpoll_poll_unlock (struct net_device *dev) +static inline void netpoll_poll_unlock (void *have) { -if (dev->npinfo) { - dev->npinfo->poll_owner =-1 ; -spin_unlock (&dev->npinfo->poll_lock); +struct netpoll_info *npi = have; + +if (npi) { + npi->poll_owner =-1 ; +spin_unlock (&npi->poll_lock); } +rcu_read_unlock (); }#else #define netpoll_rx (a) 0 -#define netpoll_poll_lock (a) +#define netpoll_poll_lock (a) 0#define netpoll_poll_unlock (a)#endif
net/core/netpoll.c +3 -0
@@ -726,6 +726,9 @@/* last thing to do is link it to the net device structure */ ndev->npinfo = npinfo; +/* avoid racing with NAPI reading npinfo */ +synchronize_rcu (); +return 0 ; release:
net/core/dev.c +4 -3
@@ -1723,6 +1723,7 @@while (!list_empty (&queue->poll_list)) {struct net_device *dev; +void *have;if (budget <=0 || jiffies - start_time >1 ) goto softnet_break;
@@ -1735,10 +1736,10 @@ dev =list_entry (queue->poll_list.next, struct net_device, poll_list); -netpoll_poll_lock (dev); + have =netpoll_poll_lock (dev);if (dev->quota <=0 || dev->poll (dev, &budget)) { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);raw_local_irq_disable ();list_del (&dev->poll_list);list_add_tail (&dev->poll_list, &queue->poll_list);
@@ -1747,7 +1748,7 @@else dev->quota = dev->weight; }else { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);dev_put (dev);raw_local_irq_disable (); }
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
In reply to Ingo MolnarQuoted 7 lines · Ingo Molnar
Quoted 7 lines
And it goes on and on. This happens everytime. Without netconsole, I only get the nonzero lock count error. Also, one of my lockups on SMP had to do with the
kernel_thread_helper:Using IPI Shortcut mode
khelper/794[CPU#0]: BUG inset_new_owneratkernel/rt.c:916
This was with netconsole and showed up after a bunch of other bugs. So this is a side effect of what happened earlier.
Quoted 4 lines
this is a 'must not happen'. Somehow
lock->heldlist got non-empty. Maybe some use-after-free thing? Havent seen it myself.
I started debugging netconsole with the RT patch and found this happening. After seeing what's wrong, I looked at the latest git branch, and it seems to already have a similar solution that I was going to make. Here's a description of what's wrong.
In net/core/dev.c the following code is in net_rx_action:
netpoll_poll_lock(dev);
if (dev->quota <= 0 || dev->poll(dev, &budget)) {
netpoll_poll_unlock(dev);
raw_local_irq_disable();
list_del(&dev->poll_list);
list_add_tail(&dev->poll_list, &queue->poll_list);
if (dev->quota < 0)
dev->quota += dev->weight;
else
dev->quota = dev->weight;
} else {
netpoll_poll_unlock(dev);The netpoll_poll_lock and netpoll_poll_unlock look like this (in current RT):
static inline netpoll_poll_lock(struct net_device *dev)
{
if (dev->npinfo) {
spin_lock(&dev->npinfo->poll_lock);
dev->npinfo->poll_owner = smp_processor_id();
}
}static inline void netpoll_poll_unlock(struct net_device *dev)
{
if (dev->npinfo) {
dev->npinfo->poll_owner = -1;
spin_unlock(&dev->npinfo->poll_lock);
}
}The problem here is that between netpoll_poll_lock and netpoll_poll_unlock the dev->npinfo gets assigned. So we unlock the dev->npinfo->poll_lock without ever locking it.
Here's the port from the latest git to solve this. I've CCed the netdev, since I'm not sure I got all the places for rcu_lock for the netpoll. At least to solve this problem. I did boot up the kernel and this patch did fix my bugs that I was getting using netconsole. (I have one more patch to send to fix the illegal API messages).
-- Steve
include/linux/netpoll.h +12 -6
@@ -60,25 +60,31 @@ return ret; } -static inline void netpoll_poll_lock (struct net_device *dev) +static inline void *netpoll_poll_lock (struct net_device *dev) { +rcu_read_lock ();if (dev->npinfo) {spin_lock (&dev->npinfo->poll_lock); dev->npinfo->poll_owner =smp_processor_id (); +return dev->npinfo; } +return NULL ; } -static inline void netpoll_poll_unlock (struct net_device *dev) +static inline void netpoll_poll_unlock (void *have) { -if (dev->npinfo) { - dev->npinfo->poll_owner =-1 ; -spin_unlock (&dev->npinfo->poll_lock); +struct netpoll_info *npi = have; + +if (npi) { + npi->poll_owner =-1 ; +spin_unlock (&npi->poll_lock); } +rcu_read_unlock (); }#else #define netpoll_rx (a) 0 -#define netpoll_poll_lock (a) +#define netpoll_poll_lock (a) 0#define netpoll_poll_unlock (a)#endif
net/core/netpoll.c +3 -0
@@ -726,6 +726,9 @@/* last thing to do is link it to the net device structure */ ndev->npinfo = npinfo; +/* avoid racing with NAPI reading npinfo */ +synchronize_rcu (); +return 0 ; release:
net/core/dev.c +4 -3
@@ -1723,6 +1723,7 @@while (!list_empty (&queue->poll_list)) {struct net_device *dev; +void *have;if (budget <=0 || jiffies - start_time >1 ) goto softnet_break;
@@ -1735,10 +1736,10 @@ dev =list_entry (queue->poll_list.next, struct net_device, poll_list); -netpoll_poll_lock (dev); + have =netpoll_poll_lock (dev);if (dev->quota <=0 || dev->poll (dev, &budget)) { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);raw_local_irq_disable ();list_del (&dev->poll_list);list_add_tail (&dev->poll_list, &queue->poll_list);
@@ -1747,7 +1748,7 @@else dev->quota = dev->weight; }else { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);dev_put (dev);raw_local_irq_disable (); }
Re: 2.6.13-rc6-rt6
Quoted 75 lines · Steven Rostedt
Quoted 7 lines · Ingo Molnar
Quoted 7 lines
And it goes on and on. This happens everytime. Without netconsole, I only get the nonzero lock count error. Also, one of my lockups on SMP had to do with the
kernel_thread_helper:Using IPI Shortcut mode
khelper/794[CPU#0]: BUG inset_new_owneratkernel/rt.c:916This was with netconsole and showed up after a bunch of other bugs. So this is a side effect of what happened earlier.
Quoted 3 lines
this is a 'must not happen'. Somehow
lock->heldlist got non-empty. Maybe some use-after-free thing? Havent seen it myself.I started debugging netconsole with the RT patch and found this happening. After seeing what's wrong, I looked at the latest git branch, and it seems to already have a similar solution that I was going to make. Here's a description of what's wrong.
In
net/core/dev.cthe following code is innet_rx_action:netpoll_poll_lock(dev); if (dev->quota <= 0 || dev->poll(dev, &budget)) { netpoll_poll_unlock(dev); raw_local_irq_disable(); list_del(&dev->poll_list); list_add_tail(&dev->poll_list, &queue->poll_list); if (dev->quota < 0) dev->quota += dev->weight; else dev->quota = dev->weight; } else { netpoll_poll_unlock(dev);The
netpoll_poll_lockandnetpoll_poll_unlocklook like this (in current RT):static inline
netpoll_poll_lock(struct net_device *dev){ if (dev->npinfo) { spin_lock(&dev->npinfo->poll_lock); dev->npinfo->poll_owner = smp_processor_id(); } }static inline void
netpoll_poll_unlock(struct net_device *dev){ if (dev->npinfo) { dev->npinfo->poll_owner = -1; spin_unlock(&dev->npinfo->poll_lock); } }The problem here is that between
netpoll_poll_lockandnetpoll_poll_unlockthedev->npinfogets assigned. So we unlock thedev->npinfo->poll_lockwithout ever locking it.Here's the port from the latest git to solve this. I've CCed the netdev, since I'm not sure I got all the places for
rcu_lockfor the netpoll. At least to solve this problem. I did boot up the kernel and this patch did fix my bugs that I was getting using netconsole. (I have one more patch to send to fix the illegal API messages).-- Steve
Signed-off-by Steven Rostedt <[email protected]>Index:
linux_realtime_ernie/include/linux/netpoll.h
===================================================================
include/linux/netpoll.h line 61
Quoted 2 lines
include/linux/netpoll.h +0
-0@@ -60,25 +60,31 @@return ret; }
Good catch -- but a few changes needed to be perfectly safe:
static inline void *netpoll_poll_lock(struct net_device *dev)
{
struct netpoll_info *npi;
rcu_read_lock();
npi = rcu_dereference(dev)->npinfo;
if (have) {
spin_lock(&npi->poll_lock);
npi->poll_owner = smp_processor_id();
return npi;
}
return NULL;
}The earlier version could get in trouble if dev->npinfo was set to NULL while this was executing.
I am assuming that the dev pointer is really what is being RCU-protected, but this example uses mostly static data structures, so it is hard for me to tell. The npinfo pointer is not being RCU protected, as it appears to never be changed. The other candidate is the rx_np pointer, which is set to NULL in netpoll_cleanup. I suggest a modification to netpoll_cleanup below that handles both possibilities. Of course, I might well be missing something...
net/core/netpoll.c
Quoted 26 lines
include/linux/netpoll.h +8
-5-static inline void netpoll_poll_unlock (struct net_device *dev) +static inline void netpoll_poll_unlock (void *have) { -if (dev->npinfo) { - dev->npinfo->poll_owner =-1 ; -spin_unlock (&dev->npinfo->poll_lock); +struct netpoll_info *npi = have; + +if (npi) { + npi->poll_owner =-1 ; +spin_unlock (&npi->poll_lock); } +rcu_read_unlock (); }#else #define netpoll_rx (a) 0 -#define netpoll_poll_lock (a) +#define netpoll_poll_lock (a) 0#define netpoll_poll_unlock (a)#endif Index:
linux_realtime_ernie/net/core/netpoll.c
===================================================================net/core/netpoll.c +0
-0
If netpoll_setup() is implicitly tearing down an earlier netpoll_setup(), then something like Steve's change below might be needed.
net/core/netpoll.c line 734
Quoted 10 lines
net/core/netpoll.c +3
-0@@ -726,6 +726,9 @@/* last thing to do is link it to the net device structure */ ndev->npinfo = npinfo; +/* avoid racing with NAPI reading npinfo */ +synchronize_rcu (); +return 0 ; release:
Assuming that it is legal to block in netpoll_cleanup(), the following should work. The idea is to NULL the dev pointer, wait for all RCU readers to get done, and only then complete the cleanup.
void netpoll_cleanup(struct netpoll *np)
{
struct netpoll_info *npinfo;
unsigned long flags;
struct net_device *dp;
if (np->dev) {
dp = np->dev;
rcu_assign_pointer(np->dev, NULL);
synchronize_rcu();
npinfo = dp->npinfo;
if (npinfo && npinfo->rx_np == np) {
spin_lock_irqsave(&npinfo->rx_lock, flags);
npinfo->rx_np = NULL;
npinfo->rx_flags &= ~NETPOLL_RX_ENABLED;
spin_unlock_irqrestore(&npinfo->rx_lock, flags);
}
dev_put(dp);
}
}Again, I do not fully understand this code, so a grain of salt might come in handy. But there definitely need to be some rcu_dereference() and rcu_assign_pointer() primitives in there somewhere. ;-)
The following changes look good to me, but, as I said earlier, I do not claim to fully understand this code.
Quoted 26 lines
Index:
linux_realtime_ernie/net/core/dev.c
===================================================================net/core/dev.c +3
-2@@ -1723,6 +1723,7 @@while (!list_empty (&queue->poll_list)) {struct net_device *dev; +void *have;if (budget <=0 || jiffies - start_time >1 ) goto softnet_break;@@ -1735,10 +1736,10 @@ dev =list_entry (queue->poll_list.next, struct net_device, poll_list); -netpoll_poll_lock (dev); + have =netpoll_poll_lock (dev);if (dev->quota <=0 || dev->poll (dev, &budget)) { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);raw_local_irq_disable ();list_del (&dev->poll_list);list_add_tail (&dev->poll_list, &queue->poll_list);
net/core/dev.c line 1754
Quoted 8 lines
net/core/dev.c +1
-1@@ -1747,7 +1748,7 @@else dev->quota = dev->weight; }else { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);dev_put (dev);raw_local_irq_disable (); }
Thanx, Paul
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 10 lines · Paul E. McKenney
Good catch -- but a few changes needed to be perfectly safe:
static inline void *netpoll_poll_lock(struct net_device *dev) { struct netpoll_info *npi; rcu_read_lock(); npi = rcu_dereference(dev)->npinfo; if (have) {
Here I'm sure you mean "if (npi) {" :-)
Quoted 9 lines
spin_lock(&npi->poll_lock); npi->poll_owner = smp_processor_id(); return npi; } return NULL; }The earlier version could get in trouble if
dev->npinfowas set to NULL while this was executing.
Truth be told, I was just fixing the race with getting the npinfo pointer set between netpoll_poll_lock and netpoll_poll_unlock. I wrote a patch that fixed that but nothing with the rcu_locks. Then I looked at the current git tree and saw that they already had my changes, but also included the rcu locks. So I just (blindly) added them.
Quoted 7 lines
Again, I do not fully understand this code, so a grain of salt might come in handy. But there definitely need to be some
rcu_dereference()andrcu_assign_pointer()primitives in there somewhere. ;-)The following changes look good to me, but, as I said earlier, I do not claim to fully understand this code.
netpoll has changed quite a bit in the last few releases. I've seen lots of fixup code sent in (which usually means there's lots of new broken code ;-)
Anyway, I don't quite fully understand RCU. I read a few of the documents on your web site, but I haven't had time to really digest it. Have you taken a look at the latest git tree? The rcu_locks are used for net poll quite a bit more there.
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
In reply to Paul E. McKenneyQuoted 10 lines · Paul E. McKenney
Good catch -- but a few changes needed to be perfectly safe:
static inline void *netpoll_poll_lock(struct net_device *dev) { struct netpoll_info *npi; rcu_read_lock(); npi = rcu_dereference(dev)->npinfo; if (have) {
Here I'm sure you mean "if (npi) {" :-)
Quoted 9 lines
spin_lock(&npi->poll_lock); npi->poll_owner = smp_processor_id(); return npi; } return NULL; }The earlier version could get in trouble if
dev->npinfowas set to NULL while this was executing.
Truth be told, I was just fixing the race with getting the npinfo pointer set between netpoll_poll_lock and netpoll_poll_unlock. I wrote a patch that fixed that but nothing with the rcu_locks. Then I looked at the current git tree and saw that they already had my changes, but also included the rcu locks. So I just (blindly) added them.
Quoted 7 lines
Again, I do not fully understand this code, so a grain of salt might come in handy. But there definitely need to be some
rcu_dereference()andrcu_assign_pointer()primitives in there somewhere. ;-)The following changes look good to me, but, as I said earlier, I do not claim to fully understand this code.
netpoll has changed quite a bit in the last few releases. I've seen lots of fixup code sent in (which usually means there's lots of new broken code ;-)
Anyway, I don't quite fully understand RCU. I read a few of the documents on your web site, but I haven't had time to really digest it. Have you taken a look at the latest git tree? The rcu_locks are used for net poll quite a bit more there.
-- Steve
Re: 2.6.13-rc6-rt6
Quoted 7 lines · Steven Rostedt
Quoted 5 lines · Paul E. McKenney
Good catch -- but a few changes needed to be perfectly safe:
static inline void *netpoll_poll_lock(struct net_device *dev) {
Quoted 7 lines
Quoted 5 lines
struct netpoll_info *npi; rcu_read_lock(); npi = rcu_dereference(dev)->npinfo; if (have) {Here I'm sure you mean "if (npi) {" :-)
Right you are! ;-)
Quoted 7 lines
Quoted 7 lines
spin_lock(&npi->poll_lock); npi->poll_owner = smp_processor_id(); return npi; } return NULL; }
Quoted 8 lines
Quoted 2 lines
The earlier version could get in trouble if
dev->npinfowas set to NULL while this was executing.Truth be told, I was just fixing the race with getting the npinfo pointer set between
netpoll_poll_lockandnetpoll_poll_unlock. I wrote a patch that fixed that but nothing with thercu_locks. Then I looked at the current git tree and saw that they already had my changes, but also included the rcu locks. So I just (blindly) added them.
Understood!
Quoted 7 lines
Quoted 6 lines
Again, I do not fully understand this code, so a grain of salt might come in handy. But there definitely need to be some
rcu_dereference()andrcu_assign_pointer()primitives in there somewhere. ;-)The following changes look good to me, but, as I said earlier, I do not claim to fully understand this code.
Quoted 8 lines
netpoll has changed quite a bit in the last few releases. I've seen lots of fixup code sent in (which usually means there's lots of new broken code ;-)
Anyway, I don't quite fully understand RCU. I read a few of the documents on your web site, but I haven't had time to really digest it. Have you taken a look at the latest git tree? The
rcu_locksare used for net poll quite a bit more there.
Hmmm.... Guess it is time for me to stop procrastinating on better understanding git...
Thanx, Paul
Re: 2.6.13-rc6-rt6
In reply to Steven RostedtQuoted 7 lines · Steven Rostedt
Quoted 5 lines · Paul E. McKenney
Good catch -- but a few changes needed to be perfectly safe:
static inline void *netpoll_poll_lock(struct net_device *dev) {
Quoted 7 lines
Quoted 5 lines
struct netpoll_info *npi; rcu_read_lock(); npi = rcu_dereference(dev)->npinfo; if (have) {Here I'm sure you mean "if (npi) {" :-)
Right you are! ;-)
Quoted 7 lines
Quoted 7 lines
spin_lock(&npi->poll_lock); npi->poll_owner = smp_processor_id(); return npi; } return NULL; }
Quoted 8 lines
Quoted 2 lines
The earlier version could get in trouble if
dev->npinfowas set to NULL while this was executing.Truth be told, I was just fixing the race with getting the npinfo pointer set between
netpoll_poll_lockandnetpoll_poll_unlock. I wrote a patch that fixed that but nothing with thercu_locks. Then I looked at the current git tree and saw that they already had my changes, but also included the rcu locks. So I just (blindly) added them.
Understood!
Quoted 7 lines
Quoted 6 lines
Again, I do not fully understand this code, so a grain of salt might come in handy. But there definitely need to be some
rcu_dereference()andrcu_assign_pointer()primitives in there somewhere. ;-)The following changes look good to me, but, as I said earlier, I do not claim to fully understand this code.
Quoted 8 lines
netpoll has changed quite a bit in the last few releases. I've seen lots of fixup code sent in (which usually means there's lots of new broken code ;-)
Anyway, I don't quite fully understand RCU. I read a few of the documents on your web site, but I haven't had time to really digest it. Have you taken a look at the latest git tree? The
rcu_locksare used for net poll quite a bit more there.
Hmmm.... Guess it is time for me to stop procrastinating on better understanding git...
Thanx, Paul
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 3 lines · Paul E. McKenney
Hmmm.... Guess it is time for me to stop procrastinating on better understanding git...
Why? I still don't. Just go to http://www.kernel.org/ and download the latest git release (as of now it's -git11).
Of course you need to know the special combination :-)
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2
http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.13-rc6.bz2
http://kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.13-rc6-git11.bz2
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
In reply to Paul E. McKenneyQuoted 3 lines · Paul E. McKenney
Hmmm.... Guess it is time for me to stop procrastinating on better understanding git...
Why? I still don't. Just go to http://www.kernel.org/ and download the latest git release (as of now it's -git11).
Of course you need to know the special combination :-)
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2
http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.13-rc6.bz2
http://kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.13-rc6-git11.bz2
-- Steve
Re: 2.6.13-rc6-rt6
Quoted 5 lines · Steven Rostedt
Quoted 3 lines · Paul E. McKenney
Hmmm.... Guess it is time for me to stop procrastinating on better understanding git...
Quoted 8 lines
Why? I still don't. Just go to http://www.kernel.org/ and download the latest git release (as of now it's -git11).
Of course you need to know the special combination :-)
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2
http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.13-rc6.bz2
http://kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.13-rc6-git11.bz2
I feel very much enlightened! ;-)
Thank you very much!!!
Thanx, Paul
Re: 2.6.13-rc6-rt6
In reply to Steven RostedtQuoted 5 lines · Steven Rostedt
Quoted 3 lines · Paul E. McKenney
Hmmm.... Guess it is time for me to stop procrastinating on better understanding git...
Quoted 8 lines
Why? I still don't. Just go to http://www.kernel.org/ and download the latest git release (as of now it's -git11).
Of course you need to know the special combination :-)
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.12.tar.bz2
http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.13-rc6.bz2
http://kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.13-rc6-git11.bz2
I feel very much enlightened! ;-)
Thank you very much!!!
Thanx, Paul
Re: 2.6.13-rc6-rt6
In reply to Steven RostedtQuoted 75 lines · Steven Rostedt
Quoted 7 lines · Ingo Molnar
Quoted 7 lines
And it goes on and on. This happens everytime. Without netconsole, I only get the nonzero lock count error. Also, one of my lockups on SMP had to do with the
kernel_thread_helper:Using IPI Shortcut mode
khelper/794[CPU#0]: BUG inset_new_owneratkernel/rt.c:916This was with netconsole and showed up after a bunch of other bugs. So this is a side effect of what happened earlier.
Quoted 3 lines
this is a 'must not happen'. Somehow
lock->heldlist got non-empty. Maybe some use-after-free thing? Havent seen it myself.I started debugging netconsole with the RT patch and found this happening. After seeing what's wrong, I looked at the latest git branch, and it seems to already have a similar solution that I was going to make. Here's a description of what's wrong.
In
net/core/dev.cthe following code is innet_rx_action:netpoll_poll_lock(dev); if (dev->quota <= 0 || dev->poll(dev, &budget)) { netpoll_poll_unlock(dev); raw_local_irq_disable(); list_del(&dev->poll_list); list_add_tail(&dev->poll_list, &queue->poll_list); if (dev->quota < 0) dev->quota += dev->weight; else dev->quota = dev->weight; } else { netpoll_poll_unlock(dev);The
netpoll_poll_lockandnetpoll_poll_unlocklook like this (in current RT):static inline
netpoll_poll_lock(struct net_device *dev){ if (dev->npinfo) { spin_lock(&dev->npinfo->poll_lock); dev->npinfo->poll_owner = smp_processor_id(); } }static inline void
netpoll_poll_unlock(struct net_device *dev){ if (dev->npinfo) { dev->npinfo->poll_owner = -1; spin_unlock(&dev->npinfo->poll_lock); } }The problem here is that between
netpoll_poll_lockandnetpoll_poll_unlockthedev->npinfogets assigned. So we unlock thedev->npinfo->poll_lockwithout ever locking it.Here's the port from the latest git to solve this. I've CCed the netdev, since I'm not sure I got all the places for
rcu_lockfor the netpoll. At least to solve this problem. I did boot up the kernel and this patch did fix my bugs that I was getting using netconsole. (I have one more patch to send to fix the illegal API messages).-- Steve
Signed-off-by Steven Rostedt <[email protected]>Index:
linux_realtime_ernie/include/linux/netpoll.h
===================================================================
include/linux/netpoll.h line 61
Quoted 2 lines
include/linux/netpoll.h +0
-0@@ -60,25 +60,31 @@return ret; }
Good catch -- but a few changes needed to be perfectly safe:
static inline void *netpoll_poll_lock(struct net_device *dev)
{
struct netpoll_info *npi;
rcu_read_lock();
npi = rcu_dereference(dev)->npinfo;
if (have) {
spin_lock(&npi->poll_lock);
npi->poll_owner = smp_processor_id();
return npi;
}
return NULL;
}The earlier version could get in trouble if dev->npinfo was set to NULL while this was executing.
I am assuming that the dev pointer is really what is being RCU-protected, but this example uses mostly static data structures, so it is hard for me to tell. The npinfo pointer is not being RCU protected, as it appears to never be changed. The other candidate is the rx_np pointer, which is set to NULL in netpoll_cleanup. I suggest a modification to netpoll_cleanup below that handles both possibilities. Of course, I might well be missing something...
net/core/netpoll.c
Quoted 26 lines
include/linux/netpoll.h +8
-5-static inline void netpoll_poll_unlock (struct net_device *dev) +static inline void netpoll_poll_unlock (void *have) { -if (dev->npinfo) { - dev->npinfo->poll_owner =-1 ; -spin_unlock (&dev->npinfo->poll_lock); +struct netpoll_info *npi = have; + +if (npi) { + npi->poll_owner =-1 ; +spin_unlock (&npi->poll_lock); } +rcu_read_unlock (); }#else #define netpoll_rx (a) 0 -#define netpoll_poll_lock (a) +#define netpoll_poll_lock (a) 0#define netpoll_poll_unlock (a)#endif Index:
linux_realtime_ernie/net/core/netpoll.c
===================================================================net/core/netpoll.c +0
-0
If netpoll_setup() is implicitly tearing down an earlier netpoll_setup(), then something like Steve's change below might be needed.
net/core/netpoll.c line 734
Quoted 10 lines
net/core/netpoll.c +3
-0@@ -726,6 +726,9 @@/* last thing to do is link it to the net device structure */ ndev->npinfo = npinfo; +/* avoid racing with NAPI reading npinfo */ +synchronize_rcu (); +return 0 ; release:
Assuming that it is legal to block in netpoll_cleanup(), the following should work. The idea is to NULL the dev pointer, wait for all RCU readers to get done, and only then complete the cleanup.
void netpoll_cleanup(struct netpoll *np)
{
struct netpoll_info *npinfo;
unsigned long flags;
struct net_device *dp;
if (np->dev) {
dp = np->dev;
rcu_assign_pointer(np->dev, NULL);
synchronize_rcu();
npinfo = dp->npinfo;
if (npinfo && npinfo->rx_np == np) {
spin_lock_irqsave(&npinfo->rx_lock, flags);
npinfo->rx_np = NULL;
npinfo->rx_flags &= ~NETPOLL_RX_ENABLED;
spin_unlock_irqrestore(&npinfo->rx_lock, flags);
}
dev_put(dp);
}
}Again, I do not fully understand this code, so a grain of salt might come in handy. But there definitely need to be some rcu_dereference() and rcu_assign_pointer() primitives in there somewhere. ;-)
The following changes look good to me, but, as I said earlier, I do not claim to fully understand this code.
Quoted 26 lines
Index:
linux_realtime_ernie/net/core/dev.c
===================================================================net/core/dev.c +3
-2@@ -1723,6 +1723,7 @@while (!list_empty (&queue->poll_list)) {struct net_device *dev; +void *have;if (budget <=0 || jiffies - start_time >1 ) goto softnet_break;@@ -1735,10 +1736,10 @@ dev =list_entry (queue->poll_list.next, struct net_device, poll_list); -netpoll_poll_lock (dev); + have =netpoll_poll_lock (dev);if (dev->quota <=0 || dev->poll (dev, &budget)) { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);raw_local_irq_disable ();list_del (&dev->poll_list);list_add_tail (&dev->poll_list, &queue->poll_list);
net/core/dev.c line 1754
Quoted 8 lines
net/core/dev.c +1
-1@@ -1747,7 +1748,7 @@else dev->quota = dev->weight; }else { -netpoll_poll_unlock (dev); +netpoll_poll_unlock (have);dev_put (dev);raw_local_irq_disable (); }
Thanx, Paul
Ingo Molnar
AppliedRe: 2.6.13-rc6-rt6
In reply to Steven RostedtQuoted 3 lines · Steven Rostedt
Here's the port from the latest git to solve this.
Signed-off-by Steven Rostedt <[email protected]>
thanks, applied.
Ingo
Re: 2.6.13-rc6-rt6
In reply to Steven RostedtQuoted 8 lines · Steven Rostedt
Quoted 3 lines · Steven Rostedt
OK the output from netconsole still seems like netconsole itself is causing some problems. But I think it is also showing this lockup. I'll recompile my kernel as UP and see if netconsole works fine.
Well, the UP kernel boots on my laptop, but netconsole gives strange warnings.
Now that printk is in essence preemptible, there shouldnt be any warnings from netconsole - if there are any then it should be possible to fix them.
Ingo
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 5 lines · Ingo Molnar
Now that printk is in essence preemptible, there shouldnt be any warnings from netconsole - if there are any then it should be possible to fix them.
Then I guess write_msg in netconsole.c needs to remove all the local_irq_disable and enables.
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
In reply to Ingo MolnarQuoted 5 lines · Ingo Molnar
but
stop_machine()looks quite preempt-unsafe to begin with. Thelocal_irq_disable()would not be needed at all if prior thefor_each_online_cpu()loop we'd useset_cpus_allowed. The current method of achieving 'no preemption' is simply racy even during normalCONFIG_PREEMPT.
The code does look flakey, but I think it still works, and it may need to have a raw_local_irq_disable.
The do_stop is bound to a CPU when it was created, so it doesn't need to have a set_cpus_allowed.
I guess this is what is happening:
---
You start do_stop in a thread on the cpu that you want to run a function on. (it's bound to that cpu)
do_stop creates a thread on all the other cpus that will run stopmachine.
While it creates the threads, the ones that are already created yield in case a thread wakes up on its cpu, so that that thread can migrate to its own cpu. (all the threads are at FIFO MAX_RT_PRIO-1, so they should never be preempted.
After all the threads are created and acknowledge themselves, the do_stop changes the state to PREPARE.
In stopmachine, when PREPARE is seen, it turns off preemption and stops yielding.
do_stop then changes the state to DISABLE_IRQ.
In stopmachine, when DISABLE_IRQ is seen, it disables IRQs.
Then the do_stop runs the function that is expected to run in the STOPPED STATE.
---
Notes:
Each time the state is changed, the ack counter is zeroed and it wont continue until all the threads acknowledge they hit the expected point.
I'm currious why it needs to go to preempt disable before going to irqs_disabled? It seems that once it is at the point to go, all processes should be locked on their CPUS and it would only need to goto irqs_disable.
I'm also assuming that whatever function is being run expects to have interrupts off on all CPUs. So a raw_local_irq_disable may be in order.
The comment above the stop_machine (called by do_stop) local_irq_disable looks incorrect. It says
/* Don't schedule us away at this point, please */ I don't see how it can be scheduled out if it is running FIFO MAX_RT_PRIO-1. It just assume that it doesn't want any interrupts to go off.
Do you still see a problem with stop_machine?
-- Steve
Steven Rostedt
reviewerRe: 2.6.13-rc6-rt6
Quoted 10 lines · Steven Rostedt
Quoted 5 lines · Ingo Molnar
but
stop_machine()looks quite preempt-unsafe to begin with. Thelocal_irq_disable()would not be needed at all if prior thefor_each_online_cpu()loop we'd useset_cpus_allowed. The current method of achieving 'no preemption' is simply racy even during normalCONFIG_PREEMPT.The code does look flakey, but I think it still works, and it may need to have a
raw_local_irq_disable.
I added this patch to my AMD box is it runs fine. So I'm assuming that we do actually want interrupts disabled here.
-- Steve
kernel/stop_machine.c +4 -4
@@ -40,7 +40,7 @@while (stopmachine_state !=STOPMACHINE_EXIT ) {if (stopmachine_state ==STOPMACHINE_DISABLE_IRQ && !irqs_disabled) { -local_irq_disable (); +raw_local_irq_disable (); irqs_disabled =1 ;/* Ack: irqs disabled. */ smp_mb ();/* Must read state first. */
@@ -66,7 +66,7 @@atomic_inc (&stopmachine_thread_ack);if (irqs_disabled) -local_irq_enable (); +raw_local_irq_enable ();if (prepared)preempt_enable ();
@@ -120,7 +120,7 @@ }/* Don't schedule us away at this point, please. */ -local_irq_disable (); +raw_local_irq_disable ();/* Now they are all started, make them hold the CPUs, ready. */ stopmachine_set_state (STOPMACHINE_PREPARE );
@@ -134,7 +134,7 @@static void restart_machine (void ) {stopmachine_set_state (STOPMACHINE_EXIT ); -local_irq_enable (); +raw_local_irq_enable (); }struct stop_machine_data
Re: 2.6.13-rc6-rt6
In reply to Steven RostedtQuoted 4 lines · Steven Rostedt
Since the change made
raw_local_save_flagsthe same for bothPREEMPT_RTand !PREEMPT_RT, I moved it out of the #ifdef altogether. The__raw_local_save_flagsalready does the type checking (at least for intel).
ok, i've applied this one. Indeed it's pointless to trace the local_save_flags API.
Ingo
Re: 2.6.13-rc6-rt8
In reply to Ingo Molnar2.6.13-rc6-rt8 fails to build with my configuration (attached):
net/built-in.o: In function `ip_rt_init':
: undefined reference to `__you_cannot_kmalloc_that_much' make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6.13-rc6'
make: *** [stamp-build] Error 2
Signature · 1 line
Peter Bortas http://peter.bortas.org
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.13-rc6-rt8.050817
# Wed Aug 17 21:16:42 2005
#CONFIG_X86=yCONFIG_MMU=yCONFIG_UID16=yCONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_IOMAP=y
#
# Code maturity level options
#CONFIG_EXPERIMENTAL=y
# CONFIG_CLEAN_COMPILE is not setCONFIG_BROKEN=yCONFIG_BROKEN_ON_SMP=yCONFIG_LOCK_KERNEL=yCONFIG_INIT_ENV_ARG_LIMIT=32
#
# General setup
#CONFIG_LOCALVERSION=""CONFIG_SWAP=yCONFIG_SYSVIPC=yCONFIG_POSIX_MQUEUE=yCONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not setCONFIG_SYSCTL=yCONFIG_AUDIT=yCONFIG_AUDITSYSCALL=yCONFIG_HOTPLUG=yCONFIG_KOBJECT_UEVENT=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=y
# CONFIG_CPUSETS is not set
# CONFIG_EMBEDDED is not setCONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not setCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SHMEM=yCONFIG_CC_ALIGN_FUNCTIONS=0CONFIG_CC_ALIGN_LABELS=0CONFIG_CC_ALIGN_LOOPS=0CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not setCONFIG_BASE_SMALL=0
#
# Loadable module support
#CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not setCONFIG_KMOD=yCONFIG_STOP_MACHINE=y
#
# Processor type and features
#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_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 is not setCONFIG_MPENTIUM4=y
# 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_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not setCONFIG_X86_GENERIC=yCONFIG_X86_CMPXCHG=yCONFIG_X86_XADD=yCONFIG_X86_L1_CACHE_SHIFT=7CONFIG_GENERIC_CALIBRATE_DELAY=yCONFIG_X86_WP_WORKS_OK=yCONFIG_X86_INVLPG=yCONFIG_X86_BSWAP=yCONFIG_X86_POPAD_OK=yCONFIG_X86_GOOD_APIC=yCONFIG_X86_INTEL_USERCOPY=yCONFIG_X86_USE_PPRO_CHECKSUM=y
# CONFIG_LEGACY_TIMER is not setCONFIG_HPET_TIMER=y
# CONFIG_HIGH_RES_TIMERS is not setCONFIG_SMP=yCONFIG_NR_CPUS=32CONFIG_SCHED_SMT=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT_DESKTOP is not setCONFIG_PREEMPT_RT=yCONFIG_PREEMPT=yCONFIG_PREEMPT_SOFTIRQS=yCONFIG_PREEMPT_HARDIRQS=yCONFIG_PREEMPT_BKL=yCONFIG_PREEMPT_RCU=yCONFIG_RCU_STATS=yCONFIG_RCU_TORTURE_TEST=yCONFIG_RWSEM_GENERIC_SPINLOCK=yCONFIG_ASM_SEMAPHORES=yCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_IOAPIC_FAST=yCONFIG_X86_TSC=yCONFIG_X86_MCE=y
# CONFIG_X86_MCE_NONFATAL is not set
# CONFIG_X86_MCE_P4THERMAL is not setCONFIG_TOSHIBA=mCONFIG_I8K=m
# CONFIG_X86_REBOOTFIXUPS is not setCONFIG_MICROCODE=mCONFIG_X86_MSR=mCONFIG_X86_CPUID=m
#
# Firmware Drivers
#CONFIG_EDD=m
# CONFIG_NOHIGHMEM is not setCONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not setCONFIG_HIGHMEM=yCONFIG_SELECT_MEMORY_MODEL=yCONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not setCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_HIGHPTE is not set
# CONFIG_MATH_EMULATION is not setCONFIG_MTRR=y
# CONFIG_EFI is not setCONFIG_IRQBALANCE=yCONFIG_HAVE_DEC_LOCK=yCONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not setCONFIG_HZ_1000=yCONFIG_HZ=1000CONFIG_PHYSICAL_START=0x100000
# CONFIG_KEXEC is not set
#
# Power management options (ACPI, APM)
#CONFIG_PM=y
# CONFIG_PM_DEBUG is not setCONFIG_SOFTWARE_SUSPEND=yCONFIG_PM_STD_PARTITION=""
#
# ACPI (Advanced Configuration and Power Interface) Support #CONFIG_ACPI=yCONFIG_ACPI_BOOT=yCONFIG_ACPI_INTERPRETER=yCONFIG_ACPI_AC=mCONFIG_ACPI_BATTERY=mCONFIG_ACPI_BUTTON=mCONFIG_ACPI_VIDEO=m
# CONFIG_ACPI_HOTKEY is not setCONFIG_ACPI_FAN=mCONFIG_ACPI_PROCESSOR=mCONFIG_ACPI_THERMAL=mCONFIG_ACPI_ASUS=m
# CONFIG_ACPI_IBM is not setCONFIG_ACPI_TOSHIBA=mCONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not setCONFIG_ACPI_BUS=yCONFIG_ACPI_EC=yCONFIG_ACPI_POWER=yCONFIG_ACPI_PCI=yCONFIG_ACPI_SYSTEM=yCONFIG_X86_PM_TIMER=y
# CONFIG_ACPI_CONTAINER is not set
#
# APM (Advanced Power Management) BIOS Support
#CONFIG_APM=m
# CONFIG_APM_IGNORE_USER_SUSPEND is not setCONFIG_APM_DO_ENABLE=y
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not setCONFIG_APM_ALLOW_INTS=y
# CONFIG_APM_REAL_MODE_POWER_OFF is not set
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_TABLE=m
# CONFIG_CPU_FREQ_DEBUG is not set CONFIG_CPU_FREQ_STAT=m
# CONFIG_CPU_FREQ_STAT_DETAILS is not set CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=m CONFIG_CPU_FREQ_GOV_USERSPACE=m CONFIG_CPU_FREQ_GOV_ONDEMAND=m
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
#
# CPUFreq processor drivers
#CONFIG_X86_ACPI_CPUFREQ=mCONFIG_X86_POWERNOW_K6=mCONFIG_X86_POWERNOW_K7=mCONFIG_X86_POWERNOW_K7_ACPI=yCONFIG_X86_POWERNOW_K8=mCONFIG_X86_POWERNOW_K8_ACPI=yCONFIG_X86_GX_SUSPMOD=mCONFIG_X86_SPEEDSTEP_CENTRINO=mCONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=yCONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=yCONFIG_X86_SPEEDSTEP_ICH=mCONFIG_X86_SPEEDSTEP_SMI=mCONFIG_X86_P4_CLOCKMOD=m
# CONFIG_X86_CPUFREQ_NFORCE2 is not setCONFIG_X86_LONGRUN=mCONFIG_X86_LONGHAUL=m
#
# shared options # CONFIG_X86_ACPI_CPUFREQ_PROC_INTF=y CONFIG_X86_SPEEDSTEP_LIB=m CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y
#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not setCONFIG_PCI_GOANY=yCONFIG_PCI_BIOS=yCONFIG_PCI_DIRECT=yCONFIG_PCI_MMCONFIG=y
# CONFIG_PCIEPORTBUS is not set
# CONFIG_PCI_MSI is not setCONFIG_PCI_LEGACY_PROC=yCONFIG_PCI_NAMES=y
# CONFIG_PCI_DEBUG is not setCONFIG_ISA_DMA_API=yCONFIG_ISA=yCONFIG_EISA=yCONFIG_EISA_VLB_PRIMING=yCONFIG_EISA_PCI_EISA=yCONFIG_EISA_VIRTUAL_ROOT=yCONFIG_EISA_NAMES=yCONFIG_MCA=yCONFIG_MCA_LEGACY=yCONFIG_MCA_PROC_FS=y
CONFIG_SCx200=m
# CONFIG_HOTPLUG_CPU is not set
#
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set
#
# PCI Hotplug Support
#CONFIG_HOTPLUG_PCI=m CONFIG_HOTPLUG_PCI_FAKE=m CONFIG_HOTPLUG_PCI_COMPAQ=m
# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set CONFIG_HOTPLUG_PCI_IBM=m CONFIG_HOTPLUG_PCI_ACPI=m
# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set CONFIG_HOTPLUG_PCI_CPCI=y CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m CONFIG_HOTPLUG_PCI_SHPC=m
# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
#
# Executable file formats
#CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not setCONFIG_BINFMT_MISC=m
#
# Networking
#CONFIG_NET=y
#
# Networking options
#CONFIG_PACKET=mCONFIG_PACKET_MMAP=yCONFIG_UNIX=yCONFIG_XFRM=yCONFIG_XFRM_USER=mCONFIG_NET_KEY=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IP_ADVANCED_ROUTER=yCONFIG_ASK_IP_FIB_HASH=y
# CONFIG_IP_FIB_TRIE is not setCONFIG_IP_FIB_HASH=yCONFIG_IP_MULTIPLE_TABLES=yCONFIG_IP_ROUTE_FWMARK=y
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_PNP is not setCONFIG_NET_IPIP=mCONFIG_NET_IPGRE=m
# CONFIG_NET_IPGRE_BROADCAST is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not setCONFIG_SYN_COOKIES=yCONFIG_INET_AH=mCONFIG_INET_ESP=mCONFIG_INET_IPCOMP=mCONFIG_INET_TUNNEL=mCONFIG_IP_TCPDIAG=mCONFIG_IP_TCPDIAG_IPV6=y
# CONFIG_TCP_CONG_ADVANCED is not setCONFIG_TCP_CONG_BIC=y
#
# IP: Virtual Server Configuration
#CONFIG_IP_VS=m
# CONFIG_IP_VS_DEBUG is not setCONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#CONFIG_IP_VS_PROTO_TCP=yCONFIG_IP_VS_PROTO_UDP=yCONFIG_IP_VS_PROTO_ESP=yCONFIG_IP_VS_PROTO_AH=y
#
# IPVS scheduler
#CONFIG_IP_VS_RR=mCONFIG_IP_VS_WRR=mCONFIG_IP_VS_LC=mCONFIG_IP_VS_WLC=mCONFIG_IP_VS_LBLC=mCONFIG_IP_VS_LBLCR=mCONFIG_IP_VS_DH=mCONFIG_IP_VS_SH=mCONFIG_IP_VS_SED=mCONFIG_IP_VS_NQ=m
#
# IPVS application helper
#CONFIG_IP_VS_FTP=mCONFIG_IPV6=mCONFIG_IPV6_PRIVACY=yCONFIG_INET6_AH=mCONFIG_INET6_ESP=mCONFIG_INET6_IPCOMP=mCONFIG_INET6_TUNNEL=mCONFIG_IPV6_TUNNEL=mCONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not setCONFIG_BRIDGE_NETFILTER=y
#
# IP: Netfilter Configuration
#CONFIG_IP_NF_CONNTRACK=mCONFIG_IP_NF_CT_ACCT=yCONFIG_IP_NF_CONNTRACK_MARK=y
# CONFIG_IP_NF_CT_PROTO_SCTP is not setCONFIG_IP_NF_FTP=mCONFIG_IP_NF_IRC=mCONFIG_IP_NF_TFTP=mCONFIG_IP_NF_AMANDA=mCONFIG_IP_NF_QUEUE=mCONFIG_IP_NF_IPTABLES=mCONFIG_IP_NF_MATCH_LIMIT=mCONFIG_IP_NF_MATCH_IPRANGE=mCONFIG_IP_NF_MATCH_MAC=mCONFIG_IP_NF_MATCH_PKTTYPE=mCONFIG_IP_NF_MATCH_MARK=mCONFIG_IP_NF_MATCH_MULTIPORT=mCONFIG_IP_NF_MATCH_TOS=mCONFIG_IP_NF_MATCH_RECENT=mCONFIG_IP_NF_MATCH_ECN=mCONFIG_IP_NF_MATCH_DSCP=mCONFIG_IP_NF_MATCH_AH_ESP=mCONFIG_IP_NF_MATCH_LENGTH=mCONFIG_IP_NF_MATCH_TTL=mCONFIG_IP_NF_MATCH_TCPMSS=mCONFIG_IP_NF_MATCH_HELPER=mCONFIG_IP_NF_MATCH_STATE=mCONFIG_IP_NF_MATCH_CONNTRACK=mCONFIG_IP_NF_MATCH_OWNER=mCONFIG_IP_NF_MATCH_PHYSDEV=m
# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
# CONFIG_IP_NF_MATCH_REALM is not setCONFIG_IP_NF_MATCH_SCTP=mCONFIG_IP_NF_MATCH_COMMENT=mCONFIG_IP_NF_MATCH_CONNMARK=mCONFIG_IP_NF_MATCH_HASHLIMIT=mCONFIG_IP_NF_FILTER=mCONFIG_IP_NF_TARGET_REJECT=mCONFIG_IP_NF_TARGET_LOG=mCONFIG_IP_NF_TARGET_ULOG=mCONFIG_IP_NF_TARGET_TCPMSS=mCONFIG_IP_NF_NAT=mCONFIG_IP_NF_NAT_NEEDED=yCONFIG_IP_NF_TARGET_MASQUERADE=mCONFIG_IP_NF_TARGET_REDIRECT=mCONFIG_IP_NF_TARGET_NETMAP=mCONFIG_IP_NF_TARGET_SAME=mCONFIG_IP_NF_NAT_SNMP_BASIC=mCONFIG_IP_NF_NAT_IRC=mCONFIG_IP_NF_NAT_FTP=mCONFIG_IP_NF_NAT_TFTP=mCONFIG_IP_NF_NAT_AMANDA=mCONFIG_IP_NF_MANGLE=mCONFIG_IP_NF_TARGET_TOS=mCONFIG_IP_NF_TARGET_ECN=mCONFIG_IP_NF_TARGET_DSCP=mCONFIG_IP_NF_TARGET_MARK=mCONFIG_IP_NF_TARGET_CLASSIFY=mCONFIG_IP_NF_TARGET_CONNMARK=mCONFIG_IP_NF_TARGET_CLUSTERIP=mCONFIG_IP_NF_RAW=mCONFIG_IP_NF_TARGET_NOTRACK=mCONFIG_IP_NF_ARPTABLES=mCONFIG_IP_NF_ARPFILTER=mCONFIG_IP_NF_ARP_MANGLE=m
#
# IPv6: Netfilter Configuration (EXPERIMENTAL)
#CONFIG_IP6_NF_QUEUE=mCONFIG_IP6_NF_IPTABLES=mCONFIG_IP6_NF_MATCH_LIMIT=mCONFIG_IP6_NF_MATCH_MAC=mCONFIG_IP6_NF_MATCH_RT=mCONFIG_IP6_NF_MATCH_OPTS=mCONFIG_IP6_NF_MATCH_FRAG=mCONFIG_IP6_NF_MATCH_HL=mCONFIG_IP6_NF_MATCH_MULTIPORT=mCONFIG_IP6_NF_MATCH_OWNER=mCONFIG_IP6_NF_MATCH_MARK=mCONFIG_IP6_NF_MATCH_IPV6HEADER=mCONFIG_IP6_NF_MATCH_AHESP=mCONFIG_IP6_NF_MATCH_LENGTH=mCONFIG_IP6_NF_MATCH_EUI64=mCONFIG_IP6_NF_MATCH_PHYSDEV=mCONFIG_IP6_NF_FILTER=mCONFIG_IP6_NF_TARGET_LOG=mCONFIG_IP6_NF_MANGLE=mCONFIG_IP6_NF_TARGET_MARK=mCONFIG_IP6_NF_RAW=m
#
# DECnet: Netfilter Configuration
#CONFIG_DECNET_NF_GRABULATOR=m
#
# Bridge: Netfilter Configuration
#CONFIG_BRIDGE_NF_EBTABLES=mCONFIG_BRIDGE_EBT_BROUTE=mCONFIG_BRIDGE_EBT_T_FILTER=mCONFIG_BRIDGE_EBT_T_NAT=mCONFIG_BRIDGE_EBT_802_3=mCONFIG_BRIDGE_EBT_AMONG=mCONFIG_BRIDGE_EBT_ARP=mCONFIG_BRIDGE_EBT_IP=mCONFIG_BRIDGE_EBT_LIMIT=mCONFIG_BRIDGE_EBT_MARK=mCONFIG_BRIDGE_EBT_PKTTYPE=mCONFIG_BRIDGE_EBT_STP=mCONFIG_BRIDGE_EBT_VLAN=mCONFIG_BRIDGE_EBT_ARPREPLY=mCONFIG_BRIDGE_EBT_DNAT=mCONFIG_BRIDGE_EBT_MARK_T=mCONFIG_BRIDGE_EBT_REDIRECT=mCONFIG_BRIDGE_EBT_SNAT=mCONFIG_BRIDGE_EBT_LOG=mCONFIG_BRIDGE_EBT_ULOG=m
#
# SCTP Configuration (EXPERIMENTAL)
#CONFIG_IP_SCTP=m
# CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not setCONFIG_SCTP_HMAC_NONE=y
# CONFIG_SCTP_HMAC_SHA1 is not set
# CONFIG_SCTP_HMAC_MD5 is not setCONFIG_ATM=mCONFIG_ATM_CLIP=mCONFIG_ATM_CLIP_NO_ICMP=yCONFIG_ATM_LANE=mCONFIG_ATM_MPOA=mCONFIG_ATM_BR2684=m
# CONFIG_ATM_BR2684_IPFILTER is not setCONFIG_BRIDGE=mCONFIG_VLAN_8021Q=mCONFIG_DECNET=mCONFIG_DECNET_ROUTER=yCONFIG_DECNET_ROUTE_FWMARK=yCONFIG_LLC=yCONFIG_LLC2=mCONFIG_IPX=mCONFIG_IPX_INTERN=yCONFIG_ATALK=mCONFIG_DEV_APPLETALK=yCONFIG_LTPC=mCONFIG_COPS=mCONFIG_COPS_DAYNA=yCONFIG_COPS_TANGENT=yCONFIG_IPDDP=mCONFIG_IPDDP_ENCAP=yCONFIG_IPDDP_DECAP=yCONFIG_X25=mCONFIG_LAPB=m
# CONFIG_NET_DIVERT is not setCONFIG_ECONET=mCONFIG_ECONET_AUNUDP=yCONFIG_ECONET_NATIVE=yCONFIG_WAN_ROUTER=m
# CONFIG_NET_SCHED is not set
# CONFIG_NET_CLS_ROUTE is not set
#
# Network testing
#CONFIG_NET_PKTGEN=mCONFIG_HAMRADIO=y
#
# Packet Radio protocols
#CONFIG_AX25=mCONFIG_AX25_DAMA_SLAVE=yCONFIG_NETROM=mCONFIG_ROSE=m
#
# AX.25 network device drivers
#CONFIG_MKISS=mCONFIG_6PACK=mCONFIG_BPQETHER=mCONFIG_DMASCC=mCONFIG_SCC=mCONFIG_SCC_DELAY=yCONFIG_SCC_TRXECHO=yCONFIG_BAYCOM_SER_FDX=mCONFIG_BAYCOM_SER_HDX=mCONFIG_BAYCOM_PAR=mCONFIG_BAYCOM_EPP=mCONFIG_YAM=mCONFIG_IRDA=m
#
# IrDA protocols
#CONFIG_IRLAN=mCONFIG_IRNET=mCONFIG_IRCOMM=mCONFIG_IRDA_ULTRA=y
#
# IrDA options
#CONFIG_IRDA_CACHE_LAST_LSAP=yCONFIG_IRDA_FAST_RR=y
# CONFIG_IRDA_DEBUG is not set
#
# Infrared-port device drivers
#
#
# SIR device drivers
#CONFIG_IRTTY_SIR=m
#
# Dongle support
#CONFIG_DONGLE=yCONFIG_ESI_DONGLE=mCONFIG_ACTISYS_DONGLE=mCONFIG_TEKRAM_DONGLE=mCONFIG_LITELINK_DONGLE=mCONFIG_MA600_DONGLE=mCONFIG_GIRBIL_DONGLE=mCONFIG_MCP2120_DONGLE=mCONFIG_OLD_BELKIN_DONGLE=mCONFIG_ACT200L_DONGLE=m
#
# Old SIR device drivers
#CONFIG_IRPORT_SIR=m
#
# Old Serial dongle support
#CONFIG_DONGLE_OLD=yCONFIG_ESI_DONGLE_OLD=mCONFIG_ACTISYS_DONGLE_OLD=mCONFIG_TEKRAM_DONGLE_OLD=mCONFIG_GIRBIL_DONGLE_OLD=mCONFIG_LITELINK_DONGLE_OLD=mCONFIG_MCP2120_DONGLE_OLD=mCONFIG_OLD_BELKIN_DONGLE_OLD=mCONFIG_ACT200L_DONGLE_OLD=mCONFIG_MA600_DONGLE_OLD=m
#
# FIR device drivers
#CONFIG_USB_IRDA=mCONFIG_SIGMATEL_FIR=mCONFIG_NSC_FIR=mCONFIG_WINBOND_FIR=mCONFIG_TOSHIBA_FIR=mCONFIG_SMC_IRCC_FIR=mCONFIG_ALI_FIR=mCONFIG_VLSI_FIR=mCONFIG_VIA_FIR=mCONFIG_BT=mCONFIG_BT_L2CAP=mCONFIG_BT_SCO=mCONFIG_BT_RFCOMM=mCONFIG_BT_RFCOMM_TTY=yCONFIG_BT_BNEP=mCONFIG_BT_BNEP_MC_FILTER=yCONFIG_BT_BNEP_PROTO_FILTER=y
# CONFIG_BT_HIDP is not set
#
# Bluetooth device drivers
#CONFIG_BT_HCIUSB=mCONFIG_BT_HCIUSB_SCO=yCONFIG_BT_HCIUART=mCONFIG_BT_HCIUART_H4=yCONFIG_BT_HCIUART_BCSP=yCONFIG_BT_HCIUART_BCSP_TXCRC=yCONFIG_BT_HCIBCM203X=mCONFIG_BT_HCIBPA10X=mCONFIG_BT_HCIBFUSB=mCONFIG_BT_HCIVHCI=m
#
# Device Drivers
#
#
# Generic Driver Options
#CONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_FW_LOADER=m
# CONFIG_DEBUG_DRIVER is not set
#
# Memory Technology Devices (MTD)
#CONFIG_MTD=m
# CONFIG_MTD_DEBUG is not setCONFIG_MTD_CONCAT=m
# CONFIG_MTD_PARTITIONS is not set
#
# User Modules And Translation Layers
#CONFIG_MTD_CHAR=mCONFIG_MTD_BLOCK=mCONFIG_MTD_BLOCK_RO=mCONFIG_FTL=mCONFIG_NFTL=mCONFIG_NFTL_RW=yCONFIG_INFTL=m
#
# RAM/ROM/Flash chip drivers
#CONFIG_MTD_CFI=mCONFIG_MTD_JEDECPROBE=mCONFIG_MTD_GEN_PROBE=m
# CONFIG_MTD_CFI_ADV_OPTIONS is not setCONFIG_MTD_MAP_BANK_WIDTH_1=yCONFIG_MTD_MAP_BANK_WIDTH_2=yCONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not setCONFIG_MTD_CFI_I1=yCONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not setCONFIG_MTD_CFI_INTELEXT=mCONFIG_MTD_CFI_AMDSTD=mCONFIG_MTD_CFI_AMDSTD_RETRY=0CONFIG_MTD_CFI_STAA=mCONFIG_MTD_CFI_UTIL=mCONFIG_MTD_RAM=mCONFIG_MTD_ROM=mCONFIG_MTD_ABSENT=m
# CONFIG_MTD_OBSOLETE_CHIPS is not set
#
# Mapping drivers for chip access
#CONFIG_MTD_COMPLEX_MAPPINGS=yCONFIG_MTD_PHYSMAP=mCONFIG_MTD_PHYSMAP_START=0x8000000CONFIG_MTD_PHYSMAP_LEN=0x4000000CONFIG_MTD_PHYSMAP_BANKWIDTH=2CONFIG_MTD_SC520CDP=mCONFIG_MTD_AMD76XROM=m
# CONFIG_MTD_ICHXROM is not setCONFIG_MTD_SCB2_FLASH=mCONFIG_MTD_L440GX=mCONFIG_MTD_PCI=m
# CONFIG_MTD_PLATRAM is not set
#
# Self-contained MTD device drivers
#CONFIG_MTD_PMC551=mCONFIG_MTD_PMC551_BUGFIX=y
# CONFIG_MTD_PMC551_DEBUG is not setCONFIG_MTD_SLRAM=m
# CONFIG_MTD_PHRAM is not setCONFIG_MTD_MTDRAM=mCONFIG_MTDRAM_TOTAL_SIZE=4096CONFIG_MTDRAM_ERASE_SIZE=128CONFIG_MTD_BLKMTD=m
# CONFIG_MTD_BLOCK2MTD is not set
#
# Disk-On-Chip Device Drivers
#CONFIG_MTD_DOC2000=mCONFIG_MTD_DOC2001=mCONFIG_MTD_DOC2001PLUS=mCONFIG_MTD_DOCPROBE=mCONFIG_MTD_DOCECC=m
# CONFIG_MTD_DOCPROBE_ADVANCED is not setCONFIG_MTD_DOCPROBE_ADDRESS=0
#
# NAND Flash Device Drivers
#CONFIG_MTD_NAND=m
# CONFIG_MTD_NAND_VERIFY_WRITE is not setCONFIG_MTD_NAND_IDS=m
# CONFIG_MTD_NAND_DISKONCHIP is not set
#
# Parallel port support
#CONFIG_PARPORT=mCONFIG_PARPORT_PC=mCONFIG_PARPORT_SERIAL=mCONFIG_PARPORT_PC_FIFO=yCONFIG_PARPORT_PC_SUPERIO=yCONFIG_PARPORT_NOT_PC=y
# CONFIG_PARPORT_GSC is not setCONFIG_PARPORT_1284=y
#
# Plug and Play support
#CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set
#
# Protocols
#CONFIG_ISAPNP=yCONFIG_PNPBIOS=yCONFIG_PNPBIOS_PROC_FS=yCONFIG_PNPACPI=y
#
# Block devices
#CONFIG_BLK_DEV_FD=yCONFIG_BLK_DEV_PS2=mCONFIG_BLK_DEV_XD=mCONFIG_PARIDE=mCONFIG_PARIDE_PARPORT=m
#
# Parallel IDE high-level drivers
#CONFIG_PARIDE_PD=mCONFIG_PARIDE_PCD=mCONFIG_PARIDE_PF=mCONFIG_PARIDE_PT=mCONFIG_PARIDE_PG=m
#
# Parallel IDE protocol modules
#CONFIG_PARIDE_ATEN=mCONFIG_PARIDE_BPCK=mCONFIG_PARIDE_BPCK6=mCONFIG_PARIDE_COMM=mCONFIG_PARIDE_DSTR=mCONFIG_PARIDE_FIT2=mCONFIG_PARIDE_FIT3=mCONFIG_PARIDE_EPAT=mCONFIG_PARIDE_EPATC8=yCONFIG_PARIDE_EPIA=mCONFIG_PARIDE_FRIQ=mCONFIG_PARIDE_FRPW=mCONFIG_PARIDE_KBIC=mCONFIG_PARIDE_KTTI=mCONFIG_PARIDE_ON20=mCONFIG_PARIDE_ON26=mCONFIG_BLK_CPQ_DA=mCONFIG_BLK_CPQ_CISS_DA=mCONFIG_CISS_SCSI_TAPE=yCONFIG_BLK_DEV_DAC960=mCONFIG_BLK_DEV_UMEM=m
# CONFIG_BLK_DEV_COW_COMMON is not setCONFIG_BLK_DEV_LOOP=mCONFIG_BLK_DEV_CRYPTOLOOP=mCONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not setCONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_COUNT=16CONFIG_BLK_DEV_RAM_SIZE=4096CONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE=""CONFIG_LBD=yCONFIG_CDROM_PKTCDVD=mCONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
#
# IO Schedulers
#CONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_AS=yCONFIG_IOSCHED_DEADLINE=yCONFIG_IOSCHED_CFQ=y
# CONFIG_ATA_OVER_ETH is not set
#
# ATA/ATAPI/MFM/RLL support
#CONFIG_IDE=yCONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives #
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=yCONFIG_IDEDISK_MULTI_MODE=yCONFIG_BLK_DEV_IDECD=mCONFIG_BLK_DEV_IDETAPE=mCONFIG_BLK_DEV_IDEFLOPPY=mCONFIG_BLK_DEV_IDESCSI=mCONFIG_IDE_TASK_IOCTL=y
#
# IDE chipset support/bugfixes
#CONFIG_IDE_GENERIC=yCONFIG_BLK_DEV_CMD640=yCONFIG_BLK_DEV_CMD640_ENHANCED=yCONFIG_BLK_DEV_IDEPNP=yCONFIG_BLK_DEV_IDEPCI=yCONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not setCONFIG_BLK_DEV_GENERIC=yCONFIG_BLK_DEV_OPTI621=yCONFIG_BLK_DEV_RZ1000=yCONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
# CONFIG_IDEDMA_PCI_AUTO is not setCONFIG_BLK_DEV_AEC62XX=yCONFIG_BLK_DEV_ALI15X3=y
# CONFIG_WDC_ALI15X3 is not setCONFIG_BLK_DEV_AMD74XX=yCONFIG_BLK_DEV_ATIIXP=yCONFIG_BLK_DEV_CMD64X=yCONFIG_BLK_DEV_TRIFLEX=yCONFIG_BLK_DEV_CY82C693=yCONFIG_BLK_DEV_CS5520=yCONFIG_BLK_DEV_CS5530=yCONFIG_BLK_DEV_HPT34X=y
# CONFIG_HPT34X_AUTODMA is not setCONFIG_BLK_DEV_HPT366=yCONFIG_BLK_DEV_SC1200=yCONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_IT821X is not setCONFIG_BLK_DEV_NS87415=yCONFIG_BLK_DEV_PDC202XX_OLD=y
# CONFIG_PDC202XX_BURST is not setCONFIG_BLK_DEV_PDC202XX_NEW=yCONFIG_PDC202XX_FORCE=yCONFIG_BLK_DEV_SVWKS=yCONFIG_BLK_DEV_SIIMAGE=yCONFIG_BLK_DEV_SIS5513=yCONFIG_BLK_DEV_SLC90E66=yCONFIG_BLK_DEV_TRM290=yCONFIG_BLK_DEV_VIA82CXXX=y
# CONFIG_IDE_ARM is not set
# CONFIG_IDE_CHIPSETS is not setCONFIG_BLK_DEV_IDEDMA=yCONFIG_IDEDMA_IVB=y
# CONFIG_IDEDMA_AUTO is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI device support
#CONFIG_SCSI=yCONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not setCONFIG_BLK_DEV_SR=yCONFIG_BLK_DEV_SR_VENDOR=yCONFIG_CHR_DEV_SG=m
# CONFIG_CHR_DEV_SCH is not set
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs #
# CONFIG_SCSI_MULTI_LUN is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
#
# SCSI Transport Attributes
#CONFIG_SCSI_SPI_ATTRS=mCONFIG_SCSI_FC_ATTRS=m
# CONFIG_SCSI_ISCSI_ATTRS is not set
#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not setCONFIG_SCSI_AHA152X=mCONFIG_SCSI_AHA1542=mCONFIG_SCSI_AHA1740=mCONFIG_SCSI_AACRAID=mCONFIG_SCSI_AIC7XXX=mCONFIG_AIC7XXX_CMDS_PER_DEVICE=253CONFIG_AIC7XXX_RESET_DELAY_MS=15000CONFIG_AIC7XXX_PROBE_EISA_VL=y
# CONFIG_AIC7XXX_DEBUG_ENABLE is not setCONFIG_AIC7XXX_DEBUG_MASK=0
# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not setCONFIG_SCSI_AIC7XXX_OLD=mCONFIG_SCSI_AIC79XX=mCONFIG_AIC79XX_CMDS_PER_DEVICE=32CONFIG_AIC79XX_RESET_DELAY_MS=15000CONFIG_AIC79XX_ENABLE_RD_STRM=y
# CONFIG_AIC79XX_DEBUG_ENABLE is not setCONFIG_AIC79XX_DEBUG_MASK=0
# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not setCONFIG_SCSI_DMX3191D=mCONFIG_SCSI_DTC3280=mCONFIG_SCSI_EATA=m
# CONFIG_SCSI_EATA_TAGGED_QUEUE is not set
# CONFIG_SCSI_EATA_LINKED_COMMANDS is not setCONFIG_SCSI_EATA_MAX_TAGS=16CONFIG_SCSI_EATA_PIO=mCONFIG_SCSI_FUTURE_DOMAIN=mCONFIG_SCSI_FD_MCS=mCONFIG_SCSI_GDTH=mCONFIG_SCSI_GENERIC_NCR5380=mCONFIG_SCSI_GENERIC_NCR5380_MMIO=mCONFIG_SCSI_GENERIC_NCR53C400=yCONFIG_SCSI_IBMMCA=mCONFIG_IBMMCA_SCSI_ORDER_STANDARD=y
# CONFIG_IBMMCA_SCSI_DEV_RESET is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not setCONFIG_SCSI_PPA=mCONFIG_SCSI_IMM=mCONFIG_SCSI_IZIP_EPP16=y
# CONFIG_SCSI_IZIP_SLOW_CTR is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_NCR_D700 is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_NCR_Q720 is not set
# CONFIG_SCSI_MCA_53C9X is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_PSI240I is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not setCONFIG_SCSI_QLA2XXX=y
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA24XX is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_SEAGATE is not set
# CONFIG_SCSI_SIM710 is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#CONFIG_CD_NO_IDESCSI=yCONFIG_AZTCD=mCONFIG_GSCD=mCONFIG_SBPCD=mCONFIG_MCDX=mCONFIG_OPTCD=mCONFIG_CM206=mCONFIG_SJCD=mCONFIG_ISP16_CDI=mCONFIG_CDU31A=mCONFIG_CDU535=m
#
# Multi-device support (RAID and LVM)
#CONFIG_MD=yCONFIG_BLK_DEV_MD=mCONFIG_MD_LINEAR=mCONFIG_MD_RAID0=mCONFIG_MD_RAID1=m
# CONFIG_MD_RAID10 is not setCONFIG_MD_RAID5=mCONFIG_MD_RAID6=mCONFIG_MD_MULTIPATH=mCONFIG_MD_FAULTY=mCONFIG_BLK_DEV_DM=mCONFIG_DM_CRYPT=m
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
#
# Fusion MPT device support
#
# CONFIG_FUSION is not set
# CONFIG_FUSION_SPI is not set
# CONFIG_FUSION_FC is not set
#
# IEEE 1394 (FireWire) support
#CONFIG_IEEE1394=m
#
# Subsystem Options
#
# CONFIG_IEEE1394_VERBOSEDEBUG is not setCONFIG_IEEE1394_OUI_DB=yCONFIG_IEEE1394_EXTRA_CONFIG_ROMS=yCONFIG_IEEE1394_CONFIG_ROM_IP1394=y
# CONFIG_IEEE1394_EXPORT_FULL_API is not set
#
# Device Drivers
#CONFIG_IEEE1394_PCILYNX=mCONFIG_IEEE1394_OHCI1394=m
#
# Protocol Drivers
#CONFIG_IEEE1394_VIDEO1394=mCONFIG_IEEE1394_SBP2=m
# CONFIG_IEEE1394_SBP2_PHYS_DMA is not setCONFIG_IEEE1394_ETH1394=mCONFIG_IEEE1394_DV1394=mCONFIG_IEEE1394_RAWIO=mCONFIG_IEEE1394_CMP=mCONFIG_IEEE1394_AMDTP=m
#
# I2O device support
#CONFIG_I2O=mCONFIG_I2O_EXT_ADAPTEC=y
# CONFIG_I2O_CONFIG is not setCONFIG_I2O_BUS=mCONFIG_I2O_BLOCK=mCONFIG_I2O_SCSI=mCONFIG_I2O_PROC=m
#
# Network device support
#CONFIG_NETDEVICES=yCONFIG_DUMMY=mCONFIG_BONDING=mCONFIG_EQUALIZER=mCONFIG_TUN=mCONFIG_NET_SB1000=m
#
# ARCnet devices
#CONFIG_ARCNET=mCONFIG_ARCNET_1201=mCONFIG_ARCNET_1051=mCONFIG_ARCNET_RAW=m
# CONFIG_ARCNET_CAP is not set
CONFIG_ARCNET_COM90xx=m
CONFIG_ARCNET_COM90xxIO=mCONFIG_ARCNET_RIM_I=mCONFIG_ARCNET_COM20020=mCONFIG_ARCNET_COM20020_ISA=mCONFIG_ARCNET_COM20020_PCI=m
#
# Ethernet (10 or 100Mbit)
#CONFIG_NET_ETHERNET=yCONFIG_MII=mCONFIG_HAPPYMEAL=mCONFIG_SUNGEM=mCONFIG_NET_VENDOR_3COM=yCONFIG_EL1=mCONFIG_EL2=mCONFIG_ELPLUS=mCONFIG_EL16=mCONFIG_EL3=mCONFIG_3C515=mCONFIG_ELMC=mCONFIG_ELMC_II=mCONFIG_VORTEX=mCONFIG_TYPHOON=mCONFIG_LANCE=mCONFIG_NET_VENDOR_SMC=y
CONFIG_WD80x3=mCONFIG_ULTRAMCA=mCONFIG_ULTRA=mCONFIG_ULTRA32=mCONFIG_SMC9194=mCONFIG_NET_VENDOR_RACAL=yCONFIG_NI5010=mCONFIG_NI52=mCONFIG_NI65=m
#
# Tulip family network device support
#CONFIG_NET_TULIP=yCONFIG_DE2104X=mCONFIG_TULIP=m
# CONFIG_TULIP_MWI is not set
# CONFIG_TULIP_MMIO is not set
# CONFIG_TULIP_NAPI is not setCONFIG_DE4X5=mCONFIG_WINBOND_840=mCONFIG_DM9102=mCONFIG_AT1700=mCONFIG_DEPCA=mCONFIG_HP100=mCONFIG_NET_ISA=yCONFIG_E2100=mCONFIG_EWRK3=mCONFIG_EEXPRESS=mCONFIG_EEXPRESS_PRO=mCONFIG_HPLAN_PLUS=mCONFIG_HPLAN=mCONFIG_LP486E=mCONFIG_ETH16I=mCONFIG_NE2000=mCONFIG_ZNET=mCONFIG_SEEQ8005=mCONFIG_SKMC=mCONFIG_NE2_MCA=mCONFIG_IBMLANA=mCONFIG_NET_PCI=yCONFIG_PCNET32=mCONFIG_AMD8111_ETH=mCONFIG_AMD8111E_NAPI=yCONFIG_ADAPTEC_STARFIRE=m
# CONFIG_ADAPTEC_STARFIRE_NAPI is not setCONFIG_AC3200=mCONFIG_APRICOT=mCONFIG_B44=mCONFIG_FORCEDETH=m
CONFIG_CS89x0=mCONFIG_DGRS=mCONFIG_EEPRO100=mCONFIG_E100=mCONFIG_LNE390=mCONFIG_FEALNX=mCONFIG_NATSEMI=mCONFIG_NE2K_PCI=mCONFIG_NE3210=mCONFIG_ES3210=m
# CONFIG_8139CP is not setCONFIG_8139TOO=m
# CONFIG_8139TOO_PIO is not setCONFIG_8139TOO_TUNE_TWISTER=yCONFIG_8139TOO_8129=y
# CONFIG_8139_OLD_RX_RESET is not setCONFIG_SIS900=mCONFIG_EPIC100=mCONFIG_SUNDANCE=m
# CONFIG_SUNDANCE_MMIO is not setCONFIG_TLAN=mCONFIG_VIA_RHINE=mCONFIG_VIA_RHINE_MMIO=yCONFIG_NET_POCKET=yCONFIG_ATP=mCONFIG_DE600=mCONFIG_DE620=m
#
# Ethernet (1000 Mbit)
#CONFIG_ACENIC=m
# CONFIG_ACENIC_OMIT_TIGON_I is not setCONFIG_DL2K=mCONFIG_E1000=y
# CONFIG_E1000_NAPI is not setCONFIG_NS83820=mCONFIG_HAMACHI=mCONFIG_YELLOWFIN=mCONFIG_R8169=m
# CONFIG_R8169_NAPI is not set
# CONFIG_R8169_VLAN is not set
# CONFIG_SKGE is not setCONFIG_SK98LIN=m
# CONFIG_VIA_VELOCITY is not setCONFIG_TIGON3=m
# CONFIG_BNX2 is not set
#
# Ethernet (10000 Mbit)
#CONFIG_IXGB=m
# CONFIG_IXGB_NAPI is not setCONFIG_S2IO=m
# CONFIG_S2IO_NAPI is not set
# CONFIG_2BUFF_MODE is not set
#
# Token Ring devices
#CONFIG_TR=yCONFIG_IBMTR=mCONFIG_IBMOL=mCONFIG_IBMLS=mCONFIG_3C359=mCONFIG_TMS380TR=mCONFIG_TMSPCI=mCONFIG_SKISA=mCONFIG_PROTEON=mCONFIG_ABYSS=mCONFIG_MADGEMC=mCONFIG_SMCTR=m
#
# Wireless LAN (non-hamradio)
#CONFIG_NET_RADIO=y
#
# Obsolete Wireless cards support (pre-802.11)
#CONFIG_STRIP=mCONFIG_ARLAN=mCONFIG_WAVELAN=m
#
# Wireless 802.11b ISA/PCI cards support
#CONFIG_AIRO=mCONFIG_HERMES=mCONFIG_PLX_HERMES=mCONFIG_TMD_HERMES=mCONFIG_PCI_HERMES=mCONFIG_ATMEL=mCONFIG_PCI_ATMEL=m
#
# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support #CONFIG_PRISM54=mCONFIG_NET_WIRELESS=y
#
# Wan interfaces
#CONFIG_WAN=yCONFIG_HOSTESS_SV11=mCONFIG_COSA=mCONFIG_DSCC4=mCONFIG_DSCC4_PCISYNC=y
# CONFIG_DSCC4_PCI_RST is not setCONFIG_LANMEDIA=mCONFIG_SEALEVEL_4021=mCONFIG_SYNCLINK_SYNCPPP=mCONFIG_HDLC=mCONFIG_HDLC_RAW=yCONFIG_HDLC_RAW_ETH=yCONFIG_HDLC_CISCO=yCONFIG_HDLC_FR=yCONFIG_HDLC_PPP=yCONFIG_HDLC_X25=yCONFIG_PCI200SYN=mCONFIG_WANXL=mCONFIG_PC300=mCONFIG_PC300_MLPPP=yCONFIG_N2=mCONFIG_C101=mCONFIG_FARSYNC=mCONFIG_DLCI=mCONFIG_DLCI_COUNT=24CONFIG_DLCI_MAX=8CONFIG_SDLA=mCONFIG_WAN_ROUTER_DRIVERS=yCONFIG_VENDOR_SANGOMA=mCONFIG_WANPIPE_CHDLC=yCONFIG_WANPIPE_FR=yCONFIG_WANPIPE_X25=yCONFIG_WANPIPE_PPP=yCONFIG_WANPIPE_MULTPPP=yCONFIG_CYCLADES_SYNC=mCONFIG_CYCLOMX_X25=yCONFIG_LAPBETHER=mCONFIG_X25_ASY=mCONFIG_SBNI=mCONFIG_SBNI_MULTILINE=y
#
# ATM drivers
#CONFIG_ATM_TCP=mCONFIG_ATM_LANAI=mCONFIG_ATM_ENI=m
# CONFIG_ATM_ENI_DEBUG is not setCONFIG_ATM_ENI_TUNE_BURST=y
# CONFIG_ATM_ENI_BURST_TX_16W is not setCONFIG_ATM_ENI_BURST_TX_8W=yCONFIG_ATM_ENI_BURST_TX_4W=yCONFIG_ATM_ENI_BURST_TX_2W=y
# CONFIG_ATM_ENI_BURST_RX_16W is not set
# CONFIG_ATM_ENI_BURST_RX_8W is not setCONFIG_ATM_ENI_BURST_RX_4W=yCONFIG_ATM_ENI_BURST_RX_2W=yCONFIG_ATM_FIRESTREAM=mCONFIG_ATM_ZATM=m
# CONFIG_ATM_ZATM_DEBUG is not setCONFIG_ATM_NICSTAR=mCONFIG_ATM_NICSTAR_USE_SUNI=yCONFIG_ATM_NICSTAR_USE_IDT77105=yCONFIG_ATM_IDT77252=m
# CONFIG_ATM_IDT77252_DEBUG is not set
# CONFIG_ATM_IDT77252_RCV_ALL is not setCONFIG_ATM_IDT77252_USE_SUNI=yCONFIG_ATM_AMBASSADOR=m
# CONFIG_ATM_AMBASSADOR_DEBUG is not setCONFIG_ATM_HORIZON=m
# CONFIG_ATM_HORIZON_DEBUG is not setCONFIG_ATM_IA=m
# CONFIG_ATM_IA_DEBUG is not setCONFIG_ATM_FORE200E_MAYBE=mCONFIG_ATM_FORE200E_PCA=yCONFIG_ATM_FORE200E_PCA_DEFAULT_FW=yCONFIG_ATM_FORE200E_USE_TASKLET=yCONFIG_ATM_FORE200E_TX_RETRY=16CONFIG_ATM_FORE200E_DEBUG=0CONFIG_ATM_FORE200E=mCONFIG_ATM_HE=m
# CONFIG_ATM_HE_USE_SUNI is not setCONFIG_FDDI=yCONFIG_DEFXX=mCONFIG_SKFP=mCONFIG_HIPPI=yCONFIG_ROADRUNNER=m
# CONFIG_ROADRUNNER_LARGE_RINGS is not setCONFIG_PLIP=mCONFIG_PPP=mCONFIG_PPP_MULTILINK=yCONFIG_PPP_FILTER=yCONFIG_PPP_ASYNC=mCONFIG_PPP_SYNC_TTY=mCONFIG_PPP_DEFLATE=mCONFIG_PPP_BSDCOMP=mCONFIG_PPPOE=mCONFIG_PPPOATM=mCONFIG_SLIP=mCONFIG_SLIP_COMPRESSED=yCONFIG_SLIP_SMART=yCONFIG_SLIP_MODE_SLIP6=yCONFIG_NET_FC=yCONFIG_SHAPER=mCONFIG_NETCONSOLE=mCONFIG_NETPOLL=yCONFIG_NETPOLL_RX=yCONFIG_NETPOLL_TRAP=yCONFIG_NET_POLL_CONTROLLER=y
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Telephony Support
#
# CONFIG_PHONE is not set
#
# Input device support
#CONFIG_INPUT=y
#
# Userland interfaces
#CONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_PSAUX=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_INPUT_JOYDEV=mCONFIG_INPUT_TSDEV=mCONFIG_INPUT_TSDEV_SCREEN_X=240CONFIG_INPUT_TSDEV_SCREEN_Y=320CONFIG_INPUT_EVDEV=m
# CONFIG_INPUT_EVBUG is not set
#
# Input Device Drivers
#CONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ATKBD=yCONFIG_KEYBOARD_SUNKBD=mCONFIG_KEYBOARD_LKKBD=mCONFIG_KEYBOARD_XTKBD=mCONFIG_KEYBOARD_NEWTON=mCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_SERIAL=mCONFIG_MOUSE_INPORT=m
# CONFIG_MOUSE_ATIXL is not setCONFIG_MOUSE_LOGIBM=mCONFIG_MOUSE_PC110PAD=mCONFIG_MOUSE_VSXXXAA=mCONFIG_INPUT_JOYSTICK=yCONFIG_JOYSTICK_ANALOG=mCONFIG_JOYSTICK_A3D=mCONFIG_JOYSTICK_ADI=mCONFIG_JOYSTICK_COBRA=mCONFIG_JOYSTICK_GF2K=mCONFIG_JOYSTICK_GRIP=mCONFIG_JOYSTICK_GRIP_MP=mCONFIG_JOYSTICK_GUILLEMOT=mCONFIG_JOYSTICK_INTERACT=mCONFIG_JOYSTICK_SIDEWINDER=mCONFIG_JOYSTICK_TMDC=mCONFIG_JOYSTICK_IFORCE=mCONFIG_JOYSTICK_IFORCE_USB=yCONFIG_JOYSTICK_IFORCE_232=yCONFIG_JOYSTICK_WARRIOR=mCONFIG_JOYSTICK_MAGELLAN=mCONFIG_JOYSTICK_SPACEORB=mCONFIG_JOYSTICK_SPACEBALL=mCONFIG_JOYSTICK_STINGER=m
# CONFIG_JOYSTICK_TWIDJOY is not setCONFIG_JOYSTICK_DB9=mCONFIG_JOYSTICK_GAMECON=mCONFIG_JOYSTICK_TURBOGRAFX=mCONFIG_JOYSTICK_JOYDUMP=mCONFIG_INPUT_TOUCHSCREEN=yCONFIG_TOUCHSCREEN_GUNZE=m
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_MK712 is not setCONFIG_INPUT_MISC=yCONFIG_INPUT_PCSPKR=mCONFIG_INPUT_UINPUT=m
#
# Hardware I/O ports
#CONFIG_SERIO=yCONFIG_SERIO_I8042=yCONFIG_SERIO_SERPORT=mCONFIG_SERIO_CT82C710=mCONFIG_SERIO_PARKBD=mCONFIG_SERIO_PCIPS2=mCONFIG_SERIO_LIBPS2=yCONFIG_SERIO_RAW=mCONFIG_GAMEPORT=mCONFIG_GAMEPORT_NS558=mCONFIG_GAMEPORT_L4=mCONFIG_GAMEPORT_EMU10K1=mCONFIG_GAMEPORT_FM801=m
#
# Character devices
#CONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_SERIAL_NONSTANDARD=yCONFIG_COMPUTONE=mCONFIG_ROCKETPORT=mCONFIG_CYCLADES=m
# CONFIG_CYZ_INTR is not setCONFIG_DIGIEPCA=mCONFIG_ESPSERIAL=mCONFIG_MOXA_INTELLIO=mCONFIG_MOXA_SMARTIO=mCONFIG_ISI=mCONFIG_SYNCLINK=mCONFIG_SYNCLINKMP=mCONFIG_N_HDLC=mCONFIG_RISCOM8=mCONFIG_SPECIALIX=m
# CONFIG_SPECIALIX_RTSCTS is not setCONFIG_SX=mCONFIG_RIO=mCONFIG_RIO_OLDPCI=yCONFIG_STALDRV=yCONFIG_STALLION=mCONFIG_ISTALLION=m
#
# Serial drivers
#CONFIG_SERIAL_8250=mCONFIG_SERIAL_8250_ACPI=yCONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_MCA is not set
#
# Non-8250 serial port support
#CONFIG_SERIAL_CORE=m
# CONFIG_SERIAL_JSM is not setCONFIG_UNIX98_PTYS=yCONFIG_LEGACY_PTYS=yCONFIG_LEGACY_PTY_COUNT=256CONFIG_PRINTER=mCONFIG_LP_CONSOLE=yCONFIG_PPDEV=mCONFIG_TIPAR=m
#
# IPMI
#CONFIG_IPMI_HANDLER=m
# CONFIG_IPMI_PANIC_EVENT is not setCONFIG_IPMI_DEVICE_INTERFACE=mCONFIG_IPMI_SI=mCONFIG_IPMI_WATCHDOG=mCONFIG_IPMI_POWEROFF=m
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not setCONFIG_HW_RANDOM=mCONFIG_NVRAM=mCONFIG_RTC=mCONFIG_RTC_HISTOGRAM=mCONFIG_BLOCKER=yCONFIG_LPPTEST=mCONFIG_GEN_RTC=mCONFIG_GEN_RTC_X=yCONFIG_DTLK=mCONFIG_R3964=mCONFIG_APPLICOM=mCONFIG_SONYPI=m
#
# Ftape, the floppy tape device driver
#CONFIG_FTAPE=mCONFIG_ZFTAPE=mCONFIG_ZFT_DFLT_BLK_SZ=10240
#
# The compressor will be built as a module only!
#CONFIG_ZFT_COMPRESSOR=mCONFIG_FT_NR_BUFFERS=3CONFIG_FT_PROC_FS=yCONFIG_FT_NORMAL_DEBUG=y
# CONFIG_FT_FULL_DEBUG is not set
# CONFIG_FT_NO_TRACE is not set
# CONFIG_FT_NO_TRACE_AT_ALL is not set
#
# Hardware configuration
#CONFIG_FT_STD_FDC=y
# CONFIG_FT_MACH2 is not set
# CONFIG_FT_PROBE_FC10 is not set
# CONFIG_FT_ALT_FDC is not setCONFIG_FT_FDC_THR=8CONFIG_FT_FDC_MAX_RATE=2000CONFIG_FT_ALPHA_CLOCK=0CONFIG_AGP=mCONFIG_AGP_ALI=mCONFIG_AGP_ATI=mCONFIG_AGP_AMD=mCONFIG_AGP_AMD64=mCONFIG_AGP_INTEL=mCONFIG_AGP_NVIDIA=mCONFIG_AGP_SIS=mCONFIG_AGP_SWORKS=mCONFIG_AGP_VIA=mCONFIG_AGP_EFFICEON=mCONFIG_DRM=mCONFIG_DRM_TDFX=m
# CONFIG_DRM_GAMMA is not setCONFIG_DRM_R128=mCONFIG_DRM_RADEON=mCONFIG_DRM_I810=mCONFIG_DRM_I830=mCONFIG_DRM_I915=mCONFIG_DRM_MGA=mCONFIG_DRM_SIS=m
# CONFIG_DRM_VIA is not setCONFIG_MWAVE=m
CONFIG_SCx200_GPIO=mCONFIG_RAW_DRIVER=m
# CONFIG_HPET is not setCONFIG_MAX_RAW_DEVS=256CONFIG_HANGCHECK_TIMER=m
#
# TPM devices
#
# CONFIG_TCG_TPM is not set
#
# I2C support
#CONFIG_I2C=mCONFIG_I2C_CHARDEV=m
#
# I2C Algorithms
#CONFIG_I2C_ALGOBIT=mCONFIG_I2C_ALGOPCF=mCONFIG_I2C_ALGOPCA=m
#
# I2C Hardware Bus support
#CONFIG_I2C_ALI1535=mCONFIG_I2C_ALI1563=mCONFIG_I2C_ALI15X3=mCONFIG_I2C_AMD756=mCONFIG_I2C_AMD756_S4882=mCONFIG_I2C_AMD8111=mCONFIG_I2C_ELEKTOR=mCONFIG_I2C_I801=mCONFIG_I2C_I810=mCONFIG_I2C_PIIX4=mCONFIG_I2C_ISA=mCONFIG_I2C_NFORCE2=mCONFIG_I2C_PARPORT=mCONFIG_I2C_PARPORT_LIGHT=mCONFIG_I2C_PROSAVAGE=mCONFIG_I2C_SAVAGE4=m
CONFIG_SCx200_I2C=m
CONFIG_SCx200_I2C_SCL=12
CONFIG_SCx200_I2C_SDA=13
CONFIG_SCx200_ACB=mCONFIG_I2C_SIS5595=mCONFIG_I2C_SIS630=mCONFIG_I2C_SIS96X=mCONFIG_I2C_STUB=mCONFIG_I2C_VIA=mCONFIG_I2C_VIAPRO=mCONFIG_I2C_VOODOO3=mCONFIG_I2C_PCA_ISA=mCONFIG_I2C_SENSOR=m
#
# Miscellaneous I2C Chip support
#
# CONFIG_SENSORS_DS1337 is not set
# CONFIG_SENSORS_DS1374 is not setCONFIG_SENSORS_EEPROM=mCONFIG_SENSORS_PCF8574=m
# CONFIG_SENSORS_PCA9539 is not setCONFIG_SENSORS_PCF8591=m
# CONFIG_SENSORS_RTC8564 is not set
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
#
# Dallas's 1-wire bus
#
# CONFIG_W1 is not set
#
# Hardware Monitoring support
#CONFIG_HWMON=yCONFIG_SENSORS_ADM1021=m
# CONFIG_SENSORS_ADM1025 is not setCONFIG_SENSORS_ADM1026=m
# CONFIG_SENSORS_ADM1031 is not setCONFIG_SENSORS_ADM9240=mCONFIG_SENSORS_ASB100=m
# CONFIG_SENSORS_ATXP1 is not setCONFIG_SENSORS_DS1621=mCONFIG_SENSORS_FSCHER=mCONFIG_SENSORS_FSCPOS=mCONFIG_SENSORS_GL518SM=mCONFIG_SENSORS_GL520SM=mCONFIG_SENSORS_IT87=mCONFIG_SENSORS_LM63=mCONFIG_SENSORS_LM75=m
# CONFIG_SENSORS_LM77 is not setCONFIG_SENSORS_LM78=mCONFIG_SENSORS_LM80=mCONFIG_SENSORS_LM83=mCONFIG_SENSORS_LM85=mCONFIG_SENSORS_LM87=mCONFIG_SENSORS_LM90=mCONFIG_SENSORS_LM92=m
# CONFIG_SENSORS_MAX1619 is not setCONFIG_SENSORS_PC87360=mCONFIG_SENSORS_SIS5595=mCONFIG_SENSORS_SMSC47M1=mCONFIG_SENSORS_SMSC47B397=mCONFIG_SENSORS_VIA686A=mCONFIG_SENSORS_W83781D=mCONFIG_SENSORS_W83L785TS=mCONFIG_SENSORS_W83627HF=mCONFIG_SENSORS_W83627EHF=m
# CONFIG_HWMON_DEBUG_CHIP is not set
#
# Misc devices
#CONFIG_IBM_ASM=m
#
# Multimedia devices
#CONFIG_VIDEO_DEV=m
#
# Video For Linux
#
#
# Video Adapters
#CONFIG_VIDEO_BT848=mCONFIG_VIDEO_PMS=mCONFIG_VIDEO_BWQCAM=mCONFIG_VIDEO_CQCAM=mCONFIG_VIDEO_W9966=mCONFIG_VIDEO_CPIA=mCONFIG_VIDEO_CPIA_PP=mCONFIG_VIDEO_CPIA_USB=mCONFIG_VIDEO_SAA5246A=mCONFIG_VIDEO_SAA5249=mCONFIG_TUNER_3036=mCONFIG_VIDEO_STRADIS=mCONFIG_VIDEO_ZORAN=mCONFIG_VIDEO_ZORAN_BUZ=mCONFIG_VIDEO_ZORAN_DC10=mCONFIG_VIDEO_ZORAN_DC30=mCONFIG_VIDEO_ZORAN_LML33=mCONFIG_VIDEO_ZORAN_LML33R10=m
# CONFIG_VIDEO_ZR36120 is not setCONFIG_VIDEO_MEYE=m
# CONFIG_VIDEO_SAA7134 is not setCONFIG_VIDEO_MXB=mCONFIG_VIDEO_DPC=mCONFIG_VIDEO_HEXIUM_ORION=mCONFIG_VIDEO_HEXIUM_GEMINI=m
# CONFIG_VIDEO_CX88 is not set
# CONFIG_VIDEO_OVCAMCHIP is not set
#
# Radio Adapters
#CONFIG_RADIO_CADET=mCONFIG_RADIO_RTRACK=mCONFIG_RADIO_RTRACK2=mCONFIG_RADIO_AZTECH=mCONFIG_RADIO_GEMTEK=mCONFIG_RADIO_GEMTEK_PCI=mCONFIG_RADIO_MAXIRADIO=mCONFIG_RADIO_MAESTRO=mCONFIG_RADIO_SF16FMI=mCONFIG_RADIO_SF16FMR2=mCONFIG_RADIO_TERRATEC=mCONFIG_RADIO_TRUST=mCONFIG_RADIO_TYPHOON=mCONFIG_RADIO_TYPHOON_PROC_FS=yCONFIG_RADIO_ZOLTRIX=m
#
# Digital Video Broadcasting Devices
#CONFIG_DVB=yCONFIG_DVB_CORE=m
#
# Supported SAA7146 based PCI Adapters
#CONFIG_DVB_AV7110=mCONFIG_DVB_AV7110_OSD=yCONFIG_DVB_BUDGET=mCONFIG_DVB_BUDGET_CI=mCONFIG_DVB_BUDGET_AV=mCONFIG_DVB_BUDGET_PATCH=m
#
# Supported USB Adapters
#
# CONFIG_DVB_USB is not setCONFIG_DVB_TTUSB_BUDGET=mCONFIG_DVB_TTUSB_DEC=mCONFIG_DVB_CINERGYT2=m
# CONFIG_DVB_CINERGYT2_TUNING is not set
#
# Supported FlexCopII (B2C2) Adapters
#
# CONFIG_DVB_B2C2_FLEXCOP is not set
#
# Supported BT878 Adapters
#CONFIG_DVB_BT8XX=m
#
# Supported Pluto2 Adapters
#
# CONFIG_DVB_PLUTO2 is not set
#
# Supported DVB Frontends
#
#
# Customise DVB Frontends
#
#
# DVB-S (satellite) frontends
#CONFIG_DVB_STV0299=mCONFIG_DVB_CX24110=mCONFIG_DVB_TDA8083=mCONFIG_DVB_TDA80XX=mCONFIG_DVB_MT312=mCONFIG_DVB_VES1X93=mCONFIG_DVB_S5H1420=m
#
# DVB-T (terrestrial) frontends
#CONFIG_DVB_SP8870=mCONFIG_DVB_SP887X=mCONFIG_DVB_CX22700=mCONFIG_DVB_CX22702=mCONFIG_DVB_L64781=mCONFIG_DVB_TDA1004X=mCONFIG_DVB_NXT6000=mCONFIG_DVB_MT352=mCONFIG_DVB_DIB3000MB=mCONFIG_DVB_DIB3000MC=m
#
# DVB-C (cable) frontends
#CONFIG_DVB_ATMEL_AT76C651=mCONFIG_DVB_VES1820=mCONFIG_DVB_TDA10021=mCONFIG_DVB_STV0297=m
#
# ATSC (North American/Korean Terresterial DTV) frontends #CONFIG_DVB_NXT2002=mCONFIG_DVB_OR51211=m
# CONFIG_DVB_OR51132 is not set
# CONFIG_DVB_BCM3510 is not set
# CONFIG_DVB_LGDT330X is not set CONFIG_VIDEO_SAA7146=mCONFIG_VIDEO_SAA7146_VV=m CONFIG_VIDEO_VIDEOBUF=mCONFIG_VIDEO_TUNER=mCONFIG_VIDEO_BUF=mCONFIG_VIDEO_BTCX=mCONFIG_VIDEO_IR=mCONFIG_VIDEO_TVEEPROM=m
#
# Graphics support
#CONFIG_FB=yCONFIG_FB_CFB_FILLRECT=yCONFIG_FB_CFB_COPYAREA=yCONFIG_FB_CFB_IMAGEBLIT=yCONFIG_FB_SOFT_CURSOR=y
# CONFIG_FB_MACMODES is not setCONFIG_FB_MODE_HELPERS=yCONFIG_FB_TILEBLITTING=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not setCONFIG_FB_VGA16=mCONFIG_FB_VESA=yCONFIG_VIDEO_SELECT=y
# CONFIG_FB_HGA is not set
# CONFIG_FB_NVIDIA is not setCONFIG_FB_RIVA=m
# CONFIG_FB_RIVA_I2C is not set
# CONFIG_FB_RIVA_DEBUG is not setCONFIG_FB_I810=m
# CONFIG_FB_I810_GTF is not setCONFIG_FB_INTEL=m
# CONFIG_FB_INTEL_DEBUG is not setCONFIG_FB_MATROX=m
# CONFIG_FB_MATROX_MILLENIUM is not set
# CONFIG_FB_MATROX_MYSTIQUE is not setCONFIG_FB_MATROX_G=yCONFIG_FB_MATROX_I2C=m
# CONFIG_FB_MATROX_MAVEN is not setCONFIG_FB_MATROX_MULTIHEAD=y
# CONFIG_FB_RADEON_OLD is not setCONFIG_FB_RADEON=mCONFIG_FB_RADEON_I2C=y
# CONFIG_FB_RADEON_DEBUG is not setCONFIG_FB_ATY128=mCONFIG_FB_ATY=mCONFIG_FB_ATY_CT=y
# CONFIG_FB_ATY_GENERIC_LCD is not setCONFIG_FB_ATY_XL_INIT=yCONFIG_FB_ATY_GX=y
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not setCONFIG_FB_3DFX=m
# CONFIG_FB_3DFX_ACCEL is not setCONFIG_FB_VOODOO1=mCONFIG_FB_TRIDENT=m
# CONFIG_FB_TRIDENT_ACCEL is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_VIRTUAL is not set
#
# Console display driver support
#CONFIG_VGA_CONSOLE=yCONFIG_MDA_CONSOLE=mCONFIG_DUMMY_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
#
# Logo configuration
#CONFIG_LOGO=yCONFIG_LOGO_LINUX_MONO=yCONFIG_LOGO_LINUX_VGA16=yCONFIG_LOGO_LINUX_CLUT224=y
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Sound
#CONFIG_SOUND=m
#
# Advanced Linux Sound Architecture
#CONFIG_SND=mCONFIG_SND_TIMER=mCONFIG_SND_PCM=mCONFIG_SND_HWDEP=mCONFIG_SND_RAWMIDI=mCONFIG_SND_SEQUENCER=mCONFIG_SND_SEQ_DUMMY=mCONFIG_SND_OSSEMUL=yCONFIG_SND_MIXER_OSS=mCONFIG_SND_PCM_OSS=mCONFIG_SND_SEQUENCER_OSS=yCONFIG_SND_RTCTIMER=m
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not setCONFIG_SND_GENERIC_PM=y
#
# Generic devices
#CONFIG_SND_MPU401_UART=mCONFIG_SND_OPL3_LIB=mCONFIG_SND_OPL4_LIB=mCONFIG_SND_VX_LIB=mCONFIG_SND_DUMMY=mCONFIG_SND_VIRMIDI=mCONFIG_SND_MTPAV=mCONFIG_SND_SERIAL_U16550=mCONFIG_SND_MPU401=m
#
# ISA devices
#CONFIG_SND_AD1848_LIB=mCONFIG_SND_CS4231_LIB=mCONFIG_SND_AD1816A=mCONFIG_SND_AD1848=mCONFIG_SND_CS4231=mCONFIG_SND_CS4232=mCONFIG_SND_CS4236=mCONFIG_SND_ES968=mCONFIG_SND_ES1688=mCONFIG_SND_ES18XX=mCONFIG_SND_GUS_SYNTH=mCONFIG_SND_GUSCLASSIC=mCONFIG_SND_GUSEXTREME=mCONFIG_SND_GUSMAX=mCONFIG_SND_INTERWAVE=mCONFIG_SND_INTERWAVE_STB=mCONFIG_SND_OPTI92X_AD1848=mCONFIG_SND_OPTI92X_CS4231=mCONFIG_SND_OPTI93X=mCONFIG_SND_SB8=mCONFIG_SND_SB16=mCONFIG_SND_SBAWE=mCONFIG_SND_SB16_CSP=yCONFIG_SND_WAVEFRONT=mCONFIG_SND_ALS100=mCONFIG_SND_AZT2320=mCONFIG_SND_CMI8330=mCONFIG_SND_DT019X=mCONFIG_SND_OPL3SA2=mCONFIG_SND_SGALAXY=mCONFIG_SND_SSCAPE=m
#
# PCI devices
#CONFIG_SND_AC97_CODEC=mCONFIG_SND_ALI5451=mCONFIG_SND_ATIIXP=m
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not setCONFIG_SND_AU8820=mCONFIG_SND_AU8830=mCONFIG_SND_AZT3328=mCONFIG_SND_BT87X=m
# CONFIG_SND_BT87X_OVERCLOCK is not setCONFIG_SND_CS46XX=mCONFIG_SND_CS46XX_NEW_DSP=yCONFIG_SND_CS4281=mCONFIG_SND_EMU10K1=mCONFIG_SND_EMU10K1X=mCONFIG_SND_CA0106=m
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not setCONFIG_SND_TRIDENT=mCONFIG_SND_YMFPCI=mCONFIG_SND_ALS4000=mCONFIG_SND_CMIPCI=mCONFIG_SND_ENS1370=mCONFIG_SND_ENS1371=mCONFIG_SND_ES1938=mCONFIG_SND_ES1968=mCONFIG_SND_MAESTRO3=mCONFIG_SND_FM801=mCONFIG_SND_FM801_TEA575X=mCONFIG_SND_ICE1712=mCONFIG_SND_ICE1724=mCONFIG_SND_INTEL8X0=mCONFIG_SND_INTEL8X0M=mCONFIG_SND_SONICVIBES=mCONFIG_SND_VIA82XX=mCONFIG_SND_VIA82XX_MODEM=mCONFIG_SND_VX222=mCONFIG_SND_HDA_INTEL=m
#
# USB devices
#
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
#
# USB support
#CONFIG_USB_ARCH_HAS_HCD=yCONFIG_USB_ARCH_HAS_OHCI=yCONFIG_USB=m
# CONFIG_USB_DEBUG is not set
#
# Miscellaneous USB options
#CONFIG_USB_DEVICEFS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_OTG is not set
#
# USB Host Controller Drivers
#CONFIG_USB_EHCI_HCD=mCONFIG_USB_EHCI_SPLIT_ISO=yCONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_ISP116X_HCD is not setCONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN is not setCONFIG_USB_OHCI_LITTLE_ENDIAN=yCONFIG_USB_UHCI_HCD=mCONFIG_USB_SL811_HCD=m
#
# USB Device Class drivers
#CONFIG_USB_AUDIO=m
#
# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem #CONFIG_USB_MIDI=mCONFIG_USB_ACM=mCONFIG_USB_PRINTER=m
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information #CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not setCONFIG_USB_STORAGE_DATAFAB=yCONFIG_USB_STORAGE_FREECOM=yCONFIG_USB_STORAGE_ISD200=yCONFIG_USB_STORAGE_DPCM=y
# CONFIG_USB_STORAGE_USBAT is not setCONFIG_USB_STORAGE_SDDR09=yCONFIG_USB_STORAGE_SDDR55=yCONFIG_USB_STORAGE_JUMPSHOT=y
#
# USB Input Devices
#CONFIG_USB_HID=mCONFIG_USB_HIDINPUT=yCONFIG_HID_FF=yCONFIG_HID_PID=yCONFIG_LOGITECH_FF=yCONFIG_THRUSTMASTER_FF=yCONFIG_USB_HIDDEV=y
#
# USB HID Boot Protocol drivers
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not setCONFIG_USB_AIPTEK=mCONFIG_USB_WACOM=m
# CONFIG_USB_ACECAD is not setCONFIG_USB_KBTAB=mCONFIG_USB_POWERMATE=mCONFIG_USB_MTOUCH=m
# CONFIG_USB_ITMTOUCH is not set
# CONFIG_USB_EGALAX is not setCONFIG_USB_XPAD=mCONFIG_USB_ATI_REMOTE=m
# CONFIG_USB_KEYSPAN_REMOTE is not set
#
# USB Imaging devices
#CONFIG_USB_MDC800=mCONFIG_USB_MICROTEK=m
#
# USB Multimedia devices
#CONFIG_USB_DABUSB=mCONFIG_USB_VICAM=mCONFIG_USB_DSBR=mCONFIG_USB_IBMCAM=mCONFIG_USB_KONICAWC=mCONFIG_USB_OV511=mCONFIG_USB_SE401=m
# CONFIG_USB_SN9C102 is not setCONFIG_USB_STV680=mCONFIG_USB_PWC=m
#
# USB Network Adapters
#CONFIG_USB_CATC=mCONFIG_USB_KAWETH=mCONFIG_USB_PEGASUS=mCONFIG_USB_RTL8150=mCONFIG_USB_USBNET=m
#
# USB Host-to-Host Cables
#CONFIG_USB_ALI_M5632=yCONFIG_USB_AN2720=yCONFIG_USB_BELKIN=yCONFIG_USB_GENESYS=yCONFIG_USB_NET1080=yCONFIG_USB_PL2301=yCONFIG_USB_KC2190=y
#
# Intelligent USB Devices/Gadgets
#CONFIG_USB_ARMLINUX=yCONFIG_USB_EPSON2888=yCONFIG_USB_ZAURUS=yCONFIG_USB_CDCETHER=y
#
# USB Network Adapters
#CONFIG_USB_AX8817X=y
# CONFIG_USB_ZD1201 is not setCONFIG_USB_MON=y
#
# USB port drivers
#CONFIG_USB_USS720=m
#
# USB Serial Converter support
#CONFIG_USB_SERIAL=mCONFIG_USB_SERIAL_GENERIC=y
# CONFIG_USB_SERIAL_AIRPRIME is not setCONFIG_USB_SERIAL_BELKIN=mCONFIG_USB_SERIAL_WHITEHEAT=mCONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
# CONFIG_USB_SERIAL_CP2101 is not setCONFIG_USB_SERIAL_CYPRESS_M8=mCONFIG_USB_SERIAL_EMPEG=mCONFIG_USB_SERIAL_FTDI_SIO=mCONFIG_USB_SERIAL_VISOR=mCONFIG_USB_SERIAL_IPAQ=mCONFIG_USB_SERIAL_IR=mCONFIG_USB_SERIAL_EDGEPORT=mCONFIG_USB_SERIAL_EDGEPORT_TI=mCONFIG_USB_SERIAL_GARMIN=mCONFIG_USB_SERIAL_IPW=mCONFIG_USB_SERIAL_KEYSPAN_PDA=mCONFIG_USB_SERIAL_KEYSPAN=mCONFIG_USB_SERIAL_KEYSPAN_MPR=yCONFIG_USB_SERIAL_KEYSPAN_USA28=yCONFIG_USB_SERIAL_KEYSPAN_USA28X=yCONFIG_USB_SERIAL_KEYSPAN_USA28XA=yCONFIG_USB_SERIAL_KEYSPAN_USA28XB=yCONFIG_USB_SERIAL_KEYSPAN_USA19=yCONFIG_USB_SERIAL_KEYSPAN_USA18X=yCONFIG_USB_SERIAL_KEYSPAN_USA19W=yCONFIG_USB_SERIAL_KEYSPAN_USA19QW=yCONFIG_USB_SERIAL_KEYSPAN_USA19QI=yCONFIG_USB_SERIAL_KEYSPAN_USA49W=yCONFIG_USB_SERIAL_KEYSPAN_USA49WLC=yCONFIG_USB_SERIAL_KLSI=mCONFIG_USB_SERIAL_KOBIL_SCT=mCONFIG_USB_SERIAL_MCT_U232=mCONFIG_USB_SERIAL_PL2303=m
# CONFIG_USB_SERIAL_HP4X is not setCONFIG_USB_SERIAL_SAFE=mCONFIG_USB_SERIAL_SAFE_PADDED=yCONFIG_USB_SERIAL_TI=mCONFIG_USB_SERIAL_CYBERJACK=mCONFIG_USB_SERIAL_XIRCOM=mCONFIG_USB_SERIAL_OMNINET=mCONFIG_USB_EZUSB=y
#
# USB Miscellaneous drivers
#CONFIG_USB_EMI62=mCONFIG_USB_EMI26=mCONFIG_USB_AUERSWALD=mCONFIG_USB_RIO500=mCONFIG_USB_LEGOTOWER=mCONFIG_USB_LCD=mCONFIG_USB_LED=mCONFIG_USB_CYTHERM=mCONFIG_USB_PHIDGETKIT=m
# CONFIG_USB_PHIDGETSERVO is not setCONFIG_USB_IDMOUSE=m
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not setCONFIG_USB_TEST=m
#
# USB DSL modem support
#CONFIG_USB_ATM=mCONFIG_USB_SPEEDTOUCH=m
# CONFIG_USB_CXACRU is not set
# CONFIG_USB_XUSBATM is not set
#
# USB Gadget Support
#CONFIG_USB_GADGET=m
# CONFIG_USB_GADGET_DEBUG_FILES is not setCONFIG_USB_GADGET_SELECTED=yCONFIG_USB_GADGET_NET2280=yCONFIG_USB_NET2280=m
# CONFIG_USB_GADGET_PXA2XX is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LH7A40X is not set
# CONFIG_USB_GADGET_OMAP is not set
# CONFIG_USB_GADGET_DUMMY_HCD is not setCONFIG_USB_GADGET_DUALSPEED=yCONFIG_USB_ZERO=mCONFIG_USB_ETH=mCONFIG_USB_ETH_RNDIS=yCONFIG_USB_GADGETFS=mCONFIG_USB_FILE_STORAGE=mCONFIG_USB_FILE_STORAGE_TEST=yCONFIG_USB_G_SERIAL=m
#
# MMC/SD Card support
#CONFIG_MMC=m
# CONFIG_MMC_DEBUG is not setCONFIG_MMC_BLOCK=mCONFIG_MMC_WBSD=m
#
# InfiniBand support
#
# CONFIG_INFINIBAND is not set
#
# SN Devices
#
#
# File systems
#CONFIG_EXT2_FS=yCONFIG_EXT2_FS_XATTR=yCONFIG_EXT2_FS_POSIX_ACL=yCONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not setCONFIG_EXT3_FS=yCONFIG_EXT3_FS_XATTR=yCONFIG_EXT3_FS_POSIX_ACL=yCONFIG_EXT3_FS_SECURITY=yCONFIG_JBD=yCONFIG_JBD_DEBUG=yCONFIG_FS_MBCACHE=yCONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not setCONFIG_REISERFS_FS_XATTR=yCONFIG_REISERFS_FS_POSIX_ACL=y
# CONFIG_REISERFS_FS_SECURITY is not setCONFIG_JFS_FS=mCONFIG_JFS_POSIX_ACL=y
# CONFIG_JFS_SECURITY is not set
# CONFIG_JFS_DEBUG is not setCONFIG_JFS_STATISTICS=yCONFIG_FS_POSIX_ACL=y
#
# XFS support
#CONFIG_XFS_FS=mCONFIG_XFS_EXPORT=yCONFIG_XFS_RT=yCONFIG_XFS_QUOTA=yCONFIG_XFS_SECURITY=yCONFIG_XFS_POSIX_ACL=yCONFIG_MINIX_FS=mCONFIG_ROMFS_FS=mCONFIG_INOTIFY=yCONFIG_QUOTA=yCONFIG_QFMT_V1=mCONFIG_QFMT_V2=mCONFIG_QUOTACTL=yCONFIG_DNOTIFY=yCONFIG_AUTOFS_FS=mCONFIG_AUTOFS4_FS=m
#
# CD-ROM/DVD Filesystems
#CONFIG_ISO9660_FS=yCONFIG_JOLIET=yCONFIG_ZISOFS=yCONFIG_ZISOFS_FS=yCONFIG_UDF_FS=mCONFIG_UDF_NLS=y
#
# DOS/FAT/NT Filesystems
#CONFIG_FAT_FS=yCONFIG_MSDOS_FS=mCONFIG_VFAT_FS=yCONFIG_FAT_DEFAULT_CODEPAGE=437CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
#
# Pseudo filesystems
#CONFIG_PROC_FS=yCONFIG_PROC_KCORE=yCONFIG_SYSFS=y
# CONFIG_DEVPTS_FS_XATTR is not setCONFIG_TMPFS=yCONFIG_TMPFS_XATTR=y
# CONFIG_TMPFS_SECURITY is not setCONFIG_HUGETLBFS=yCONFIG_HUGETLB_PAGE=yCONFIG_RAMFS=y
#
# Miscellaneous filesystems
#CONFIG_ADFS_FS=mCONFIG_ADFS_FS_RW=yCONFIG_AFFS_FS=mCONFIG_HFS_FS=mCONFIG_HFSPLUS_FS=mCONFIG_BEFS_FS=m
# CONFIG_BEFS_DEBUG is not setCONFIG_BFS_FS=mCONFIG_EFS_FS=mCONFIG_JFFS_FS=mCONFIG_JFFS_FS_VERBOSE=0
# CONFIG_JFFS_PROC_FS is not setCONFIG_JFFS2_FS=mCONFIG_JFFS2_FS_DEBUG=0CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not setCONFIG_JFFS2_ZLIB=yCONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not setCONFIG_CRAMFS=mCONFIG_VXFS_FS=mCONFIG_HPFS_FS=mCONFIG_QNX4FS_FS=mCONFIG_QNX4FS_RW=yCONFIG_SYSV_FS=mCONFIG_UFS_FS=mCONFIG_UFS_FS_WRITE=y
#
# Network File Systems
#CONFIG_NFS_FS=mCONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not setCONFIG_NFS_V4=yCONFIG_NFS_DIRECTIO=yCONFIG_NFSD=mCONFIG_NFSD_V2_ACL=yCONFIG_NFSD_V3=yCONFIG_NFSD_V3_ACL=yCONFIG_NFSD_V4=yCONFIG_NFSD_TCP=yCONFIG_LOCKD=mCONFIG_LOCKD_V4=yCONFIG_EXPORTFS=mCONFIG_NFS_ACL_SUPPORT=mCONFIG_NFS_COMMON=yCONFIG_SUNRPC=mCONFIG_SUNRPC_GSS=mCONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_RPCSEC_GSS_SPKM3 is not setCONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not setCONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_XATTR is not set
# CONFIG_CIFS_EXPERIMENTAL is not setCONFIG_NCP_FS=mCONFIG_NCPFS_PACKET_SIGNING=yCONFIG_NCPFS_IOCTL_LOCKING=yCONFIG_NCPFS_STRONG=yCONFIG_NCPFS_NFS_NS=yCONFIG_NCPFS_OS2_NS=yCONFIG_NCPFS_SMALLDOS=yCONFIG_NCPFS_NLS=yCONFIG_NCPFS_EXTRAS=yCONFIG_CODA_FS=m
# CONFIG_CODA_FS_OLD_API is not setCONFIG_AFS_FS=mCONFIG_RXRPC=m
#
# Partition Types
#CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not setCONFIG_OSF_PARTITION=yCONFIG_AMIGA_PARTITION=yCONFIG_ATARI_PARTITION=yCONFIG_MAC_PARTITION=yCONFIG_MSDOS_PARTITION=yCONFIG_BSD_DISKLABEL=yCONFIG_MINIX_SUBPARTITION=yCONFIG_SOLARIS_X86_PARTITION=yCONFIG_UNIXWARE_DISKLABEL=yCONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not setCONFIG_SGI_PARTITION=yCONFIG_ULTRIX_PARTITION=yCONFIG_SUN_PARTITION=y
# CONFIG_EFI_PARTITION is not set
#
# Native Language Support
#CONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_NLS_CODEPAGE_437=mCONFIG_NLS_CODEPAGE_737=mCONFIG_NLS_CODEPAGE_775=mCONFIG_NLS_CODEPAGE_850=mCONFIG_NLS_CODEPAGE_852=mCONFIG_NLS_CODEPAGE_855=mCONFIG_NLS_CODEPAGE_857=mCONFIG_NLS_CODEPAGE_860=mCONFIG_NLS_CODEPAGE_861=mCONFIG_NLS_CODEPAGE_862=mCONFIG_NLS_CODEPAGE_863=mCONFIG_NLS_CODEPAGE_864=mCONFIG_NLS_CODEPAGE_865=mCONFIG_NLS_CODEPAGE_866=mCONFIG_NLS_CODEPAGE_869=mCONFIG_NLS_CODEPAGE_936=mCONFIG_NLS_CODEPAGE_950=mCONFIG_NLS_CODEPAGE_932=mCONFIG_NLS_CODEPAGE_949=mCONFIG_NLS_CODEPAGE_874=mCONFIG_NLS_ISO8859_8=mCONFIG_NLS_CODEPAGE_1250=mCONFIG_NLS_CODEPAGE_1251=m
# CONFIG_NLS_ASCII is not setCONFIG_NLS_ISO8859_1=mCONFIG_NLS_ISO8859_2=mCONFIG_NLS_ISO8859_3=mCONFIG_NLS_ISO8859_4=mCONFIG_NLS_ISO8859_5=mCONFIG_NLS_ISO8859_6=mCONFIG_NLS_ISO8859_7=mCONFIG_NLS_ISO8859_9=mCONFIG_NLS_ISO8859_13=mCONFIG_NLS_ISO8859_14=mCONFIG_NLS_ISO8859_15=mCONFIG_NLS_KOI8_R=mCONFIG_NLS_KOI8_U=mCONFIG_NLS_UTF8=m
#
# Profiling support
#
# CONFIG_PROFILING is not set
#
# Kernel hacking
#CONFIG_PRINTK_TIME=y
# CONFIG_PRINTK_IGNORE_LOGLEVEL is not setCONFIG_DEBUG_KERNEL=yCONFIG_MAGIC_SYSRQ=yCONFIG_LOG_BUF_SHIFT=15CONFIG_DETECT_SOFTLOCKUP=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not setCONFIG_DEBUG_PREEMPT=yCONFIG_DEBUG_IRQ_FLAGS=yCONFIG_WAKEUP_TIMING=y
# CONFIG_WAKEUP_LATENCY_HIST is not setCONFIG_PREEMPT_TRACE=y
# CONFIG_CRITICAL_PREEMPT_TIMING is not set
# CONFIG_CRITICAL_IRQSOFF_TIMING is not setCONFIG_LATENCY_TIMING=yCONFIG_LATENCY_TRACE=yCONFIG_MCOUNT=yCONFIG_RT_DEADLOCK_DETECT=y
# CONFIG_DEBUG_RT_LOCKING_MODE is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_HIGHMEM is not setCONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_FS is not setCONFIG_FRAME_POINTER=yCONFIG_EARLY_PRINTK=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_KPROBES is not set
# CONFIG_DEBUG_STACK_USAGE is not set
#
# Page alloc debug is incompatible with Software Suspend on i386 #
# CONFIG_4KSTACKS is not set CONFIG_X86_FIND_SMP_CONFIG=yCONFIG_X86_MPPARSE=y
#
# Security options
#
# CONFIG_KEYS is not setCONFIG_SECURITY=yCONFIG_SECURITY_NETWORK=yCONFIG_SECURITY_CAPABILITIES=mCONFIG_SECURITY_ROOTPLUG=m
# CONFIG_SECURITY_SECLVL is not setCONFIG_SECURITY_SELINUX=yCONFIG_SECURITY_SELINUX_BOOTPARAM=yCONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1CONFIG_SECURITY_SELINUX_DISABLE=yCONFIG_SECURITY_SELINUX_DEVELOP=yCONFIG_SECURITY_SELINUX_AVC_STATS=yCONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
#
# Cryptographic options
#CONFIG_CRYPTO=yCONFIG_CRYPTO_HMAC=yCONFIG_CRYPTO_NULL=mCONFIG_CRYPTO_MD4=mCONFIG_CRYPTO_MD5=yCONFIG_CRYPTO_SHA1=mCONFIG_CRYPTO_SHA256=mCONFIG_CRYPTO_SHA512=mCONFIG_CRYPTO_WP512=mCONFIG_CRYPTO_TGR192=mCONFIG_CRYPTO_DES=mCONFIG_CRYPTO_BLOWFISH=mCONFIG_CRYPTO_TWOFISH=mCONFIG_CRYPTO_SERPENT=m
# CONFIG_CRYPTO_AES_586 is not setCONFIG_CRYPTO_CAST5=mCONFIG_CRYPTO_CAST6=m
# CONFIG_CRYPTO_TEA is not setCONFIG_CRYPTO_ARC4=m
# CONFIG_CRYPTO_KHAZAD is not setCONFIG_CRYPTO_ANUBIS=mCONFIG_CRYPTO_DEFLATE=mCONFIG_CRYPTO_MICHAEL_MIC=mCONFIG_CRYPTO_CRC32C=mCONFIG_CRYPTO_TEST=m
#
# Hardware crypto devices
#
# CONFIG_CRYPTO_DEV_PADLOCK is not set
#
# Library routines
#CONFIG_CRC_CCITT=mCONFIG_CRC32=yCONFIG_LIBCRC32C=mCONFIG_ZLIB_INFLATE=yCONFIG_ZLIB_DEFLATE=mCONFIG_GENERIC_HARDIRQS=yCONFIG_GENERIC_IRQ_PROBE=yCONFIG_X86_SMP=yCONFIG_X86_HT=yCONFIG_X86_BIOS_REBOOT=yCONFIG_X86_TRAMPOLINE=yCONFIG_PC=y
Re: 2.6.13-rc6-rt8
Quoted 7 lines · Peter Bortas
2.6.13-rc6-rt8 fails to build with my configuration (attached):
net/built-in.o: In function `ip_rt_init':
: undefined reference to `__you_cannot_kmalloc_that_much' make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6.13-rc6'
make: *** [stamp-build] Error 2
ok, fixed the likely cause of this in -rt12. Could you check whether it builds for you now?
Ingo
Re: 2.6.13-rc6-rt8
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Peter Bortas
2.6.13-rc6-rt8 fails to build with my configuration (attached):
net/built-in.o: In function `ip_rt_init':
: undefined reference to `__you_cannot_kmalloc_that_much' make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6.13-rc6'
make: *** [stamp-build] Error 2
Quoted 4 lines
ok, fixed the likely cause of this in -rt12. Could you check whether it builds for you now?
Ingo
rc7-rt4 compiles fine now.
(Sorry I missed your message when originally sent.)
Signature · 1 line
Peter Bortas
Quoted 6 lines · Ingo Molnar
i have released the 2.6.13-rc6-rt3 tree, which can be downloaded from the usual place:
http://redhat.com/~mingo/realtime-preempt/
Changes since 2.6.13-rc6-rt2:
Ingo,
I haven't used any of the RT patches since V0.7.51-xx, but I upgraded to -rt8 yesterday and had a couple of problems. I've just noticed you released -rt9, but I don't think my problem is listed as fixed.. I'll upgrade anyway, in a minute.
The problem I'm having is that when the kernel probes my IDE devices it slows down, taking ages to complete the probe. Henceforth the kernel seems to work at a slower speed doing just about anything (compiling, etc.), but interactive performance is okay. It's a bizarre problem.
Of course, I assumed this was due to the latest timer changes, and so I disabled CONFIG_HIGH_RES_TIMERS and went back to CONFIG_HPET_TIMER. This works perfectly.
For the moment, is it worth debugging problems in the high res timers set or are there known (fixable) issues?
Signature · 6 lines
Cheers, Alistair. 'No sense being pessimistic, it probably wouldn't work anyway.' Third year Computer Science undergraduate. 1F2 55 South Clerk Street, Edinburgh, UK.
Alistair,
Quoted 8 lines · Alistair John Strachan
The problem I'm having is that when the kernel probes my IDE devices it slows down, taking ages to complete the probe. Henceforth the kernel seems to work at a slower speed doing just about anything (compiling, etc.), but interactive performance is okay. It's a bizarre problem.
Of course, I assumed this was due to the latest timer changes, and so I disabled
CONFIG_HIGH_RES_TIMERSand went back toCONFIG_HPET_TIMER. This works perfectly.
Can you please send me your .config which shows the problem ?
tglx