1. 10 May, 2004 40 commits
    • Andrew Morton's avatar
      [PATCH] Laptop Mode doc update · e33daf9d
      Andrew Morton authored
      From: <bart@samwel.tk>
      
      Richard Atterer reported that mutt does not play well with noatime (it uses
      access times to check whether new mail has arrived in a folder).  This patch
      warns about this in the doc, and adds a setting to the control script to
      disable the noatime remount.
      e33daf9d
    • Andrew Morton's avatar
      [PATCH] cyclades MAINTAINERS update · c489e9e6
      Andrew Morton authored
      From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
      c489e9e6
    • Andrew Morton's avatar
      [PATCH] selinux: reopen descriptors closed on exec to /dev/null · def3f08e
      Andrew Morton authored
      From: Stephen Smalley <sds@epoch.ncsc.mil>
      
      This patch changes the SELinux module to try to reset any descriptors it
      closes on exec (due to a lack of permission by the new domain to the inherited
      open file) to refer to the null device.  This counters the problem of SELinux
      inducing program misbehavior, particularly due to having descriptors 0-2
      closed when the new domain is not allowed access to the caller's tty.  This is
      primarily to address the case where the caller is trusted with respect to the
      new domain, as the untrusted caller case is already handled via AT_SECURE and
      glibc secure mode.  The code is partly based on the OpenWall LSM, which in
      turn drew from the OpenWall kernel patch.  Note that the code does not
      guarantee that the descriptor is always re-opened to /dev/null; it merely
      makes a reasonable effort to do so, but can fail under various conditions.
      def3f08e
    • Andrew Morton's avatar
      [PATCH] ext3 error handling fixes · e461abeb
      Andrew Morton authored
      From: Andreas Dilger <adilger@clusterfs.com>
      
      a) we don't call ext3_error() for an IO error in ext3_find_entry(), so we
         won't do the normal ext3 error handling (mark SB in error, remount-ro
         or panic if desired);
      b) in empty_dir() we don't continue checking for non-empty blocks after a
         content error (ext3_check_dir_entry() calls ext3_error() already);
      c) we had decided not to mark the SB in error for holes in directories to
         allow leway in the indexed-directory implementation, but this change
         incorrectly also disabled marking the SB in error for real IO errors.
      e461abeb
    • Andrew Morton's avatar
      [PATCH] sched: in_sched_functions() cleanup · a7c8a1d3
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      1) Create an in_sched_functions() function in sched.c and make the
         archs use it.  (Two archs have wchan #if 0'd out: left them alone).
      
      2) Move __sched from linux/init.h to linux/sched.h and add comment.
      
      3) Rename __scheduling_functions_start_here/end_here to __sched_text_start/end.
      
      Thanks to wli and Sam Ravnborg for clue donation.
      a7c8a1d3
    • Andrew Morton's avatar
      [PATCH] Fix ext3 bogus ENOSPC · e736428d
      Andrew Morton authored
      With strange workloads which do a lot of quick truncation on small filesystems
      it is possible to get into a situation where there are free blocks on the
      disk, but they are not allocatable at this time due to their having been freed
      up in the current JBD transaction.  Applications get unexpected ENOSPC errors.
      
      We can fix that with this patch, originally by Andreas Dilger which forces a
      single commit+retry when an ENOSPC is encountered.
      e736428d
    • Andrew Morton's avatar
      [PATCH] reduce NMI watchdog call frequency with local APIC. · 774882ea
      Andrew Morton authored
      From: Mikael Pettersson <mikpe@csd.uu.se>
      
      The real problem is that SMP with nmi_watchdog=2 initialises the lapic NMI
      watchdog but doesn't check it and therefore doesn't reduce nmi_hz.  This is
      an SMP bug.
      
      The patch changes smpboot.c to do a check_nmi_watchdog() at the appropriate
      place, which fixes the high NMI frequency problem w/o changing anything
      else.  I've verified that it solves the problem on my MP-capable UP box.
      774882ea
    • Andrew Morton's avatar
      [PATCH] Fix nmi_watchdog=2 and P4 HT · 961d3a72
      Andrew Morton authored
      From: Philippe Elie <phil.el@wanadoo.fr>
      
      With nmi_watchdog=2 and a P4 ht box the nmi is occurring only on logical
      processor 0, it's better to get it on both.
      
      With this patch, on x86 SMP and nmi_watchdog=2, nmi interupts occur at 1000
      hz (if the cpu is loaded) not at the intended 1 hz rate but that's a distinct
      problem.
      961d3a72
    • Andrew Morton's avatar
      [PATCH] Fixes in 32 bit ioctl emulation code · a4855831
      Andrew Morton authored
      From: Raghavan <raghav@in.ibm.com>,
            me
      
      I am submitting a patch that fixes 2 race conditions in the 32 bit ioctl
      emulation code.(fs/compat.c) Since the search is not locked; when a
      ioctl_trans structure is deleted, corruption can occur.
      
      The following scenarios discuss the race conditions:
      
      1) When the search is hapenning, if any ioctl_trans structure gets
         deleted; then rather than searching the hash table, the code will start
         searching the free list.
      
      while (t && t->cmd != cmd)
              -
      a4855831
    • Andrew Morton's avatar
      [PATCH] mips: sgiwd93 2.6 fixes and crapectomy · ed258d80
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      Get to work under 2.6 sorting out the giant mess this has been.  Further
      cleanups would require a full crapectomy of wd33c93.c itself ...
      ed258d80
    • Andrew Morton's avatar
      [PATCH] mips: remove dz driver · 41984bac
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      This driver has been obsoleted by drivers/serial/dz.c.
      41984bac
    • Andrew Morton's avatar
      [PATCH] mips: 64-bit MIPS needs compat stuff · 303165e9
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      303165e9
    • Andrew Morton's avatar
      [PATCH] mips: add missing IP22 Zilog bit · 61f9d5aa
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      Add missing definition PORT_IP22ZILOG which is need by ip22zilog driver.
      61f9d5aa
    • Andrew Morton's avatar
      [PATCH] mips: GBE Video Driver · f2136be1
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      This patch adds the GBE video driver for the video system in SGI IP32
      aka O2 and it's i386-based equivalent the Visual Workstation.
                                                                                    
      This driver obsoletes sgivwfb.c; but I'd prefer to play safe and remove
      it after some additional time, just in case.
      f2136be1
    • Andrew Morton's avatar
      [PATCH] mips: remove VIDEO_TYPE_SNI_RM · 4663d2a4
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      The RM200's onboard video really is a plain old boring Cyrix PCI card.
      4663d2a4
    • Andrew Morton's avatar
      [PATCH] mips: newport driver fixes · ebaebc68
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      Make the driver for Newport aka XL work in 2.6.
      ebaebc68
    • Andrew Morton's avatar
      [PATCH] mips: Simplify expression · 2cb5274c
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
      CONFIG_MIPS is always defined, for 32-bit and 64-bit.
      2cb5274c
    • Andrew Morton's avatar
      [PATCH] mips: fix 2.6 fb setup · bbbc024a
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      bbbc024a
    • Andrew Morton's avatar
      [PATCH] MIPS update · 4b35ee7f
      Andrew Morton authored
      From: Ralf Baechle <ralf@linux-mips.org>
      
       - Kconfig cleanups:
          - enable DMA_NONCOHERENT, DMA_COHERENT or DMA_IP27 via reverse dependencies
          - untangle VRC4171 / VRC4173 selection
          - R10000 support enables PREFETCH
          - SEAD needs IRQ_CPU
       - Update defconfig against latest Kconfig files.
       - Fix computation of return address if syscall number was out of range
       - Add power managment hooks in signal code.
       - Don't try to handle signals when previous context was not in user mode.
       - Fix serial interface setup for VR41xx systems.
       - Build fixes after CLEAR_BITMAP changed name.
       - Removes bogus comment from <asm/checksum.h>
       - <asm/hdreg.h> is dead.
       - Start collecting common definitions for PMON firmware in <asm/pmon.h>
       - Define ARCH_MIN_TASKALIGN to 8; we have 64-bit members even on 32-bit
         kernels if we're running on MIPS II or better.
      4b35ee7f
    • Andrew Morton's avatar
      [PATCH] Fix deadlock in journalled quota · 844ef7b9
      Andrew Morton authored
      From: Jan Kara <jack@ucw.cz>
      
      Attached patch should fix reported deadlock in journalled quota code.
      quotactl() call was violating the locking rules and didn't start transaction
      when it should.
      
      From: <raven@themaw.net>
      
        Found a couple of symbols not exported that were needed by the ext3.ko
        module.
      844ef7b9
    • Andrew Morton's avatar
      [PATCH] migration_thread() race fix · 74499d32
      Andrew Morton authored
      From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
      
      Noticed that migration_thread can examine "kthread_should_stop()?" without
      setting its state to TASK_INTERRUPTIBLE first.  This can cause kthread_stop
      on that thread to block forever ...
      
      P.S 	- I assumed that having the task state set to TASK_INTERRUTIBLE
      	  while it is doing active_load_balance is fine. It seemed to be
      	  the case earlier also.
      74499d32
    • Andrew Morton's avatar
      [PATCH] sched_getaffinity vs cpu hotplug race fix · 870d3c0a
      Andrew Morton authored
      From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
      
      Fix the race in sys_sched_getaffinity.  Patch below takes cpu_hotplug lock
      before reading cpus_allowed mask of a task.
      870d3c0a
    • Andrew Morton's avatar
      [PATCH] Move migrate_all_tasks to CPU_DEAD handling · ddea677b
      Andrew Morton authored
      From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
      
      migrate_all_tasks is currently run with rest of the machine stopped.
      It iterates thr' the complete task table, turning off cpu affinity of any task
      that it finds affine to the dying cpu. Depending on the task table
      size this can take considerable time. All this time machine is stopped, doing
      nothing.
      
      Stopping the machine for such extended periods can be avoided if we do
      task migration in CPU_DEAD notification and that's precisely what this patch
      does.
      
      The patch puts idle task to the _front_ of the dying CPU's runqueue at the 
      highest priority possible. This cause idle thread to run _immediately_ after
      kstopmachine thread yields. Idle thread notices that its cpu is offline and
      dies quickly. Task migration can then be done at leisure in CPU_DEAD
      notification, when rest of the CPUs are running.
      
      Some advantages with this approach are:
      
      	- More scalable. Predicatable amout of time that machine is stopped.
      	- No changes to hot path/core code. We are just exploiting scheduler
      	  rules which runs the next high-priority task on the runqueue. Also
      	  since I put idle task to the _front_ of the runqueue, there
      	  are no races when a equally high priority task is woken up
      	  and added to the runqueue. It gets in at the back of the runqueue,
      	  _after_ idle task!
      	- cpu_is_offline check that is presenty required in try_to_wake_up,
      	  idle_balance and rebalance_tick can be removed, thus speeding them
      	  up a bit
      
      From: Srivatsa Vaddagiri <vatsa@in.ibm.com>
      
        Rusty mentioned that the unlikely hints against cpu_is_offline is
        redundant since the macro already has that hint.  Patch below removes those
        redundant hints I added.
      ddea677b
    • Andrew Morton's avatar
      [PATCH] sched: Look at another CPU's domain · 4197ad87
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      The SMT wake_idle code really wants to look at a non-local CPU's domain in
      order to check for idle siblings.
      
      So change the domain attachment code a little bit so we continue to hold a
      runqueue's lock while attaching a new domain.  This means the locking rules
      have changed to: you may access your own domain without any lock, you must
      hold a remote runqueue's lock in order to view its domain.
      4197ad87
    • Andrew Morton's avatar
      [PATCH] sched: micro-optimisation for wake_up · 25de0902
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      This actually does produce better code, especially under the locked
      section.
      
      Turns a conditional + unconditional jump under the lock in the unlikely
      case into a cmov outside the lock.
      25de0902
    • Andrew Morton's avatar
      [PATCH] sched: reduce idle time · 85841fc0
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      It makes NEWLY_IDLE balances cause find_busiest_group return the busiest
      available group even if there isn't an imbalance.  Basically - try a bit
      harder to prevent schedule emptying the runqueue.
      
      It is quite aggressive, but that isn't so bad because we don't (by default)
      do NEWLY_IDLE balancing across NUMA nodes, and NEWLY_IDLE balancing is always
      restricted to cache_hot tasks.
      
      It picked up a little bit of idle time that dbt2-pgsql was seeing...
      85841fc0
    • Andrew Morton's avatar
      [PATCH] sched: balance-on-clone · 8c8cfc36
      Andrew Morton authored
      From: Ingo Molnar <mingo@elte.hu>
      
      Implement balancing during clone().  It does the following things:
      
      - introduces SD_BALANCE_CLONE that can serve as a tool for an
        architecture to limit the search-idlest-CPU scope on clone().
        E.g. the 512-CPU systems should rather not enable this.
      
      - uses the highest sd for the imbalance_pct, not this_rq (which didnt
        make sense).
      
      - unifies balance-on-exec and balance-on-clone via the find_idlest_cpu()
        function. Gets rid of sched_best_cpu() which was still a bit
        inconsistent IMO, it used 'min_load < load' as a condition for
        balancing - while a more correct approach would be to use half of the
        imbalance_pct, like passive balancing does.
      
      - the patch also reintroduces the possibility to do SD_BALANCE_EXEC on
        SMP systems, and activates it - to get testing.
      
      - NOTE: there's one thing in this patch that is slightly unclean: i
        introduced wake_up_forked_thread. I did this to make it easier to get
        rid of this patch later (wake_up_forked_process() has lots of
        dependencies in various architectures). If this capability remains in
        the kernel then i'll clean it up and introduce one function for
        wake_up_forked_process/thread.
      
      - NOTE2: i added the SD_BALANCE_CLONE flag to the NUMA CPU template too.
        Some NUMA architectures probably want to disable this.
      8c8cfc36
    • Andrew Morton's avatar
      [PATCH] sched: cpu load management cleanup · a690c9b7
      Andrew Morton authored
      From: Ingo Molnar <mingo@elte.hu>
      
      This does the source/target cleanup.  This is a no-functionality patch which
      also adds more comments to explain these functions.
      a690c9b7
    • Andrew Morton's avatar
      [PATCH] sched: passive balancing damping · df65cdbf
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      This patch starts to balance woken processes when half the relevant domain's
      imbalance_pct is reached.  Previously balancing would start after a small,
      constant difference in waker/wakee runqueue loads was reached, which would
      cause too much process movement when there are lots of processes running.
      
      It also turns wake balancing into a domain flag while previously it was always
      on.  Now sched domains can "soft partition" an SMP system without using
      processor affinities.
      df65cdbf
    • Andrew Morton's avatar
      [PATCH] sched: cleanups · 237eaf03
      Andrew Morton authored
      From: Ingo Molnar <mingo@elte.hu>
      
      This re-adds cleanups which were lost in splitups of an earlier patch.
      237eaf03
    • Andrew Morton's avatar
      [PATCH] sched: lock cpu_attach_domain for hotplug · 2ce2e329
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      The attached patch is required to work correctly with the CPU hotplug
      framework.  John Hawkes reports successful booting with this.
      2ce2e329
    • Andrew Morton's avatar
      [PATCH] sched: extend sync wakeups · 7dc12702
      Andrew Morton authored
      From: Ingo Molnar <mingo@elte.hu>
      
      The attached patch extends sync wakeups to the process sys_exit() path too:
      the chldwait wakeup can be done sync, since we know that the process is
      going to exit (and thus deschedule).
      
      The most visible effect of this change is strace's behavior on SMP systems:
      it now stays on a single CPU, together with the traced child.  (previously
      it would run in parallel to the child, bouncing around madly.)
      7dc12702
    • Andrew Morton's avatar
      [PATCH] sched: add enqueeu_task_head() · 3c6f29aa
      Andrew Morton authored
      From: Ingo Molnar <mingo@elte.hu>
      
      Helper function for later patches
      3c6f29aa
    • Andrew Morton's avatar
      [PATCH] sched: uninlinings · 78650e1b
      Andrew Morton authored
      From: Ingo Molnar <mingo@elte.hu>
      
      Uninline things
      78650e1b
    • Andrew Morton's avatar
      [PATCH] sched: minor cleanups · 2f16618a
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      Minor cleanups from Ingo's patch including task_hot (do it right in
      try_to_wake_up too).
      2f16618a
    • Andrew Morton's avatar
      [PATCH] sched: fix setup races · 80b19256
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      De-racify the sched domain setup code.  This involves creating a dummy
      "init" domain during sched_init (which is called early).
      
      When topology information becomes available, the sched domains are then
      built and attached.  The attach mechanism is asynchronous and uses the
      migration threads, which perform the switch with interrupts off.  This is a
      quiescent state, so domains can still be lockless on the read side.  It
      also allows us to change the domains at runtime without much more work. 
      This is something SGI is interested in to elegantly do soft partitioning of
      their systems without having to use hard cpu affinities (which cause
      balancing problems of their own).
      
      The current setup code also has a race somewhere because it is unable to
      boot on a 384 CPU system.
      
      
      
      From: Anton Blanchard <anton@samba.org>
      
         This is basically a mindless ppc64 merge of the x86 changes to sched
         domain init code.
      
         Actually if I produce a sibling_map[] then the x86 code and the ppc64
         will be identical.  Maybe we can merge it.
      80b19256
    • Andrew Morton's avatar
      [PATCH] ARCH_HAS_SCHED_WAKE_BALANCE doesnt exist · 17d66773
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      It seems someone has been making trivial changes without using grep.
      17d66773
    • Andrew Morton's avatar
      [PATCH] ppc64: sched-domain support · 019bc3be
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      Below are the diffs between the current ppc64 sched init stuff and x86.
      
      - Ignore the POWER5 specific stuff, I dont set up a sibling map yet.
      - What should I set cache_hot_time to?
      
      large cpumask typechecking requirements (perhaps useful on x86 as well):
      - cpu->cpumask = CPU_MASK_NONE -> cpus_clear(cpu->cpumask);
      - cpus_and(nodemask, node_to_cpumask(i), cpu_possible_map) doesnt work,
        need to use a temporary
      019bc3be
    • Andrew Morton's avatar
      [PATCH] sched: oops fix · a65fb1d0
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      After the for_each_domain change, the warn here won't trigger, instead it
      will oops in the if statement.  Also, make sure we don't pass an empty
      cpumask to for_each_cpu.
      a65fb1d0
    • Andrew Morton's avatar
      [PATCH] sched: altix tuning · fd7b7b0f
      Andrew Morton authored
      From: Nick Piggin <nickpiggin@yahoo.com.au>
      
      From: John Hawkes
      
      The following brings up performance on a 64-way Altix.  This system being on
      the smaller end of the scale should also be applicable to other NUMA systems.
      fd7b7b0f