1. 24 5月, 2008 3 次提交
    • M
      x86: Add performance variants of cpumask operators · 41df0d61
      Mike Travis 提交于
        * Increase performance for systems with large count NR_CPUS by limiting
          the range of the cpumask operators that loop over the bits in a cpumask_t
          variable.  This removes a large amount of wasted cpu cycles.
      
        * Add performance variants of the cpumask operators:
      
          int cpus_weight_nr(mask)	     Same using nr_cpu_ids instead of NR_CPUS
          int first_cpu_nr(mask)	     Number lowest set bit, or nr_cpu_ids
          int next_cpu_nr(cpu, mask)	     Next cpu past 'cpu', or nr_cpu_ids
          for_each_cpu_mask_nr(cpu, mask)  for-loop cpu over mask using nr_cpu_ids
      
        * Modify following to use performance variants:
      
          #define num_online_cpus()	cpus_weight_nr(cpu_online_map)
          #define num_possible_cpus()	cpus_weight_nr(cpu_possible_map)
          #define num_present_cpus()	cpus_weight_nr(cpu_present_map)
      
          #define for_each_possible_cpu(cpu) for_each_cpu_mask_nr((cpu), ...)
          #define for_each_online_cpu(cpu)   for_each_cpu_mask_nr((cpu), ...)
          #define for_each_present_cpu(cpu)  for_each_cpu_mask_nr((cpu), ...)
      
        * Comment added to include/linux/cpumask.h:
      
          Note: The alternate operations with the suffix "_nr" are used
      	  to limit the range of the loop to nr_cpu_ids instead of
      	  NR_CPUS when NR_CPUS > 64 for performance reasons.
      	  If NR_CPUS is <= 64 then most assembler bitmask
      	  operators execute faster with a constant range, so
      	  the operator will continue to use NR_CPUS.
      
      	  Another consideration is that nr_cpu_ids is initialized
      	  to NR_CPUS and isn't lowered until the possible cpus are
      	  discovered (including any disabled cpus).  So early uses
      	  will span the entire range of NR_CPUS.
      
          (The net effect is that for systems with 64 or less CPU's there are no
           functional changes.)
      
      For inclusion into sched-devel/latest tree.
      
      Based on:
      	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
          +   sched-devel/latest  .../mingo/linux-2.6-sched-devel.git
      
      Cc: Paul Jackson <pj@sgi.com>
      Cc: Christoph Lameter <clameter@sgi.com>
      Reviewed-by: NPaul Jackson <pj@sgi.com>
      Reviewed-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      41df0d61
    • M
      cpu: change some globals to statics in drivers/base/cpu.c v2 · 143aa5c5
      Mike Travis 提交于
      This patch makes the following needlessly global code static:
      - attr_online_map
      - attr_possible_map
      - attr_present_map
      
      - cpu_state_attr [v2]
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      143aa5c5
    • M
      sched: replace MAX_NUMNODES with nr_node_ids in kernel/sched.c · a953e459
      Mike Travis 提交于
        * Replace usages of MAX_NUMNODES with nr_node_ids in kernel/sched.c,
          where appropriate.  This saves some allocated space as well as many
          wasted cycles going through node entries that are non-existent.
      
      For inclusion into sched-devel/latest tree.
      
      Based on:
      	git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
          +   sched-devel/latest  .../mingo/linux-2.6-sched-devel.git
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a953e459
  2. 22 5月, 2008 34 次提交
  3. 21 5月, 2008 3 次提交
    • D
      sunhv: Fix locking in non-paged I/O case. · 3651751f
      David S. Miller 提交于
      This causes the lock to be taken twice, thus resulting in
      a deadlock.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3651751f
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · 5cf11daf
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (21 commits)
        [CIFS] Remove debug statement
        Fix possible access to undefined memory region.
        [CIFS] Enable DFS support for Windows query path info
        [CIFS] Enable DFS support for Unix query path info
        [CIFS] add missing seq_printf to cifs_show_options for hard mount option
        [CIFS] add more complete mount options to cifs_show_options
        [CIFS] Add missing defines for DFS
        CIFSGetDFSRefer cleanup + dfs_referral_level_3 fixed to conform REFERRAL_V3 the MS-DFSC spec.
        Fixed DFS code to work with new 'build_path_from_dentry', that returns full path if share in the dfs, now.
        [CIFS] enable parsing for transport encryption mount parm
        [CIFS] Finishup DFS code
        [CIFS] BKL-removal: convert CIFS over to unlocked_ioctl
        [CIFS] suppress duplicate warning
        [CIFS] Fix paths when share is in DFS to include proper prefix
        add function to convert access flags to legacy open mode
        clarify return value of cifs_convert_flags()
        [CIFS] don't explicitly do a FindClose on rewind when directory search has ended
        [CIFS] cleanup old checkpatch warnings
        [CIFS] CIFSSMBPosixLock should return -EINVAL on error
        fix memory leak in CIFSFindNext
        ...
      5cf11daf
    • S
      [CIFS] Remove debug statement · 397d71dd
      Steve French 提交于
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      397d71dd