19 Jul, 2008

1 commit


18 Jul, 2008

1 commit


17 Jul, 2008

3 commits

  • make function tracing more robust: do not trace library functions.

    We've already got a sizable list of exceptions:

    ifdef CONFIG_FTRACE
    # Do not profile string.o, since it may be used in early boot or vdso
    CFLAGS_REMOVE_string.o = -pg
    # Also do not profile any debug utilities
    CFLAGS_REMOVE_spinlock_debug.o = -pg
    CFLAGS_REMOVE_list_debug.o = -pg
    CFLAGS_REMOVE_debugobjects.o = -pg
    CFLAGS_REMOVE_find_next_bit.o = -pg
    CFLAGS_REMOVE_cpumask.o = -pg
    CFLAGS_REMOVE_bitmap.o = -pg
    endif

    ... and the pattern has been that random library functionality showed
    up in ftrace's critical path (outside of its recursion check), causing
    hard to debug lockups.

    So be a bit defensive about it and exclude all lib/*.o functions by
    default. It's not that they are overly interesting for tracing purposes
    anyway. Specific ones can still be traced, in an opt-in manner.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • MAXSMP brings in lots of use of various bitops in smp_processor_id()
    and friends - causing ftrace to lock up during bootup:

    calling anon_inode_init+0x0/0x130
    initcall anon_inode_init+0x0/0x130 returned 0 after 0 msecs
    calling acpi_event_init+0x0/0x57
    [ hard hang ]

    So exclude the bitops facilities from tracing.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (72 commits)
    Revert "x86/PCI: ACPI based PCI gap calculation"
    PCI: remove unnecessary volatile in PCIe hotplug struct controller
    x86/PCI: ACPI based PCI gap calculation
    PCI: include linux/pm_wakeup.h for device_set_wakeup_capable
    PCI PM: Fix pci_prepare_to_sleep
    x86/PCI: Fix PCI config space for domains > 0
    Fix acpi_pm_device_sleep_wake() by providing a stub for CONFIG_PM_SLEEP=n
    PCI: Simplify PCI device PM code
    PCI PM: Introduce pci_prepare_to_sleep and pci_back_from_sleep
    PCI ACPI: Rework PCI handling of wake-up
    ACPI: Introduce new device wakeup flag 'prepared'
    ACPI: Introduce acpi_device_sleep_wake function
    PCI: rework pci_set_power_state function to call platform first
    PCI: Introduce platform_pci_power_manageable function
    ACPI: Introduce acpi_bus_power_manageable function
    PCI: make pci_name use dev_name
    PCI: handle pci_name() being const
    PCI: add stub for pci_set_consistent_dma_mask()
    PCI: remove unused arch pcibios_update_resource() functions
    PCI: fix pci_setup_device()'s sprinting into a const buffer
    ...

    Fixed up conflicts in various files (arch/x86/kernel/setup_64.c,
    arch/x86/pci/irq.c, arch/x86/pci/pci.h, drivers/acpi/sleep/main.c,
    drivers/pci/pci.c, drivers/pci/pci.h, include/acpi/acpi_bus.h) from x86
    and ACPI updates manually.

    Linus Torvalds
     

16 Jul, 2008

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (102 commits)
    [SCSI] scsi_dh: fix kconfig related build errors
    [SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
    [SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
    [SCSI] make struct scsi_{host,target}_type static
    [SCSI] fix locking in host use of blk_plug_device()
    [SCSI] zfcp: Cleanup external header file
    [SCSI] zfcp: Cleanup code in zfcp_erp.c
    [SCSI] zfcp: zfcp_fsf cleanup.
    [SCSI] zfcp: consolidate sysfs things into one file.
    [SCSI] zfcp: Cleanup of code in zfcp_aux.c
    [SCSI] zfcp: Cleanup of code in zfcp_scsi.c
    [SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
    [SCSI] zfcp: Small QDIO cleanups
    [SCSI] zfcp: Adapter reopen for large number of unsolicited status
    [SCSI] zfcp: Fix error checking for ELS ADISC requests
    [SCSI] zfcp: wait until adapter is finished with ERP during auto-port
    [SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
    [SCSI] sg: Add target reset support
    [SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
    [SCSI] sd: Move scsi_disk() accessor function to sd.h
    ...

    Linus Torvalds
     
  • Conflicts:

    arch/x86/xen/smp.c
    kernel/sched_rt.c
    net/iucv/iucv.c

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Ingo Molnar
     
  • * 'core/stacktrace' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    generic-ipi: powerpc/generic-ipi tree build failure
    stacktrace: fix build failure on sparc64
    stacktrace: export save_stack_trace[_tsk]
    stacktrace: fix modular build, export print_stack_trace and save_stack_trace
    backtrace: replace timer with tasklet + completions
    stacktrace: add saved stack traces to backtrace self-test
    stacktrace: print_stack_trace() cleanup
    debugging: make stacktrace independent from DEBUG_KERNEL
    stacktrace: don't crash on invalid stack trace structs

    Linus Torvalds
     

15 Jul, 2008

1 commit

  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (61 commits)
    ext4: Documention update for new ordered mode and delayed allocation
    ext4: do not set extents feature from the kernel
    ext4: Don't allow nonextenst mount option for large filesystem
    ext4: Enable delalloc by default.
    ext4: delayed allocation i_blocks fix for stat
    ext4: fix delalloc i_disksize early update issue
    ext4: Handle page without buffers in ext4_*_writepage()
    ext4: Add ordered mode support for delalloc
    ext4: Invert lock ordering of page_lock and transaction start in delalloc
    mm: Add range_cont mode for writeback
    ext4: delayed allocation ENOSPC handling
    percpu_counter: new function percpu_counter_sum_and_set
    ext4: Add delayed allocation support in data=writeback mode
    vfs: add hooks for ext4's delayed allocation support
    jbd2: Remove data=ordered mode support using jbd buffer heads
    ext4: Use new framework for data=ordered mode in JBD2
    jbd2: Implement data=ordered mode handling via inodes
    vfs: export filemap_fdatawrite_range()
    ext4: Fix lock inversion in ext4_ext_truncate()
    ext4: Invert the locking order of page_lock and transaction start
    ...

    Linus Torvalds
     

12 Jul, 2008

2 commits

  • The SCSI Block Protocol uses this 16-bit CRC to verify the integrity
    of each data sector. crc_t10dif() is used by sd_dif.c when performing
    I/O to or from disks formatted with protection information.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     
  • Delayed allocation need to check free blocks at every write time.
    percpu_counter_read_positive() is not quit accurate. delayed
    allocation need a more accurate accounting, but using
    percpu_counter_sum_positive() is frequently is quite expensive.

    This patch added a new function to update center counter when sum
    per-cpu counter, to increase the accurate rate for next
    percpu_counter_read() and require less calling expensive
    percpu_counter_sum().

    Signed-off-by: Mingming Cao
    Signed-off-by: "Theodore Ts'o"

    Mingming Cao
     

11 Jul, 2008

1 commit


10 Jul, 2008

1 commit


07 Jul, 2008

4 commits

  • They print out a pointer in symbolic format, if possible (ie using
    symbolic KALLSYMS information). The '%pS' format is for regular direct
    pointers (which can point to data or code and that you find on the stack
    during backtraces etc), while '%pF' is for C function pointer types.

    On most architectures, the two mean exactly the same thing, but some
    architectures use an indirect pointer for C function pointers, where the
    function pointer points to a function descriptor (which in turn contains
    the actual pointer to the code). The '%pF' code automatically does the
    appropriate function descriptor dereference on such architectures.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • This expands the kernel '%p' handling with an arbitrary alphanumberic
    specifier extension string immediately following the '%p'. Right now
    it's just being ignored, but the next commit will start adding some
    specific pointer type extensions.

    NOTE! The reason the extension is appended to the '%p' is to allow
    minimal gcc type checking: gcc will still see the '%p' and will check
    that the argument passed in is indeed a pointer, and yet will not
    complain about the extended information that gcc doesn't understand
    about (on the other hand, it also won't actually check that the pointer
    type and the extension are compatible).

    Alphanumeric characters were chosen because there is no sane existing
    use for a string format with a hex pointer representation immediately
    followed by alphanumerics (which is what such a format string would have
    traditionally resulted in).

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The actual code is the same, just split out into a helper function.
    This makes it easier to read, and allows for simple future extension
    of %p handling.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The actual code is the same, just split out into a helper function.
    This makes it easier to read, and allows for future sharing of the
    string code.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

06 Jul, 2008

1 commit


05 Jul, 2008

2 commits

  • Commit 95b570c9cef3b12356454c7112571b7e406b4b51 ("Taint kernel after
    WARN_ON(condition)") introduced a TAINT_WARN that was implemented for
    all architectures using the generic warn_on_slowpath(), which excluded
    any architecture that set HAVE_ARCH_WARN_ON.

    As all of the architectures that implement their own WARN_ON() all go
    through the report_bug() path (specifically handling BUG_TRAP_TYPE_WARN),
    taint the kernel there as well for consistency.

    Tested on avr32 and sh. Also relevant for s390, parisc, and powerpc.

    Signed-off-by: Haavard Skinnemoen
    Signed-off-by: Paul Mundt
    Acked-by: Kyle McMartin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     
  • Remove all clameter@sgi.com addresses from the kernel tree since they will
    become invalid on June 27th. Change my maintainer email address for the
    slab allocators to cl@linux-foundation.org (which will be the new email
    address for the future).

    Signed-off-by: Christoph Lameter
    Signed-off-by: Christoph Lameter
    Cc: Pekka Enberg
    Cc: Stephen Rothwell
    Cc: Matt Mackall
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

03 Jul, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
    net: fib_rules: fix error code for unsupported families
    netdevice: Fix wrong string handle in kernel command line parsing
    net: Tyop of sk_filter() comment
    netlink: Unneeded local variable
    net-sched: fix filter destruction in atm/hfsc qdisc destruction
    net-sched: change tcf_destroy_chain() to clear start of filter list
    ipv4: fix sysctl documentation of time related values
    mac80211: don't accept WEP keys other than WEP40 and WEP104
    hostap: fix sparse warnings
    hostap: don't report useless WDS frames by default
    textsearch: fix Boyer-Moore text search bug
    netfilter: nf_conntrack_tcp: fixing to check the lower bound of valid ACK
    ipv6 route: Convert rt6_device_match() to use RT6_LOOKUP_F_xxx flags.
    netlabel: Fix a problem when dumping the default IPv6 static labels
    net/inet_lro: remove setting skb->ip_summed when not LRO-able
    inet fragments: fix race between inet_frag_find and inet_frag_secret_rebuild
    CONNECTOR: add a proc entry to list connectors
    netlink: Fix some doc comments in net/netlink/attr.c
    tcp: /proc/net/tcp rto,ato values not scaled properly (v2)
    include/linux/netdevice.h: don't export MAX_HEADER to userspace
    ...

    Linus Torvalds
     

01 Jul, 2008

1 commit

  • The current logic has a bug which cannot find matching pattern, if the
    pattern is matched from the first character of target string.
    for example:
    pattern=abc, string=abcdefg
    pattern=a, string=abcdefg
    Searching algorithm should return 0 for those things.

    Signed-off-by: Joonwoo Park
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Joonwoo Park
     

28 Jun, 2008

1 commit

  • This patch adds saved stack-traces to the backtrace suite of self-tests.

    Note that we don't depend on or unconditionally enable CONFIG_STACKTRACE
    because not all architectures may have it (and we still want to enable the
    other tests for those architectures).

    Cc: Arjan van de Ven
    Signed-off-by: Vegard Nossum
    Cc: Arjan van de Ven
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar

    Vegard Nossum
     

19 Jun, 2008

1 commit

  • This patch re-institutes the ability to build rcutorture directly into
    the Linux kernel. The reason that this capability was removed was that
    this could result in your kernel being pretty much useless, as rcutorture
    would be running starting from early boot. This problem has been avoided
    by (1) making rcutorture run only three seconds of every six by default,
    (2) adding a CONFIG_RCU_TORTURE_TEST_RUNNABLE that permits rcutorture
    to be quiesced at boot time, and (3) adding a sysctl in /proc named
    /proc/sys/kernel/rcutorture_runnable that permits rcutorture to be
    quiesced and unquiesced when built into the kernel.

    Please note that this /proc file is -not- available when rcutorture
    is built as a module. Please also note that to get the earlier
    take-no-prisoners behavior, you must use the boot command line to set
    rcutorture's "stutter" parameter to zero.

    The rcutorture quiescing mechanism is currently quite crude: loops
    in each rcutorture process that poll a global variable once per tick.
    Suggestions for improvement are welcome. The default action will
    be to reduce the polling rate to a few times per second.

    Signed-off-by: Paul E. McKenney
    Suggested-by: Ingo Molnar
    Signed-off-by: Ingo Molnar

    Paul E. McKenney
     

18 Jun, 2008

1 commit

  • Daniel J Blueman reported:
    | =======================================================
    | [ INFO: possible circular locking dependency detected ]
    | 2.6.26-rc5-201c #1
    | -------------------------------------------------------
    | nscd/3669 is trying to acquire lock:
    | (&n->list_lock){.+..}, at: [] deactivate_slab+0x173/0x1e0
    |
    | but task is already holding lock:
    | (&obj_hash[i].lock){++..}, at: []
    | __debug_object_init+0x2f/0x350
    |
    | which lock already depends on the new lock.

    There are two locks involved here; the first is a SLUB-local lock, and
    the second is a debugobjects-local lock. They are basically taken in two
    different orders:

    1. SLUB { debugobjects { ... } }
    2. debugobjects { SLUB { ... } }

    This patch changes pattern #2 by trying to fill the memory pool (e.g.
    the call into SLUB/kmalloc()) outside the debugobjects lock, so now the
    two patterns look like this:

    1. SLUB { debugobjects { ... } }
    2. SLUB { } debugobjects { ... }

    [ daniel.blueman@gmail.com: pool_lock needs to be taken irq safe in fill_pool ]

    Reported-by: Daniel J Blueman
    Signed-off-by: Vegard Nossum
    Signed-off-by: Thomas Gleixner

    Vegard Nossum
     

16 Jun, 2008

3 commits


13 Jun, 2008

1 commit

  • We shrink a radix tree when its root node has only one child, in the left
    most slot. The child becomes the new root node. To perform this
    operation in a manner compatible with concurrent lockless lookups, we
    atomically switch the root pointer from the parent to its child.

    However a concurrent lockless lookup may now have loaded a pointer to the
    parent (and is presently deciding what to do next). For this reason, we
    also have to keep the parent node in a valid state after shrinking the
    tree, until the next RCU grace period -- otherwise this lookup with the
    parent pointer may not do the right thing. Notably, we need to keep the
    child in the left most slot there in case that is requested by the lookup.

    This is all pretty standard RCU stuff. It is worth repeating because in
    my eagerness to obey the radix tree node constructor scheme, I had broken
    it by zeroing the radix tree node before the grace period.

    What could happen is that a lookup can load the parent pointer, then
    decide it wants to follow the left most child slot, only to find the slot
    contained NULL due to the concurrent shrinker having zeroed the parent
    node before waiting for a grace period. The lookup would return a false
    negative as a result.

    Fix it by doing that clearing in the RCU callback. I would normally want
    to rip out the constructor entirely, but radix tree nodes are one of those
    places where they make sense (only few cachelines will be touched soon
    after allocation).

    This was never actually found in any lockless pagecache testing or by the
    test harness, but by seeing the odd problem with my scalable vmap rewrite.
    I have not tickled the test harness into reproducing it yet, but I'll
    keep working at it.

    Fortunately, it is not a problem anywhere lockless pagecache is used in
    mainline kernels (pagecache probe is not a guarantee, and brd does not
    have concurrent lookups and deletes).

    Signed-off-by: Nick Piggin
    Acked-by: Peter Zijlstra
    Cc: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

12 Jun, 2008

2 commits

  • iter_div_u64_rem is used in the x86-64 vdso, which cannot call other
    kernel code. For this case, provide the always_inlined version,
    __iter_div_u64_rem.

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     
  • We have a few instances of the open-coded iterative div/mod loop, used
    when we don't expcet the dividend to be much bigger than the divisor.
    Unfortunately modern gcc's have the tendency to strength "reduce" this
    into a full mod operation, which isn't necessarily any faster, and
    even if it were, doesn't exist if gcc implements it in libgcc.

    The workaround is to put a dummy asm statement in the loop to prevent
    gcc from performing the transformation.

    This patch creates a single implementation of this loop, and uses it
    to replace the open-coded versions I know about.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Andrew Morton
    Cc: john stultz
    Cc: Segher Boessenkool
    Cc: Christian Kujau
    Cc: Robert Hancock
    Signed-off-by: Ingo Molnar

    Jeremy Fitzhardinge
     

11 Jun, 2008

1 commit

  • Detect all physical PCI slots as described by ACPI, and create entries in
    /sys/bus/pci/slots/.

    Not all physical slots are hotpluggable, and the acpiphp module does not
    detect them. Now we know the physical PCI geography of our system, without
    caring about hotplug.

    [kaneshige.kenji@jp.fujitsu.com: export-kobject_rename-for-pci_hotplug_core]
    Signed-off-by: Kenji Kaneshige
    Acked-by: Greg KH
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix build with CONFIG_DMI=n]
    Signed-off-by: Alex Chiang
    Cc: Greg KH
    Cc: Kristen Carlson Accardi
    Cc: Len Brown
    Acked-by: Len Brown
    Acked-by: Kenji Kaneshige
    Signed-off-by: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Jesse Barnes

    Alex Chiang
     

07 Jun, 2008

1 commit

  • Bluetooth will be able to use this.

    Signed-off-by: Harvey Harrison
    Cc: Marcel Holtmann
    Cc: Dave Young
    Cc: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     

25 May, 2008

1 commit


24 May, 2008

5 commits

  • This patch removes the Makefile turd and uses the nice CFLAGS_REMOVE macro
    in the lib directory.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     
  • The debug functions in spin_lock debugging pollute the output of the
    function tracer. This patch adds the debug files in the lib director
    to those that should not be compiled with mcount tracing.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     
  • Most archs define the string and memory compare functions in assembly.
    Some do not. But these functions may be used in some archs at early
    boot up.

    Since most archs define this code in assembly and they are not usually
    traced, there's no need to trace them when they are not defined in
    assembly.

    This patch removes the -pg from the CFLAGS for lib/string.o.
    This prevents the string functions use in either vdso or early bootup
    from crashing the system.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     
  • The debug smp_processor_id caused a recursive fault in debugging
    the irqsoff tracer. The tracer used a smp_processor_id in the
    ftrace callback, and this function called preempt_disable which
    also is traced. This caused a recursive fault (stack overload).

    Since using smp_processor_id without debugging on does not cause
    faults with the tracer (even when the tracer is wrong), the
    debug version should not cause a system reboot.

    This changes the debug_smp_processor_id to use the notrace versions
    of preempt_disable and enable.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Steven Rostedt
     
  • If CONFIG_FTRACE is selected and /proc/sys/kernel/ftrace_enabled is
    set to a non-zero value the ftrace routine will be called everytime
    we enter a kernel function that is not marked with the "notrace"
    attribute.

    The ftrace routine will then call a registered function if a function
    happens to be registered.

    [ This code has been highly hacked by Steven Rostedt and Ingo Molnar,
    so don't blame Arnaldo for all of this ;-) ]

    Update:
    It is now possible to register more than one ftrace function.
    If only one ftrace function is registered, that will be the
    function that ftrace calls directly. If more than one function
    is registered, then ftrace will call a function that will loop
    through the functions to call.

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    Arnaldo Carvalho de Melo