01 Aug, 2006

40 commits

  • The recent changes from irqtrace feature has added overheads to
    local_bh_disable and local_bh_enable that reduces UDP performance across
    x86_64 and IA64, even though IA64 does not support the irqtrace feature.
    Patch in question is

    [PATCH]lockdep: irqtrace subsystem, core
    http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=c
    ommit;h=de30a2b355ea85350ca2f58f3b9bf4e5bc007986

    Prior to this patch, local_bh_disable was a short macro. Now it is a
    function which calls __local_bh_disable with added irq flags save and
    restore. The irq flags save and restore were also added to
    local_bh_enable, probably for injecting the trace irqs code.

    This overhead is on the generic code path across all architectures. On a
    IA_64 test machine (Itanium-2 1.6 GHz) running a benchmark like netperf's
    UDP streaming test, the added overhead results in a drop of 3% in
    throughput, as udp_sendmsg calls the local_bh_enable/disable several times.

    Other workloads that have heavy usages of local_bh_enable/disable could
    also be affected. The patch ideally should not have affected IA-64
    performance as it does not have IRQ tracing support. A significant portion
    of the overhead is in the added irq flags save and restore, which I think
    is not needed if IRQ tracing is unused. A suggested patch is attached
    below that recovers the lost performance. However, the "ifdef"s in the
    patch are a bit ugly.

    Signed-off-by: Tim Chen
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Chen
     
  • Change "Thrid" into "Third", and realign similarly to other entries.

    Signed-off-by: Pete Zaitcev
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pete Zaitcev
     
  • Signed-off-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • ufs_symlink, in one of its error paths, calls unlock_kernel without ever
    having called lock_kernel(); fix this by creating and jumping to a new
    label out_notlocked rather than the out label used after calling
    lock_kernel().

    Signed-off-by: Josh Triplett
    Cc: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • The EFS filesystem does not have an entry in MAINTAINERS; add one, giving
    the EFS filesystem and listing the status as Orphan, per the note on that
    page saying "I'm no longer actively maintaining EFS".

    Signed-off-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • If efs_symlink_readpage hits the -ENAMETOOLONG error path, it will call
    unlock_kernel without ever having called lock_kernel(); fix this by
    creating and jumping to a new label fail_notlocked rather than the fail
    label used after calling lock_kernel().

    Signed-off-by: Josh Triplett
    Cc: Marcelo Tosatti
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • Commit 398c53a757702e1e3a7a2c24860c7ad26acb53ed (in the historical GIT
    tree) moved the lock_kernel() in coda_open after the allocation of a
    coda_file_info struct, but left an unlock_kernel() in the allocation
    failure error path; remove it.

    Signed-off-by: Josh Triplett
    Acked-by: Jan Harkes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • swsusp is unable to suspend my machine (DTK FortisPro TOP-5A notebook) with
    kernel 2.6.17.5 because it's unable to suspend PNP device 00:16 (mouse).

    The problem is in PNP BIOS. pnp_bus_suspend() calls pnp_stop_dev() for the
    device if the device can be disabled according to pnp_can_disable(). The
    problem is that pnpbios_disable_resources() returns -EPERM if the device is
    not dynamic (!pnpbios_is_dynamic()) but insert_device() happily sets
    PNP_DISABLE capability/flag even if the device is not dynamic. So we try
    to disable non-dynamic devices which will fail. This patch prevents
    insert_device() from setting PNP_DISABLE if the device is not dynamic and
    fixes suspend on my system.

    Signed-off-by: Ondrej Zary
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ondrej Zary
     
  • This is a real deadlock, a nice complex one:
    (warning: long explanation follows so that Andrew can have a complete
    patch description)

    it's an ABCDA deadlock:

    A iprune_mutex
    B inode->inotify_mutex
    C ih->mutex
    D dev->ev_mutex

    The AB relationship comes straight from invalidate_inodes()

    int invalidate_inodes(struct super_block * sb)
    {
    int busy;
    LIST_HEAD(throw_away);

    mutex_lock(&iprune_mutex);
    spin_lock(&inode_lock);
    inotify_unmount_inodes(&sb->s_inodes);

    where inotify_umount_inodes() takes the
    mutex_lock(&inode->inotify_mutex);

    The BC relationship comes directly from inotify_find_update_watch():
    s32 inotify_find_update_watch(struct inotify_handle *ih, struct inode *inode,
    u32 mask)
    {
    ...
    mutex_lock(&inode->inotify_mutex);
    mutex_lock(&ih->mutex);

    The CD relationship comes from inotify_rm_wd:
    inotify_rm_wd does
    mutex_lock(&inode->inotify_mutex);
    mutex_lock(&ih->mutex)
    and then calls inotify_remove_watch_locked() which calls
    notify_dev_queue_event() which does
    mutex_lock(&dev->ev_mutex);

    (this strictly is a BCD relationship)

    The DA relationship comes from the most interesting part:

    [] shrink_icache_memory+0x42/0x270
    [] shrink_slab+0x11d/0x1c9
    [] try_to_free_pages+0x187/0x244
    [] __alloc_pages+0x1cd/0x2e0
    [] cache_alloc_refill+0x3f8/0x821
    [] kmem_cache_alloc+0x85/0xcb
    [] kernel_event+0x2e/0x122
    [] inotify_dev_queue_event+0xcc/0x140

    inotify_dev_queue_event schedules a kernel_event which does a
    kmem_cache_alloc( , GFP_KERNEL) which may try to shrink slabs, including
    the inode cache .. which then takes iprune_mutex.

    And voila, there is an AB, a BC, a CD relationship (even a direct BCD),
    and also now a DA relationship -> a circular type AB-BA deadlock but
    involving 4 locks.

    The solution is simple: kernel_event() is NOT allowed to use GFP_KERNEL,
    but must use GFP_NOFS to not cause recursion into the VFS.

    Signed-off-by: Arjan van de Ven
    Acked-by: Ingo Molnar
    Acked-by: Robert Love
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • Since I didn't know about the linux-mm mailing list until I spammed all
    those that had their names anywhere in the mm directory, I'm sending this
    patch to add the linux-mm mailing list to the MAINTAINERS file.

    Also, since mm is so broad, it doesn't have a single person to maintain it,
    and thus no maintainer is listed. I also left the status as Maintained,
    since it obviously is.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     
  • Initialize init task's pi_waiters plist. Otherwise cpu hotplug of cpu 0
    might crash, since rt_mutex_getprio() accesses an uninitialized list head.

    call chain which led to crash:

    take_cpu_down
    sched_idle_next
    __setscheduler
    rt_mutex_getprio

    Using PLIST_HEAD_INIT in the INIT_TASK macro doesn't work unfortunately,
    since the pi_waiters member is only conditionally present.

    Cc: Arjan van de Ven
    Cc: Thomas Gleixner
    Acked-by: Ingo Molnar
    Signed-off-by: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     
  • Hide the video drivers for onboard graphics found in early PCI PowerMacs in
    Apple G5 config files.

    drivers/built-in.o: In function `.platinumfb_probe':
    platinumfb.c:(.text+0x377a0): undefined reference to `.nvram_read_byte'
    platinumfb.c:(.text+0x37830): undefined reference to `.nvram_read_byte'
    drivers/built-in.o: In function `.control_init':
    controlfb.c:(.init.text+0x1938): undefined reference to `.nvram_read_byte'
    controlfb.c:(.init.text+0x1968): undefined reference to `.nvram_read_byte'
    drivers/built-in.o: In function `.valkyriefb_init':
    (.init.text+0x2300): undefined reference to `.nvram_read_byte'
    drivers/built-in.o:(.init.text+0x239c): more undefined references to `.nvram_read_byte' follow

    Signed-off-by: Olaf Hering
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     
  • Enable mac partition table support per default also for a powermac config.

    Signed-off-by: Olaf Hering
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     
  • Values displayed when by cardctl config are horribly wrong for 16bit cards.
    this fixes it up by not using memcpy() since source and target struct are
    very different.

    Signed-off-by: Daniel Ritz
    Cc: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Ritz
     
  • the p_dev == NULL checks are wrong. the called functions handle a NULL
    p_dev on their own. w/o this patch output of cardcctl status and cardctl
    config is broken for cardbus cards or when the slot is empty.

    Signed-off-by: Daniel Ritz
    Cc: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Ritz
     
  • WARNING: drivers/video/console/mdacon.o - Section mismatch: reference to .init.text: from .text between 'mdacon_startup' (at offset 0x123) and 'mdacon_init'
    WARNING: drivers/video/console/mdacon.o - Section mismatch: reference to .init.text: from .text between 'mdacon_startup' (at offset 0x18b) and 'mdacon_init'

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Frederik Deweerdt
     
  • The SGI IOC4 IDE device always shares an interrupt with other devices which
    are part of IOC4. As such, IDEPCI_SHARE_IRQ should always be enabled when
    BLK_DEV_SGIIOC4 is enabled.

    Signed-off-by: Brent Casavant
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brent Casavant
     
  • A few cleanups to SubmittingPatches:
    - mention SubmitChecklist
    - remove mention of my simple patch script tools
    - remove last-updated line

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • kernel/workqueue.c was omitted from generating kernel documentation. This
    adds a new section "Workqueues and Kevents" and adds documentation for some
    of the functions.

    Some functions in this file already had DocBook-style comments, now they
    finally become visible.

    Signed-off-by: Rolf Eike Beer
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rolf Eike Beer
     
  • Clean up kernel-doc comments in drivers/pci/search.c (line sizes and typos).

    Enable that source file in DocBook/kernel-api.tmpl.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Ignore __devinit in function definitions so that kernel-doc won't fail on
    them.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • insert_resource() was unexported, so kernel-doc needs to be told to search
    kernel/resource.c for internal functions instead of exported functions so that
    it won't report an error.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • In cond_resched_lock() it calls __resched_legal() before dropping the spin
    lock. __resched_legal() will always finds the preempt_count non-zero and
    will prevent the call to __cond_resched().

    The attached patch adds a parameter to __resched_legal() with the expected
    preempt_count value.

    Cc: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Houston
     
  • We have

    #define INDEX(N) (base->timer_jiffies >> (TVR_BITS + N * TVN_BITS)) & TVN_MASK

    and it's used via

    list = varray[i + 1]->vec + (INDEX(i + 1));

    So, due to underparenthesisation, this INDEX(i+1) is now a ... (TVR_BITS + i
    + 1 * TVN_BITS)) ...

    So this bugfix changes behaviour. It worked before by sheer luck:

    "If i was anything but 0, it was broken. But this was only used by
    s390 and arm. Since it was for the next interrupt, could that next
    interrupt be a problem (going into the second cascade)? But it was
    probably seldom wrong. That is, this would fail if the next
    interrupt was in the second cascade, and was wrapped. Which may
    never of happened. Also if it did happen, it would have just missed
    the interrupt.

    If an interrupt was missed, and no one was there to miss it, was it
    really missed :-)"

    Signed-off-by: Steven Rostedt
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steven Rostedt
     
  • Use hotplug version of register_cpu_notifier in late init functions.

    Signed-off-by: Chandra Seetharaman
    Cc: "Luck, Tony"
    Cc: Martin Schwidefsky
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • Update hotplug cpu documentation to clearly state when to use
    register_cpu_notifier() and register_hotcpu_notifier.

    Signed-off-by: Chandra Seetharaman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • Few of the callback functions and notifier blocks that are associated with cpu
    notifications incorrectly have __devinit and __devinitdata. They should be
    __cpuinit and __cpuinitdata instead.

    It makes no functional difference but wastes text area when CONFIG_HOTPLUG is
    enabled and CONFIG_HOTPLUG_CPU is not.

    This patch fixes all those instances.

    Signed-off-by: Chandra Seetharaman
    Cc: Ashok Raj
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chandra Seetharaman
     
  • This patch is part of an effort to unify the panic_on_oops behaviour across
    all architectures that implement it.

    It was pointed out to me by Andi Kleen that if an oops has occured in
    interrupt context, then calling sleep() in the oops path will only cause a
    panic, and that it would be really better for it not to be in the path at
    all.

    This patch removes the ssleep() call and reworks the console message
    accordinly. I have a slght concern that the resulting console message is
    too long, feedback welcome.

    For powerpc it also unifies the 32bit and 64bit behaviour.

    Fror x86_64, this patch only updates the console message, as ssleep() is
    already not present.

    Signed-off-by: Horms
    Acked-by: Paul Mackerras
    Cc: Russell King
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Chris Zankel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Horms
     
  • Reduce the likelihood of someone accidentally introducing namespace
    collisions.

    Signed-off-by: Yoichi Yuasa
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoichi Yuasa
     
  • When reading from nbd device, we need to receive all the data after
    receiving reply packet from the server - otherwise such request will never
    be ended.

    If socket is closed right after accepting reply control packet and in the
    middle of waiting for read data, nbd_read_stat() returns NULL and
    nbd_end_request() is not called.

    This patch fixes it.

    Signed-off-by: Michal Feix
    Acked-by: Paul Clements
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Feix
     
  • We should check magic sequence in reply packet before trying to find
    request with it's request handle. This also solves the problem with
    "Unexpected reply" message beeing logged, when packet with invalid magic is
    received.

    Signed-off-by: Michal Feix
    Acked-by: Paul Clements
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Feix
     
  • The pkt_*_dev functions operate on not-this-blockdevice, and that is
    sufficiently checked at setup time. As a result there is a natural
    hierarchy, which needs nesting annotations

    Signed-off-by: Arjan van de Ven
    Cc: Peter Osterlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • When resuming from suspend-to-RAM, the NMI watchdog detects a lockup in
    ide_wait_not_busy. Here's a screenshot of the trace taken by a digital
    camera: http://www.uamt.feec.vutbr.cz/rizeni/pom/DSC03510-2.JPG

    Let's touch the NMI watchdog in ide_wait_not_busy. The system then resumes
    correctly from STR.

    [akpm@osdl.org: modular build fix]
    Signed-off-by: Michal Schmidt
    Acked-by: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Schmidt
     
  • We can immediately bail from invalidate_bdev() if the blockdev has no
    pagecache.

    This solves the huge IPI storms which hald is causing on the big ia64
    machines when it polls CDROM drives.

    Acked-by: Jes Sorensen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Signed-off-by: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miles Bader
     
  • Signed-off-by: Miles Bader
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miles Bader
     
  • Kprobe inserts breakpoint instruction in probepoint and then jumps to
    instruction slot when breakpoint is hit, the instruction slot icache must
    be consistent with dcache. Here is the patch which invalidates instruction
    slot icache area.

    Without this patch, in some machines there will be fault when executing
    instruction slot where icache content is inconsistent with dcache.

    Signed-off-by: bibo,mao
    Acked-by: "Luck, Tony"
    Acked-by: Keshavamurthy Anil S
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    bibo, mao
     
  • Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove a
    duplicate of the macro. Also remove some trailing whitespaces and needless
    braces.

    Signed-off-by: Tobias Klauser
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     
  • It is described as being experimental, but doesn't actually depend on
    EXPERIMENTAL. Change the text.

    Signed-off-by: Arthur Othieno
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Othieno
     
  • The kprobe-booster's safety check against preemption does not work well
    now, because the preemption count has been modified by read_rcu_lock() in
    atomic_notifier_call_chain() before we check it. So, I'd like to prevent
    boosting kprobe temporarily if the kernel is preemptable.

    Now we are searching for the good solution.

    Signed-off-by: Masami Hiramatsu
    Cc: Ananth N Mavinakayanahalli
    Cc: Prasanna S Panchamukhi
    Cc: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masami Hiramatsu