23 Mar, 2006

28 commits

  • This patch makes two needlessly global structs static.

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

    Adrian Bunk
     
  • This patch changes the code from:

    preempt_disable();
    for (;;) {
    ...
    preempt_disable();
    }
    to:
    for (;;) {
    preempt_disable();
    ...
    }

    which seems more clean to me and saves a couple of bytes for
    each function.

    Signed-off-by: Oleg Nesterov
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Attempt to fix the problem wherein people's oops reports scroll off the screen
    due to repeated oopsing or to oopses on other CPUs.

    If this happens the user can reboot with the `pause_on_oops=' option.
    It will allow the first oopsing CPU to print an oops record just a single
    time. Second oopsing attempts, or oopses on other CPUs will cause those CPUs
    to enter a tight loop until the specified number of seconds have elapsed.

    The patch implements the infrastructure generically in the expectation that
    architectures other than x86 will find it useful.

    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Consolidate all kernel bug printouts to begin with the "BUG: " string.
    Makes it easier to find them in large bootup logs.

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

    Ingo Molnar
     
  • Cleanup, remove unneeded double copying of current->blocked.

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

    Oleg Nesterov
     
  • This patch converts the module_mutex semaphore to a mutex.

    Signed-off-by: Ashutosh Naik
    Cc: Arjan van de Ven
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ashutosh Naik
     
  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Acked-by: Anil S Keshavamurthy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Cc: Alan Cox
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

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

    Arjan van de Ven
     
  • Convert kernel/rcupdate's rcu_barrier_sema to mutex.

    Signed-off-by: Ingo Molnar
    Acked-by: "Paul E. McKenney"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • convert cpuset.c's callback_sem and manage_sem to mutexes.
    Build and boot tested by Ingo.
    Build, boot, unit and stress tested by pj.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Avoid taking the global tasklist_lock when possible, if a process is single
    threaded during getrusage(). Any avoidance of tasklist_lock is good for
    NUMA boxes (and possibly for large SMPs). Thanks to Oleg Nesterov for
    review and suggestions.

    Signed-off-by: Nippun Goel
    Signed-off-by: Ravikiran Thirumalai
    Signed-off-by: Shai Fultheim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ravikiran G Thirumalai
     
  • 1) Reduce the size of (struct fdtable) to exactly 64 bytes on 32bits
    platforms, lowering kmalloc() allocated space by 50%.

    2) Reduce the size of (files_struct), using a special 32 bits (or
    64bits) embedded_fd_set, instead of a 1024 bits fd_set for the
    close_on_exec_init and open_fds_init fields. This save some ram (248
    bytes per task) as most tasks dont open more than 32 files. D-Cache
    footprint for such tasks is also reduced to the minimum.

    3) Reduce size of allocated fdset. Currently two full pages are
    allocated, that is 32768 bits on x86 for example, and way too much. The
    minimum is now L1_CACHE_BYTES.

    UP and SMP should benefit from this patch, because most tasks will touch
    only one cache line when open()/close() stdin/stdout/stderr (0/1/2),
    (next_fd, close_on_exec_init, open_fds_init, fd_array[0 .. 2] being in the
    same cache line)

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

    Eric Dumazet
     
  • Add the SNAPSHOT_S2RAM ioctl to the snapshot device.

    This ioctl allows a userland application to make the system (previously frozen
    with the SNAPSHOT_FREE ioctl) enter the S3 state without freezing processes
    and disabling nonboot CPUs for the second time.

    This will allow us to implement the suspend-to-disk-and-RAM (STDR)
    functionality in the userland suspend tools.

    Signed-off-by: Luca Tettamanti
    Signed-off-by: Rafael J. Wysocki
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Luca Tettamanti
     
  • Remove the console-switching code from the suspend part of the swsusp userland
    interface and let the userland tools switch the console.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Highmem could be in pcp list as well.

    Signed-off-by: Shaohua Li
    Acked-by: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Shaohua Li
     
  • This patch from Pavel moves userland freeze signals handling into more logical
    place. It now hits even with mysqld running.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Combination of printk/pr_debug led to in the middle of the line, and we
    printed way too many dots.

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

    Pavel Machek
     
  • Allow swsusp to freeze processes successfully under heavy load by freezing
    userspace processes before kernel threads.

    [Thanks to Nigel Cunningham for suggesting the
    way to go.]

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • This patch introduces a user space interface for swsusp.

    The interface is based on a special character device, called the snapshot
    device, that allows user space processes to perform suspend and resume-related
    operations with the help of some ioctls and the read()/write() functions.
     Additionally it allows these processes to allocate free swap pages from a
    selected swap partition, called the resume partition, so that they know which
    sectors of the resume partition are available to them.

    The interface uses the same low-level system memory snapshot-handling
    functions that are used by the built-it swap-writing/reading code of swsusp.

    The interface documentation is included in the patch.

    The patch assumes that the major and minor numbers of the snapshot device will
    be 10 (ie. misc device) and 231, the registration of which has already been
    requested.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Update suspend-to-RAM documentation with new machines, and makes message
    when processes can't be stopped little clearer. (In one case, waiting
    longer actually did help).

    From: "Rafael J. Wysocki"

    Warn in the documentation that data may be lost if there are some
    filesystems mounted from USB devices before suspend.

    [Thanks to Alan Stern for providing the answer to the question in the
    Q:-A: part.]

    Signed-off-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek
     
  • Move externs from C source files to header files.

    Signed-off-by: Randy Dunlap
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Move the swap-writing/reading code of swsusp to a separate file.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • Introduce the low level interface that can be used for handling the
    snapshot of the system memory by the in-kernel swap-writing/reading code of
    swsusp and the userland interface code (to be introduced shortly).

    Also change the way in which swsusp records the allocated swap pages and,
    consequently, simplifies the in-kernel swap-writing/reading code (this is
    necessary for the userland interface too). To this end, it introduces two
    helper functions in mm/swapfile.c, so that the swsusp code does not refer
    directly to the swap internals.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • This was a temporary thing for 2.6.16.

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

    Andrew Morton
     
  • We have noticed lockups during boot when stress testing kexec on ppc64.
    Two cpus would deadlock in scheduler code trying to grab already taken
    spinlocks.

    The double_rq_lock code uses the address of the runqueue to order the
    taking of multiple locks. This address is a per cpu variable:

    if (rq1 < rq2) {
    spin_lock(&rq1->lock);
    spin_lock(&rq2->lock);
    } else {
    spin_lock(&rq2->lock);
    spin_lock(&rq1->lock);
    }

    On the other hand, the code in wake_sleeping_dependent uses the cpu id
    order to grab locks:

    for_each_cpu_mask(i, sibling_map)
    spin_lock(&cpu_rq(i)->lock);

    This means we rely on the address of per cpu data increasing as cpu ids
    increase. While this will be true for the generic percpu implementation it
    may not be true for arch specific implementations.

    One way to solve this is to always take runqueues in cpu id order. To do
    this we add a cpu variable to the runqueue and check it in the
    double runqueue locking functions.

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

    Anton Blanchard
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (78 commits)
    [PATCH] powerpc: Add FSL SEC node to documentation
    [PATCH] macintosh: tidy-up driver_register() return values
    [PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values
    [PATCH] powerpc: via-pmu warning fix
    [PATCH] macintosh: cleanup the use of i2c headers
    [PATCH] powerpc: dont allow old RTC to be selected
    [PATCH] powerpc: make powerbook_sleep_grackle static
    [PATCH] powerpc: Fix warning in add_memory
    [PATCH] powerpc: update mailing list addresses
    [PATCH] powerpc: Remove calculation of io hole
    [PATCH] powerpc: iseries: Add bootargs to /chosen
    [PATCH] powerpc: iseries: Add /system-id, /model and /compatible
    [PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
    [PATCH] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
    [PATCH] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
    [PATCH] powerpc: iseries: mf related cleanups
    [PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
    [PATCH] powerpc: trivial: Cleanup whitespace in cputable.h
    [PATCH] powerpc: Remove unused iommu_off logic from pSeries_init_early()
    [PATCH] powerpc: Unconfuse htab_bolt_mapping() callers
    ...

    Linus Torvalds
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (138 commits)
    [SCSI] libata: implement minimal transport template for ->eh_timed_out
    [SCSI] eliminate rphy allocation in favour of expander/end device allocation
    [SCSI] convert mptsas over to end_device/expander allocations
    [SCSI] allow displaying and setting of cache type via sysfs
    [SCSI] add scsi_mode_select to scsi_lib.c
    [SCSI] 3ware 9000 add big endian support
    [SCSI] qla2xxx: update MAINTAINERS
    [SCSI] scsi: move target_destroy call
    [SCSI] fusion - bump version
    [SCSI] fusion - expander hotplug suport in mptsas module
    [SCSI] fusion - exposing raid components in mptsas
    [SCSI] fusion - memory leak, and initializing fields
    [SCSI] fusion - exclosure misspelled
    [SCSI] fusion - cleanup mptsas event handling functions
    [SCSI] fusion - removing target_id/bus_id from the VirtDevice structure
    [SCSI] fusion - static fix's
    [SCSI] fusion - move some debug firmware event debug msgs to verbose level
    [SCSI] fusion - loginfo header update
    [SCSI] add scsi_reprobe_device
    [SCSI] megaraid_sas: fix extended timeout handling
    ...

    Linus Torvalds
     

22 Mar, 2006

4 commits

  • When on_each_cpu() runs the callback on other CPUs, it runs with local
    interrupts disabled. So we should run the function with local interrupts
    disabled on this CPU, too.

    And do the same for UP, so the callback is run in the same environment on both
    UP and SMP. (strictly it should do preempt_disable() too, but I think
    local_irq_disable is sufficiently equivalent).

    Also uninlines on_each_cpu(). softirq.c was the most appropriate file I could
    find, but it doesn't seem to justify creating a new file.

    Oh, and fix up that comment over (under?) x86's smp_call_function(). It
    drives me nuts.

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

    Andrew Morton
     
  • A bare bones trivial patch to ensure we always get -EINVAL on the
    unsupported cases for sys_unshare. If this goes in before 2.6.16 it allows
    us to forward compatible with future applications using sys_unshare.

    Signed-off-by: Eric W. Biederman
    Cc: JANAK DESAI
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Remove the sleep_avg multiplier. This multiplier was necessary back when
    we had 10 seconds of dynamic range in sleep_avg, but now that we only have
    one second, it causes that one second to be compressed down to 100ms in
    some cases. This is particularly noticeable when compiling a kernel in a
    slow NFS mount, and I believe it to be a very likely candidate for other
    recently reported network related interactivity problems.

    In testing, I can detect no negative impact of this removal.

    Signed-off-by: Mike Galbraith
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Galbraith
     
  • James Bottomley
     

21 Mar, 2006

5 commits


19 Mar, 2006

2 commits


17 Mar, 2006

1 commit