2004-11-15 17:41:47

by Cliff White

[permalink] [raw]
Subject: 2.6.10-rc1-mm5 - badness in enable_irg, BUG



This is on the 2.6.10-rc1-mm5 kernel with one compile fix patch

Machines are the OSDl 2 and 4 CPU boxes.
Test is reaim with the 'new_fserver' workload. The 'compute' and 'database' workloads aren't
showing this.

I see the BUG on ext3, reiserfs, xfs and jfs.

System usually completes the test run, and performance isn't off too much :)
--------------------------------
With ext3, get this at the start of the run
( Full run at: http://khack.osdl.org/stp/298664 )
---------------------------------
kernel: Badness in enable_irq at kernel/irq/manage.c:106
kernel: [<c013e6ac>] enable_irq+0xdc/0xf0
kernel: [<c025e7fa>] e100_up+0x10a/0x200
kernel: [<c025dbc0>] e100_intr+0x0/0x160
kernel: [<c025fa51>] e100_open+0x31/0x80
kernel: [<c02c9c4c>] dev_open+0x8c/0xa0
kernel: [<c02cb49a>] dev_change_flags+0x12a/0x150
kernel: [<c02c9aed>] dev_load+0x2d/0x80
kernel: [<c0306de3>] devinet_ioctl+0x273/0x670
kernel: [<c020a31e>] copy_to_user+0x3e/0x50
kernel: [<c03093c6>] inet_ioctl+0x66/0xb0
kernel: [<c02c0619>] sock_ioctl+0xc9/0x250
kernel: [<c0170c8a>] sys_ioctl+0xca/0x230
kernel: [<c0104681>] sysenter_past_esp+0x52/0x71
------------------------------------
Then, when the test runs:
-----------------------------------------
BUG: using smp_processor_id() in preemptible [00000001] code: mkdir/11768
caller is munmap_notify+0x7b/0x90 [oprofile]
[<c020a465>] smp_processor_id+0xb5/0xc0
[<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
[<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
[<c012b55d>] notifier_call_chain+0x2d/0x50
[<c011dd93>] profile_munmap+0x33/0x50
[<c01536f7>] sys_munmap+0x27/0x80
[<c01046d3>] syscall_call+0x7/0xb
printk: 41 messages suppressed.
BUG: using smp_processor_id() in preemptible [00000001] code: uname/11790
caller is munmap_notify+0x7b/0x90 [oprofile]
[<c020a465>] smp_processor_id+0xb5/0xc0
[<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
[<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
[<c012b55d>] notifier_call_chain+0x2d/0x50
[<c011dd93>] profile_munmap+0x33/0x50
[<c01536f7>] sys_munmap+0x27/0x80
[<c01046d3>] syscall_call+0x7/0xb
printk: 82 messages suppressed.
---------------------------------------
With xfs:
( Run http://khack.osdl.org/stp/298667
-------------------
BUG: using smp_processor_id() in preemptible [00000001] code: xfssyncd/7336
caller is xfs_log_force+0x2f/0xa0 [xfs]
[<c020a465>] smp_processor_id+0xb5/0xc0
[<f89f938f>] xfs_log_force+0x2f/0xa0 [xfs]
[<f89f938f>] xfs_log_force+0x2f/0xa0 [xfs]
[<f89f9d91>] xfs_log_need_covered+0x71/0xb0 [xfs]
[<f8a0dd01>] xfs_syncsub+0x51/0x330 [xfs]
[<c0126cf8>] del_singleshot_timer_sync+0x28/0x40
[<f8a0d349>] xfs_sync+0x29/0x30 [xfs]
[<f8a21f03>] vfs_sync+0x43/0x50 [xfs]
[<f8a2110f>] vfs_sync_worker+0x4f/0x60 [xfs]
[<f8a21281>] xfssyncd+0x161/0x230 [xfs]
[<f8a21120>] xfssyncd+0x0/0x230 [xfs]
[<c0102605>] kernel_thread_helper+0x5/0x10
BUG: using smp_processor_id() in preemptible [00000001] code: sleep/14682
caller is task_exit_notify+0x8/0x20 [oprofile]
[<c020a465>] smp_processor_id+0xb5/0xc0
[<f89129b8>] task_exit_notify+0x8/0x20 [oprofile]
[<f89129b8>] task_exit_notify+0x8/0x20 [oprofile]
[<c032be8d>] schedule_timeout+0x7d/0xd0
[<c012b55d>] notifier_call_chain+0x2d/0x50
[<c011dcf3>] profile_task_exit+0x33/0x50
[<c011fe8c>] do_exit+0x1c/0x510
[<c0127724>] sys_nanosleep+0xe4/0x180
[<c012048d>] do_group_exit+0x8d/0xc0
[<c0104681>] sysenter_past_esp+0x52/0x71

----------------------
cliffw
OSDL

-------------------
The church is near, but the road is icy.
The bar is far, but i will walk carefully. - Russian proverb


2004-11-15 17:51:28

by Cliff White

[permalink] [raw]
Subject: Re: 2.6.10-rc1-mm5 - badness in enable_irg, BUG

On Mon, 15 Nov 2004 09:37:59 -0800
cliff white <[email protected]> wrote:

>
>
> This is on the 2.6.10-rc1-mm5 kernel with one compile fix patch
>
> Machines are the OSDl 2 and 4 CPU boxes.
> Test is reaim with the 'new_fserver' workload. The 'compute' and 'database' workloads aren't
> showing this.
>
> I see the BUG on ext3, reiserfs, xfs and jfs.
>
> System usually completes the test run, and performance isn't off too much :)
> --------------------------------
> With ext3, get this at the start of the run
> ( Full run at: http://khack.osdl.org/stp/298664 )
> ---------------------------------
> kernel: Badness in enable_irq at kernel/irq/manage.c:106
> kernel: [<c013e6ac>] enable_irq+0xdc/0xf0
> kernel: [<c025e7fa>] e100_up+0x10a/0x200
> kernel: [<c025dbc0>] e100_intr+0x0/0x160
> kernel: [<c025fa51>] e100_open+0x31/0x80
> kernel: [<c02c9c4c>] dev_open+0x8c/0xa0
> kernel: [<c02cb49a>] dev_change_flags+0x12a/0x150
> kernel: [<c02c9aed>] dev_load+0x2d/0x80
> kernel: [<c0306de3>] devinet_ioctl+0x273/0x670
> kernel: [<c020a31e>] copy_to_user+0x3e/0x50
> kernel: [<c03093c6>] inet_ioctl+0x66/0xb0
> kernel: [<c02c0619>] sock_ioctl+0xc9/0x250
> kernel: [<c0170c8a>] sys_ioctl+0xca/0x230
> kernel: [<c0104681>] sysenter_past_esp+0x52/0x71
> ------------------------------------
> Then, when the test runs:
> -----------------------------------------
> BUG: using smp_processor_id() in preemptible [00000001] code: mkdir/11768
> caller is munmap_notify+0x7b/0x90 [oprofile]
> [<c020a465>] smp_processor_id+0xb5/0xc0
> [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> [<c012b55d>] notifier_call_chain+0x2d/0x50
> [<c011dd93>] profile_munmap+0x33/0x50
> [<c01536f7>] sys_munmap+0x27/0x80
> [<c01046d3>] syscall_call+0x7/0xb
> printk: 41 messages suppressed.
> BUG: using smp_processor_id() in preemptible [00000001] code: uname/11790
> caller is munmap_notify+0x7b/0x90 [oprofile]
> [<c020a465>] smp_processor_id+0xb5/0xc0
> [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> [<c012b55d>] notifier_call_chain+0x2d/0x50
> [<c011dd93>] profile_munmap+0x33/0x50
> [<c01536f7>] sys_munmap+0x27/0x80
> [<c01046d3>] syscall_call+0x7/0xb
> printk: 82 messages suppressed.
> ---------------------------------------
> With xfs:
> ( Run http://khack.osdl.org/stp/298667
> -------------------
> BUG: using smp_processor_id() in preemptible [00000001] code: xfssyncd/7336
> caller is xfs_log_force+0x2f/0xa0 [xfs]
> [<c020a465>] smp_processor_id+0xb5/0xc0
> [<f89f938f>] xfs_log_force+0x2f/0xa0 [xfs]
> [<f89f938f>] xfs_log_force+0x2f/0xa0 [xfs]
> [<f89f9d91>] xfs_log_need_covered+0x71/0xb0 [xfs]
> [<f8a0dd01>] xfs_syncsub+0x51/0x330 [xfs]
> [<c0126cf8>] del_singleshot_timer_sync+0x28/0x40
> [<f8a0d349>] xfs_sync+0x29/0x30 [xfs]
> [<f8a21f03>] vfs_sync+0x43/0x50 [xfs]
> [<f8a2110f>] vfs_sync_worker+0x4f/0x60 [xfs]
> [<f8a21281>] xfssyncd+0x161/0x230 [xfs]
> [<f8a21120>] xfssyncd+0x0/0x230 [xfs]
> [<c0102605>] kernel_thread_helper+0x5/0x10
> BUG: using smp_processor_id() in preemptible [00000001] code: sleep/14682
> caller is task_exit_notify+0x8/0x20 [oprofile]
> [<c020a465>] smp_processor_id+0xb5/0xc0
> [<f89129b8>] task_exit_notify+0x8/0x20 [oprofile]
> [<f89129b8>] task_exit_notify+0x8/0x20 [oprofile]
> [<c032be8d>] schedule_timeout+0x7d/0xd0
> [<c012b55d>] notifier_call_chain+0x2d/0x50
> [<c011dcf3>] profile_task_exit+0x33/0x50
> [<c011fe8c>] do_exit+0x1c/0x510
> [<c0127724>] sys_nanosleep+0xe4/0x180
> [<c012048d>] do_group_exit+0x8d/0xc0
> [<c0104681>] sysenter_past_esp+0x52/0x71
>
> ----------------------
> cliffw
> OSDL
>

Forget
kernel compile for above:
-----------------

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.10-rc1-mm5
# Fri Nov 12 13:28:21 2004
#
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_LOCK_KERNEL=y

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_HOTPLUG=y
CONFIG_KOBJECT_UEVENT=y
# CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
# CONFIG_CPUSETS is not set
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
# CONFIG_SHMEM is not set
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
CONFIG_TINY_SHMEM=y

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_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=y
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
# CONFIG_HPET_TIMER is not set
CONFIG_SMP=y
CONFIG_NR_CPUS=8
CONFIG_SCHED_SMT=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_BKL=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_TSC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_NONFATAL=y
CONFIG_X86_MCE_P4THERMAL=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_IRQBALANCE=y
CONFIG_HAVE_DEC_LOCK=y
# CONFIG_REGPARM is not set

#
# Performance-monitoring counters support
#
# CONFIG_PERFCTR is not set
CONFIG_KERN_PHYS_OFFSET=1
# CONFIG_KEXEC is not set

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION=""

#
# ACPI (Advanced Configuration and Power Interface) Support
#
# CONFIG_ACPI is not set
CONFIG_ACPI_BOOT=y
CONFIG_ACPI_BLACKLIST_YEAR=0

#
# APM (Advanced Power Management) BIOS Support
#
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set

#
# 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 set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_MSI is not set
CONFIG_PCI_LEGACY_PROC=y
CONFIG_PCI_NAMES=y
CONFIG_ISA=y
# CONFIG_EISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
# CONFIG_HOTPLUG_CPU is not set

#
# PCCARD (PCMCIA/CardBus) support
#
# CONFIG_PCCARD is not set

#
# PC-card bridges
#
CONFIG_PCMCIA_PROBE=y

#
# PCI Hotplug Support
#
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m
# CONFIG_DEBUG_DRIVER is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
CONFIG_PARPORT_PC_CML1=y
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_OTHER is not set
# CONFIG_PARPORT_1284 is not set

#
# Plug and Play support
#
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set

#
# Protocols
#
# CONFIG_ISAPNP is not set
# CONFIG_PNPBIOS is not set

#
# Block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_RAM is not set
CONFIG_INITRAMFS_SOURCE=""
CONFIG_LBD=y
# CONFIG_CDROM_PKTCDVD is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_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=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_IDE_TASK_IOCTL is not set

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
CONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=y
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_ARM is not set
# CONFIG_IDE_CHIPSETS is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
CONFIG_SCSI=y
CONFIG_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 set
# CONFIG_BLK_DEV_SR is not set
CONFIG_CHR_DEV_SG=y

#
# 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 is not set
# CONFIG_SCSI_FC_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 set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
CONFIG_SCSI_DPT_I2O=m
# CONFIG_SCSI_IN2000 is not set
# CONFIG_MEGARAID_NEWGEN is not set
CONFIG_MEGARAID_LEGACY=y
CONFIG_SCSI_SATA=y
# CONFIG_SCSI_SATA_AHCI is not set
# CONFIG_SCSI_SATA_SVW is not set
CONFIG_SCSI_ATA_PIIX=y
# CONFIG_SCSI_SATA_NV is not set
# CONFIG_SCSI_SATA_PROMISE is not set
CONFIG_SCSI_SATA_SX4=m
# CONFIG_SCSI_SATA_SIL is not set
CONFIG_SCSI_SATA_SIS=m
# CONFIG_SCSI_SATA_ULI is not set
# CONFIG_SCSI_SATA_VIA is not set
# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
CONFIG_SCSI_IPR=m
# CONFIG_SCSI_IPR_TRACE is not set
# CONFIG_SCSI_IPR_DUMP 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 set
# CONFIG_SCSI_QLOGIC_1280_1040 is not set
CONFIG_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_QLA6322 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 is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
CONFIG_IEEE1394=y

#
# Subsystem Options
#
# CONFIG_IEEE1394_VERBOSEDEBUG is not set
# CONFIG_IEEE1394_OUI_DB is not set
# CONFIG_IEEE1394_EXTRA_CONFIG_ROMS is not set

#
# Device Drivers
#

#
# Texas Instruments PCILynx requires I2C
#
CONFIG_IEEE1394_OHCI1394=y

#
# Protocol Drivers
#
# CONFIG_IEEE1394_VIDEO1394 is not set
# CONFIG_IEEE1394_SBP2 is not set
# CONFIG_IEEE1394_ETH1394 is not set
# CONFIG_IEEE1394_DV1394 is not set
CONFIG_IEEE1394_RAWIO=y
# CONFIG_IEEE1394_CMP is not set

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Networking support
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
# CONFIG_NETLINK_DEV is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_TUNNEL is not set
CONFIG_IP_TCPDIAG=y
# CONFIG_IP_TCPDIAG_IPV6 is not set
# CONFIG_IPV6 is not set
# CONFIG_NETFILTER is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set
# CONFIG_NET_CLS_ROUTE is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_KGDBOE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NETPOLL_RX is not set
# CONFIG_NETPOLL_TRAP is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_NET_SB1000 is not set

#
# ARCnet devices
#
# CONFIG_ARCNET is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set

#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_CS89x0 is not set
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
CONFIG_E100=y
# CONFIG_E100_NAPI is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
CONFIG_8139TOO=y
CONFIG_8139TOO_PIO=y
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139TOO_8129 is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_NET_POCKET is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set

#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
CONFIG_S2IO=m
# CONFIG_S2IO_NAPI is not set
# CONFIG_2BUFF_MODE is not set

#
# Token Ring devices
#
# CONFIG_TR is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set

#
# 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=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input I/O drivers
#
# CONFIG_GAMEPORT is not set
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_SERIAL=y
# CONFIG_MOUSE_INPORT is not set
# CONFIG_MOUSE_LOGIBM is not set
# CONFIG_MOUSE_PC110PAD is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_PRINTER=y
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_TIPAR is not set

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_NVRAM is not set
CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_AGP is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set
CONFIG_RAW_DRIVER=m
CONFIG_MAX_RAW_DEVS=256
# CONFIG_HANGCHECK_TIMER is not set

#
# I2C support
#
# CONFIG_I2C is not set

#
# Dallas's 1-wire bus
#
# CONFIG_W1 is not set

#
# Misc devices
#
# CONFIG_IBM_ASM is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set

#
# Graphics support
#
# CONFIG_FB is not set
# CONFIG_VIDEO_SELECT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
# CONFIG_SOUND is not set

#
# USB support
#
# CONFIG_USB is not set
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set

#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_REISERFS_FS_XATTR is not set
CONFIG_JFS_FS=m
# CONFIG_JFS_POSIX_ACL is not set
# CONFIG_JFS_DEBUG is not set
CONFIG_JFS_STATISTICS=y
CONFIG_XFS_FS=m
# CONFIG_XFS_RT is not set
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_SECURITY is not set
# CONFIG_XFS_POSIX_ACL is not set
# CONFIG_MINIX_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_QUOTA is not set
CONFIG_DNOTIFY=y
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVPTS_FS_XATTR is not set
CONFIG_TMPFS=y
# CONFIG_TMPFS_XATTR is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=y
CONFIG_EXPORTFS=y
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set

#
# Profiling support
#
CONFIG_PROFILING=y
CONFIG_OPROFILE=m

#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_INFO is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_EARLY_PRINTK=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_KPROBES is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_4KSTACKS=y
CONFIG_X86_FIND_SMP_CONFIG=y
CONFIG_X86_MPPARSE=y
# CONFIG_KGDB is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

#
# Library routines
#
# CONFIG_CRC_CCITT is not set
CONFIG_CRC32=y
CONFIG_LIBCRC32C=m
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_X86_TRAMPOLINE=y
CONFIG_PC=y

------------------

cliffw

2004-11-18 05:02:39

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.10-rc1-mm5 - badness in enable_irg, BUG

cliff white <[email protected]> wrote:
>
>
>
> This is on the 2.6.10-rc1-mm5 kernel with one compile fix patch
>
> Machines are the OSDl 2 and 4 CPU boxes.
> Test is reaim with the 'new_fserver' workload. The 'compute' and 'database' workloads aren't
> showing this.
>
> I see the BUG on ext3, reiserfs, xfs and jfs.
>
> System usually completes the test run, and performance isn't off too much :)
> --------------------------------
> With ext3, get this at the start of the run
> ( Full run at: http://khack.osdl.org/stp/298664 )
> ---------------------------------
> kernel: Badness in enable_irq at kernel/irq/manage.c:106
> kernel: [<c013e6ac>] enable_irq+0xdc/0xf0
> kernel: [<c025e7fa>] e100_up+0x10a/0x200
> kernel: [<c025dbc0>] e100_intr+0x0/0x160
> kernel: [<c025fa51>] e100_open+0x31/0x80
> kernel: [<c02c9c4c>] dev_open+0x8c/0xa0
> kernel: [<c02cb49a>] dev_change_flags+0x12a/0x150
> kernel: [<c02c9aed>] dev_load+0x2d/0x80
> kernel: [<c0306de3>] devinet_ioctl+0x273/0x670
> kernel: [<c020a31e>] copy_to_user+0x3e/0x50
> kernel: [<c03093c6>] inet_ioctl+0x66/0xb0
> kernel: [<c02c0619>] sock_ioctl+0xc9/0x250
> kernel: [<c0170c8a>] sys_ioctl+0xca/0x230
> kernel: [<c0104681>] sysenter_past_esp+0x52/0x71

yeah, this is due to a known-to-be-dodgy e100 patch in -mm.

> ------------------------------------
> Then, when the test runs:
> -----------------------------------------
> BUG: using smp_processor_id() in preemptible [00000001] code: mkdir/11768
> caller is munmap_notify+0x7b/0x90 [oprofile]
> [<c020a465>] smp_processor_id+0xb5/0xc0
> [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> [<c012b55d>] notifier_call_chain+0x2d/0x50
> [<c011dd93>] profile_munmap+0x33/0x50
> [<c01536f7>] sys_munmap+0x27/0x80
> [<c01046d3>] syscall_call+0x7/0xb

ho hum, I guess we should suppress these oprofile warnings somehow.

Ingo, is there an smp_processor_id() variant which bypasses the warning?

btw, this:

#if !defined(__smp_processor_id) || !defined(CONFIG_PREEMPT)
# define smp_processor_id() 0
#endif
...
#endif /* !SMP */

#ifdef __smp_processor_id
# if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
/*
* temporary debugging check detecting places that use
* smp_processor_id() in a potentially unsafe way:
*/
extern unsigned int smp_processor_id(void);
# else
# define smp_processor_id() __smp_processor_id()
# endif
# define _smp_processor_id() __smp_processor_id()
#else
# define _smp_processor_id() smp_processor_id()
#endif

is insane. Any chance of simplifying it all?

2004-11-18 08:51:22

by Ingo Molnar

[permalink] [raw]
Subject: Re: 2.6.10-rc1-mm5 - badness in enable_irg, BUG


* Andrew Morton <[email protected]> wrote:

> > BUG: using smp_processor_id() in preemptible [00000001] code: mkdir/11768
> > caller is munmap_notify+0x7b/0x90 [oprofile]
> > [<c020a465>] smp_processor_id+0xb5/0xc0
> > [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> > [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> > [<c012b55d>] notifier_call_chain+0x2d/0x50
> > [<c011dd93>] profile_munmap+0x33/0x50
> > [<c01536f7>] sys_munmap+0x27/0x80
> > [<c01046d3>] syscall_call+0x7/0xb
>
> ho hum, I guess we should suppress these oprofile warnings somehow.
>
> Ingo, is there an smp_processor_id() variant which bypasses the warning?

yeah, just use _smp_processor_id() for the checking-less variant.

> btw, this:

> is insane. Any chance of simplifying it all?

since usually there are lots of arch-level false positives it didnt seem
prudent to enable the warning unconditionally for every arch. So an arch
can enable it right now by changing its smp_processor_id definition to
__smp_processor_id - and the #ifdefs will do their job to adapt. Once
most architectures have this enabled (right now only x86 and x64 have
it) we could simplify it down by making it unconditional but right now i
dont think it's a good idea.

Ingo

2004-11-18 09:15:26

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.10-rc1-mm5 - badness in enable_irg, BUG

Ingo Molnar <[email protected]> wrote:
>
>
> * Andrew Morton <[email protected]> wrote:
>
> > > BUG: using smp_processor_id() in preemptible [00000001] code: mkdir/11768
> > > caller is munmap_notify+0x7b/0x90 [oprofile]
> > > [<c020a465>] smp_processor_id+0xb5/0xc0
> > > [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> > > [<f8912a4b>] munmap_notify+0x7b/0x90 [oprofile]
> > > [<c012b55d>] notifier_call_chain+0x2d/0x50
> > > [<c011dd93>] profile_munmap+0x33/0x50
> > > [<c01536f7>] sys_munmap+0x27/0x80
> > > [<c01046d3>] syscall_call+0x7/0xb
> >
> > ho hum, I guess we should suppress these oprofile warnings somehow.
> >
> > Ingo, is there an smp_processor_id() variant which bypasses the warning?
>
> yeah, just use _smp_processor_id() for the checking-less variant.

OK.

> > btw, this:
>
> > is insane. Any chance of simplifying it all?
>
> since usually there are lots of arch-level false positives it didnt seem
> prudent to enable the warning unconditionally for every arch. So an arch
> can enable it right now by changing its smp_processor_id definition to
> __smp_processor_id - and the #ifdefs will do their job to adapt. Once
> most architectures have this enabled (right now only x86 and x64 have
> it) we could simplify it down by making it unconditional but right now i
> dont think it's a good idea.
>

Well can we at least stick a comment in there explaining to the
long-suffering reader what the difference is between smp_processor_id(),
_smp_processor_id() and __smp_processor_id()? And what the architecture's
options are?

Or should we go through every arch and rename their smp_processor_id() to
__smp_processor_id()? That would make sense, and would simplify that piece
of code.

2004-11-18 09:25:34

by Ingo Molnar

[permalink] [raw]
Subject: Re: 2.6.10-rc1-mm5 - badness in enable_irg, BUG


* Andrew Morton <[email protected]> wrote:

> Well can we at least stick a comment in there explaining to the
> long-suffering reader what the difference is between
> smp_processor_id(), _smp_processor_id() and __smp_processor_id()? And
> what the architecture's options are?

doc-patch against -rc2-mm1 attached.

> Or should we go through every arch and rename their smp_processor_id()
> to __smp_processor_id()? That would make sense, and would simplify
> that piece of code.

initially the rate of false positives is like 90%, so there would only
be annoyance coming out of this patch. Arch maintainers should have the
ability to enable this on their own pace i think. Once the majority of
arches have enabled this we can force it on for all architectures.

Ingo

Signed-off-by: Ingo Molnar <[email protected]>

--- linux/include/linux/smp.h.orig
+++ linux/include/linux/smp.h
@@ -109,12 +109,24 @@ static inline void smp_send_reschedule(i

#endif /* !SMP */

+/*
+ * DEBUG_PREEMPT support: check whether smp_processor_id() is being
+ * used in a preemption-safe way.
+ *
+ * An architecture has to enable this debugging code explicitly.
+ * It can do so by renaming the smp_processor_id() macro to
+ * __smp_processor_id(). This should only be done after some minimal
+ * testingy, because usually there are a number of false positives
+ * that an architecture will trigger.
+ *
+ * To fix a false positives (i.e. smp_processor_id() use that the
+ * debugging code reports but which use for some reason is legal),
+ * change the smp_processor_id() reference to _smp_processor_id(),
+ * which is the nondebug variant. NOTE: dont use this to hack around
+ * real bugs.
+ */
#ifdef __smp_processor_id
# if defined(CONFIG_PREEMPT) && defined(CONFIG_DEBUG_PREEMPT)
- /*
- * temporary debugging check detecting places that use
- * smp_processor_id() in a potentially unsafe way:
- */
extern unsigned int smp_processor_id(void);
# else
# define smp_processor_id() __smp_processor_id()