1. 10 Dec, 2006 40 commits
    • Christoph Lameter's avatar
      [PATCH] sched: add option to serialize load balancing · 08c183f3
      Christoph Lameter authored
      Large sched domains can be very expensive to scan.  Add an option SD_SERIALIZE
      to the sched domain flags.  If that flag is set then we make sure that no
      other such domain is being balanced.
      
      [akpm@osdl.org: build fix]
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      08c183f3
    • Christoph Lameter's avatar
      [PATCH] sched: call tasklet less frequently · 1bd77f2d
      Christoph Lameter authored
      Trigger softirq less frequently
      
      We trigger the softirq before this patch using offset of sd->interval.
      However, if the queue is busy then it is sufficient to schedule the softirq
      with sd->interval * busy_factor.
      
      So we modify the calculation of the next time to balance by taking
      the interval added to last_balance again. This is only the
      right value if the idle/busy situation continues as is.
      
      There are two potential trouble spots:
      - If the queue was idle and now gets busy then we call rebalance
        early. However, that is not a problem because we will then use
        the longer interval for the next period.
      
      - If the queue was busy and becomes idle then we potentially
        wait too long before rebalancing. However, when the task
        goes idle then idle_balance is called. We add another calculation
        of the next balance time based on sd->interval in idle_balance
        so that we will rebalance soon.
      
      V2->V3:
      - Calculate rebalance time based on current jiffies and not
        based on the jiffies at the last time we load balanced.
        We no longer rely on staggering and therefore we can
        affort to do this now.
      
      V3->V4:
      - Use functions to do jiffy comparisons.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1bd77f2d
    • Christoph Lameter's avatar
      [PATCH] sched: use softirq for load balancing · c9819f45
      Christoph Lameter authored
      Call rebalance_tick (renamed to run_rebalance_domains) from a newly introduced
      softirq.
      
      We calculate the earliest time for each layer of sched domains to be rescanned
      (this is the rescan time for idle) and use the earliest of those to schedule
      the softirq via a new field "next_balance" added to struct rq.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c9819f45
    • Christoph Lameter's avatar
      [PATCH] sched: move idle status calculation into rebalance_tick() · e418e1c2
      Christoph Lameter authored
      Perform the idle state determination in rebalance_tick.
      
      If we separate balancing from sched_tick then we also need to determine the
      idle state in rebalance_tick.
      
      V2->V3
      	Remove useless idlle != 0 check. Checking nr_running seems
      	to be sufficient. Thanks Suresh.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e418e1c2
    • Christoph Lameter's avatar
      [PATCH] sched: extract load calculation from rebalance_tick · 7835b98b
      Christoph Lameter authored
      A load calculation is always done in rebalance_tick() in addition to the real
      load balancing activities that only take place when certain jiffie counts have
      been reached.  Move that processing into a separate function and call it
      directly from scheduler_tick().
      
      Also extract the time slice handling from scheduler_tick and put it into a
      separate function.  Then we can clean up scheduler_tick significantly.  It
      will no longer have any gotos.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      7835b98b
    • Christoph Lameter's avatar
      [PATCH] sched: disable interrupts for locking in load_balance() · fe2eea3f
      Christoph Lameter authored
      Interrupts must be disabled for request queue locks if we want to run
      load_balance() with interrupts enabled.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      fe2eea3f
    • Christoph Lameter's avatar
      [PATCH] sched: remove staggering of load balancing · 4211a9a2
      Christoph Lameter authored
      Timer interrupts already are staggered.  We do not need an additional layer of
      time staggering for short load balancing actions that take a reasonably small
      portion of the time slice.
      
      For load balancing on large sched_domains we will add a serialization later
      that avoids concurrent load balance operations and thus has the same effect as
      load staggering.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4211a9a2
    • Christoph Lameter's avatar
      [PATCH] sched: avoid taking rq lock in wake_priority_sleeper · 571f6d2f
      Christoph Lameter authored
      Avoid taking the request queue lock in wake_priority_sleeper if there are no
      running processes.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Cc: Peter Williams <pwil3058@bigpond.net.au>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      571f6d2f
    • Siddha, Suresh B's avatar
      [PATCH] sched domain: increase the SMT busy rebalance interval · ac7d5504
      Siddha, Suresh B authored
      With SMT, if the logical processor is busy, load balance happens for every
      8msec(min)-16msec(max).  There is no need to do this often, as this is just
      for fairness(to maintain uniform runqueue lengths) and default time slice
      anyhow is 100msec.
      
      Appended patch increases this interval to 64msec(min)-128msec(max) when the
      logical processor is busy.
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      ac7d5504
    • Kirill Korotaev's avatar
      [PATCH] move_task_off_dead_cpu() should be called with disabled ints · 054b9108
      Kirill Korotaev authored
      move_task_off_dead_cpu() requires interrupts to be disabled, while
      migrate_dead() calls it with enabled interrupts.  Added appropriate
      comments to functions and added BUG_ON(!irqs_disabled()) into
      double_rq_lock() and double_lock_balance() which are the origin sources of
      such bugs.
      Signed-off-by: default avatarKirill Korotaev <dev@openvz.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      054b9108
    • Siddha, Suresh B's avatar
      [PATCH] ched domain: move sched group allocations to percpu area · 6711cab4
      Siddha, Suresh B authored
      Move the sched group allocations to percpu area.  This will minimize cross
      node memory references and also cleans up the sched groups allocation for
      allnodes sched domain.
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Acked-by: default avatarChristoph Lameter <clameter@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6711cab4
    • Robert P. J. Day's avatar
    • Ralf Baechle's avatar
      [PATCH] Don't build some broken ISDN drivers on big endian MIPS · 596afa41
      Ralf Baechle authored
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Cc: Karsten Keil <kkeil@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      596afa41
    • Andrew Morton's avatar
      [PATCH] io-accounting: add to getdelays · cf709844
      Andrew Morton authored
      Wire up the IO accounting into getdelays.c.
      
      Usage:
      
      To display I/O stats for each exitting task:
      
      vmm:/home/akpm> ./getdelays -m0,1,2,3 -i -l
      cpumask 0 maskset 1
      printing IO accounting
      listen forever
      rm: read=8192, write=0, cancelled_write=0
      cvs: read=733184, write=4255744, cancelled_write=4096
      make: read=217088, write=0, cancelled_write=0
      cc1: read=4263936, write=12288, cancelled_write=0
      as: read=811008, write=8192, cancelled_write=0
      gcc: read=323584, write=0, cancelled_write=12288
      cc1: read=0, write=8192, cancelled_write=0
      as: read=4096, write=4096, cancelled_write=0
      gcc: read=16384, write=0, cancelled_write=4096
      as: read=4096, write=4096, cancelled_write=0
      gcc: read=16384, write=0, cancelled_write=8192
      ld: read=1011712, write=16384, cancelled_write=0
      collect2: read=626688, write=0, cancelled_write=0
      gcc: read=204800, write=0, cancelled_write=0
      cc1: read=0, write=8192, cancelled_write=0
      as: read=4096, write=4096, cancelled_write=0
      gcc: read=16384, write=0, cancelled_write=8192
      ld: read=8192, write=16384, cancelled_write=0
      collect2: read=49152, write=0, cancelled_write=0
      gcc: read=0, write=0, cancelled_write=0
      cc1: read=0, write=4096, cancelled_write=0
      ld: read=4096, write=12288, cancelled_write=0
      collect2: read=49152, write=0, cancelled_write=0
      gcc: read=0, write=0, cancelled_write=0
      
      To display I/O stats for a particular presently-running task:
      
      vmm:/home/akpm> ./getdelays -i -p $(pidof crond)
      printing IO accounting
      crond: read=61440, write=0, cancelled_write=0
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      cf709844
    • Andrew Morton's avatar
      [PATCH] getdelays: various fixes · d2f7bf13
      Andrew Morton authored
      - Various cleanups
      
      - Report errors to stderr, not stdout
      
      - A printf was missing a \n and was hiding from me.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d2f7bf13
    • Andrew Morton's avatar
      [PATCH] io-accounting: via taskstats · 4a7864ca
      Andrew Morton authored
      Deliver IO accounting via taskstats.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4a7864ca
    • Andrew Morton's avatar
      [PATCH] cleanup taskstats.h · f2f1f8a3
      Andrew Morton authored
      Fix weird whitespace mangling in taskstats.h
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f2f1f8a3
    • Andrew Morton's avatar
      [PATCH] io-accounting: report in procfs · aba76fdb
      Andrew Morton authored
      Add a simple /proc/pid/io to show the IO accounting fields.
      
      Maybe this shouldn't be merged in mainline - the preferred reporting channel
      is taskstats.  But given the poor state of our userspace support for
      taskstats, this is useful for developer-testing, at least.  And it improves
      the changes that the procps developers will wire it up into top(1).  Opinions
      are sought.
      
      The patch also wires up the existing IO-accounting fields.
      
      It's a bit racy on 32-bit machines: if process A reads process B's
      /proc/pid/io while process B is updating one of those 64-bit counters, process
      A could see an intermediate result.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      aba76fdb
    • Andrew Morton's avatar
      [PATCH] io-accounting: direct-io · 98c4d57d
      Andrew Morton authored
      Account for direct-io.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      98c4d57d
    • Andrew Morton's avatar
      [PATCH] io-accounting-read-accounting cifs fix · 6f88cc2e
      Andrew Morton authored
      CIFS implements ->readpages and doesn't use read_cache_pages().  So wire the
      read IO accounting up within CIFS.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      6f88cc2e
    • Andrew Morton's avatar
      [PATCH] io-accounting-read-accounting nfs fix · 8bde37f0
      Andrew Morton authored
      nfs's ->readpages uses read_cache_pages().  Wire it up there.
      
      [wfg@mail.ustc.edu.cn: account only successful nfs/fuse reads]
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarFengguang Wu <wfg@mail.ustc.edu.cn>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      8bde37f0
    • Andrew Morton's avatar
      [PATCH] io-accounting: read accounting · faccbd4b
      Andrew Morton authored
      Wire up read accounting for block devices, within submit_bio().
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      faccbd4b
    • Andrew Morton's avatar
      [PATCH] io-accounting: write-cancel accounting · e08748ce
      Andrew Morton authored
      Account for the number of byte writes which this process caused to not happen
      after all.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e08748ce
    • Andrew Morton's avatar
      [PATCH] io-accounting: write accounting · 55e829af
      Andrew Morton authored
      Accounting writes is fairly simple: whenever a process flips a page from clean
      to dirty, we accuse it of having caused a write to underlying storage of
      PAGE_CACHE_SIZE bytes.
      
      This may overestimate the amount of writing: the page-dirtying may cause only
      one buffer_head's worth of writeout.  Fixing that is possible, but probably a
      bit messy and isn't obviously important.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      55e829af
    • Andrew Morton's avatar
      [PATCH] clean up __set_page_dirty_nobuffers() · 8c08540f
      Andrew Morton authored
      Save a tabstop in __set_page_dirty_nobuffers() and __set_page_dirty_buffers()
      and a few other places.  No functional changes.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      8c08540f
    • Andrew Morton's avatar
      [PATCH] io-accounting: core statistics · 7c3ab738
      Andrew Morton authored
      The present per-task IO accounting isn't very useful.  It simply counts the
      number of bytes passed into read() and write().  So if a process reads 1MB
      from an already-cached file, it is accused of having performed 1MB of I/O,
      which is wrong.
      
      (David Wright had some comments on the applicability of the present logical IO accounting:
      
        For billing purposes it is useless but for workload analysis it is very
        useful
      
        read_bytes/read_calls  average read request size
        write_bytes/write_calls average write request size
      
        read_bytes/read_blocks ie logical/physical can indicate hit rate or thrashing
        write_bytes/write_blocks  ie logical/physical  guess since pdflush writes can
                                                      be missed
      
        I often look for logical larger than physical to see filesystem cache
        problems.  And the bytes/cpusec can help find applications that are
        dominating the cache and causing slow interactive response from page cache
        contention.
      
        I want to find the IO intensive applications and make sure they are doing
        efficient IO.  Thus the acctcms(sysV) or csacms command would give the high
        IO commands).
      
      This patchset adds new accounting which tries to be more accurate.  We account
      for three things:
      
      reads:
      
        attempt to count the number of bytes which this process really did cause
        to be fetched from the storage layer.  Done at the submit_bio() level, so it
        is accurate for block-backed filesystems.  I also attempt to wire up NFS and
        CIFS.
      
      writes:
      
        attempt to count the number of bytes which this process caused to be sent
        to the storage layer.  This is done at page-dirtying time.
      
        The big inaccuracy here is truncate.  If a process writes 1MB to a file
        and then deletes the file, it will in fact perform no writeout.  But it will
        have been accounted as having caused 1MB of write.
      
        So...
      
      cancelled_writes:
      
        account the number of bytes which this process caused to not happen, by
        truncating pagecache.
      
        We _could_ just subtract this from the process's `write' accounting.  But
        that means that some processes would be reported to have done negative
        amounts of write IO, which is silly.
      
        So we just report the raw number and punt this decision up to userspace.
      
      Now, we _could_ account for writes at the physical I/O level.  But
      
      - This would require that we track memory-dirtying tasks at the per-page
        level (would require a new pointer in struct page).
      
      - It would mean that IO statistics for a process are usually only available
        long after that process has exitted.  Which means that we probably cannot
        communicate this info via taskstats.
      
      This patch:
      
      Wire up the kernel-private data structures and the accessor functions to
      manipulate them.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      7c3ab738
    • Sergei Shtylyov's avatar
      [PATCH] pdc202xx_new: fix PLL/timing issues · 47694bb8
      Sergei Shtylyov authored
      Fix the CRC errors in the higher UltraDMA modes with the Promise PDC20268
      and newer chips that always occur on non-x86 machines and when there are
      more than 2 adapters on x86 machines.  Fix the overclocking issue for
      PDC20269 and newer chips that occurs when an UltraDMA/133 capable drive is
      connected.  Here's the summary of changes:
      
      - add code to detect the PLL input clock detection and setup it output clock,
        remove the PowerMac hacks;
      
      - replace the macros accessing the indexed regiters with functions, switch to
        using them where appropriate, gather the PIO/MWDMA/UDMA timings into tables;
      
      - rewrite the speedproc() handler to set the drive's transfer mode first, and
        then override the timing registers set by hardware on UltraDMA/133 chips;
      
      - use better criterion for determining higher UltraDMA modes, and add comment
        concerning the doubtful value of the code enabling IORDY/prefetch;
      
      - replace the stupid 'pdcnew_new_' prefixes with mere 'pdcnew_';
      
      - get rid of unneded spaces, parens and type casts, clean up some printk's,
        add some new lines here and there...
      
      This work is loosely based on these former patches by Albert Lee:
      
      [1] http://marc.theaimsgroup.com/?l=linux-ide&m=110992442032300
      [2] http://marc.theaimsgroup.com/?l=linux-ide&m=110992457729382
      [3] http://marc.theaimsgroup.com/?l=linux-ide&m=110992474205555
      [4] http://marc.theaimsgroup.com/?l=linux-ide&m=111019224802939
      
      Some PLL clock detection code was backported from his pata_pdc2027x driver...
      
      This code has been successfully tested by me on PDC2026[89] chips.
      
      I tried to keep this rework as several patches but it made no sense: [2] was
      largely a modification of the non-working timing override code, [3] by itself
      extended the overclocking issue to the case of non-UltraDMA/133 drives, and
      finally, the cleanup patch based on [1] ended up rejected...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Albert Lee <albertcc@tw.ibm.com>
      Acked-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      47694bb8
    • David Woodhouse's avatar
      [PATCH] Fix noise in futex.h · 58f64d83
      David Woodhouse authored
      There are some kernel-only bits in the middle of <linux/futex.h> which
      should be removed in what we export to userspace.
      Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      58f64d83
    • Alexey Dobriyan's avatar
      [PATCH] sysctl: remove unused "context" param · 1f29bcd7
      Alexey Dobriyan authored
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1f29bcd7
    • Alexey Dobriyan's avatar
      [PATCH] sysctl: remove some OPs · 98d7340c
      Alexey Dobriyan authored
      kernel.cap-bound uses only OP_SET and OP_AND
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      98d7340c
    • Corey Minyard's avatar
      [PATCH] IPMI: misc fixes · 1d5636cc
      Corey Minyard authored
      Fix various problems pointed out by Andrew Morton and others:
        * platform_device_unregister checks for NULL, no need to check here.
        * Formatting fixes.
        * Remove big macro and convert to a function.
        * Use strcmp instead of defining a broken case-insensitive comparison,
          and make the output parameter info match the case of the input one
          (change "I/O" to "i/o").
        * Return the length instead of 0 from the hotmod parameter handler.
        * Remove some unused cruft.
        * The trydefaults parameter only has to do with scanning the "standard"
          addresses, don't check for that on ACPI.
      Signed-off-by: default avatarCorey Minyard <cminyard@acm.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1d5636cc
    • Randy Dunlap's avatar
      [PATCH] IPMI: remove zero inits · 0c8204b3
      Randy Dunlap authored
      Remove all =0 and =NULL from static initializers.  They are not needed and
      removing them saves space in the object files.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarCorey Minyard <minyard@acm.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0c8204b3
    • Alessandro Zummo's avatar
    • Andrew Victor's avatar
      [PATCH] AT91RM9200 RTC · 7fc39f6d
      Andrew Victor authored
      The new Atmel AT91SAM9261 and AT91SAM9260 processors do not have the
      internal RTC peripheral.  This RTC driver is therefore
      AT91RM9200-specific.
      
      This patch renames rtc-at91.c to rtc-at91rm9200.c, and changes the name
      of the configuration option.
      Signed-off-by: default avatarAndrew Victor <andrew@sanpeople.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      7fc39f6d
    • David Brownell's avatar
      [PATCH] RTCs don't use i2c_adapter.dev · a14e1893
      David Brownell authored
      Update more I2C drivers that live outside drivers/i2c to understand that using
      adapter->dev is not The Way.  When actually referring to the adapter hardware,
      adapter->class_dev.dev is the answer.  When referring to a device connected to
      it, client->dev.dev is the answer.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a14e1893
    • Scott Wood's avatar
      [PATCH] rtc: Add rtc_merge_alarm() · 884b4aaa
      Scott Wood authored
      Add rtc_merge_alarm(), which can be used by rtc drivers to turn a partially
      specified alarm expiry (i.e.  most significant fields set to -1, as with the
      RTC_ALM_SET ioctl()) into a fully specified expiry.
      
      If the most significant specified field is earlier than the current time, the
      least significant unspecified field is incremented.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Acked-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      884b4aaa
    • Randy Dunlap's avatar
      [PATCH] geode crypto is PCI device · 9080d0ae
      Randy Dunlap authored
      This driver seems to be for a PCI device.
      
      drivers/crypto/geode-aes.c:384: warning: implicit declaration of function 'pci_release_regions'
      drivers/crypto/geode-aes.c:397: warning: implicit declaration of function 'pci_request_regions'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: default avatarJordan Crouse <jordan.crouse@amd.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      9080d0ae
    • Randy Dunlap's avatar
      [PATCH] freezer.h uses task_struct fields · 5c543eff
      Randy Dunlap authored
      freezer.h uses task_struct fields so it should include sched.h.
      
        CC [M]  fs/jfs/jfs_txnmgr.o
      In file included from fs/jfs/jfs_txnmgr.c:49:
      include/linux/freezer.h: In function 'frozen':
      include/linux/freezer.h:9: error: dereferencing pointer to incomplete type
      include/linux/freezer.h:9: error: 'PF_FROZEN' undeclared (first use in this function)
      include/linux/freezer.h:9: error: (Each undeclared identifier is reported only once
      include/linux/freezer.h:9: error: for each function it appears in.)
      include/linux/freezer.h: In function 'freezing':
      include/linux/freezer.h:17: error: dereferencing pointer to incomplete type
      include/linux/freezer.h:17: error: 'PF_FREEZE' undeclared (first use in this function)
      include/linux/freezer.h: In function 'freeze':
      include/linux/freezer.h:26: error: dereferencing pointer to incomplete type
      include/linux/freezer.h:26: error: 'PF_FREEZE' undeclared (first use in this function)
      include/linux/freezer.h: In function 'do_not_freeze':
      include/linux/freezer.h:34: error: dereferencing pointer to incomplete type
      include/linux/freezer.h:34: error: 'PF_FREEZE' undeclared (first use in this function)
      include/linux/freezer.h: In function 'thaw_process':
      include/linux/freezer.h:43: error: dereferencing pointer to incomplete type
      include/linux/freezer.h:43: error: 'PF_FROZEN' undeclared (first use in this function)
      include/linux/freezer.h:44: warning: implicit declaration of function 'wake_up_process'
      include/linux/freezer.h: In function 'frozen_process':
      include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
      include/linux/freezer.h:55: error: dereferencing pointer to incomplete type
      include/linux/freezer.h:55: error: 'PF_FREEZE' undeclared (first use in this function)
      include/linux/freezer.h:55: error: 'PF_FROZEN' undeclared (first use in this function)
      fs/jfs/jfs_txnmgr.c: In function 'freezing':
      include/linux/freezer.h:18: warning: control reaches end of non-void function
      make[2]: *** [fs/jfs/jfs_txnmgr.o] Error 1
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      5c543eff
    • Chuck Ebbert's avatar
      [PATCH] Document how to decode an IOCTL number · cf1b939e
      Chuck Ebbert authored
      Document how to decode a binary IOCTL number.
      Signed-off-by: default avatarChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      cf1b939e
    • Andrew Morton's avatar
      [PATCH] submit checklist update · 0dd4e5b8
      Andrew Morton authored
      Mention the new fault-injection test framework.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0dd4e5b8