1. 08 Mar, 2006 15 commits
    • Dipankar Sarma's avatar
      [PATCH] fix file counting · 529bf6be
      Dipankar Sarma authored
      I have benchmarked this on an x86_64 NUMA system and see no significant
      performance difference on kernbench.  Tested on both x86_64 and powerpc.
      
      The way we do file struct accounting is not very suitable for batched
      freeing.  For scalability reasons, file accounting was
      constructor/destructor based.  This meant that nr_files was decremented
      only when the object was removed from the slab cache.  This is susceptible
      to slab fragmentation.  With RCU based file structure, consequent batched
      freeing and a test program like Serge's, we just speed this up and end up
      with a very fragmented slab -
      
      llm22:~ # cat /proc/sys/fs/file-nr
      587730  0       758844
      
      At the same time, I see only a 2000+ objects in filp cache.  The following
      patch I fixes this problem.
      
      This patch changes the file counting by removing the filp_count_lock.
      Instead we use a separate percpu counter, nr_files, for now and all
      accesses to it are through get_nr_files() api.  In the sysctl handler for
      nr_files, we populate files_stat.nr_files before returning to user.
      
      Counting files as an when they are created and destroyed (as opposed to
      inside slab) allows us to correctly count open files with RCU.
      Signed-off-by: default avatarDipankar Sarma <dipankar@in.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      529bf6be
    • Dipankar Sarma's avatar
      [PATCH] rcu batch tuning · 21a1ea9e
      Dipankar Sarma authored
      This patch adds new tunables for RCU queue and finished batches.  There are
      two types of controls - number of completed RCU updates invoked in a batch
      (blimit) and monitoring for high rate of incoming RCUs on a cpu (qhimark,
      qlowmark).
      
      By default, the per-cpu batch limit is set to a small value.  If the input
      RCU rate exceeds the high watermark, we do two things - force quiescent
      state on all cpus and set the batch limit of the CPU to INTMAX.  Setting
      batch limit to INTMAX forces all finished RCUs to be processed in one shot.
       If we have more than INTMAX RCUs queued up, then we have bigger problems
      anyway.  Once the incoming queued RCUs fall below the low watermark, the
      batch limit is set to the default.
      Signed-off-by: default avatarDipankar Sarma <dipankar@in.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      21a1ea9e
    • Andrew Morton's avatar
      [PATCH] percpu_counter_sum() · e2bab3d9
      Andrew Morton authored
      Implement percpu_counter_sum().  This is a more accurate but slower version of
      percpu_counter_read_positive().
      
      We need this for Alex's speedup-ext3_statfs patch and for the nr_file
      accounting fix.  Otherwise these things would be too inaccurate on large CPU
      counts.
      
      Cc: Ravikiran G Thirumalai <kiran@scalex86.org>
      Cc: Alex Tomas <alex@clusterfs.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e2bab3d9
    • GOTO Masanori's avatar
      [PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi · b884e257
      GOTO Masanori authored
      Fix i386 nmi_watchdog that does not meet watchdog timeout condition.  It
      does not hit die_nmi when it should be triggered, because the current
      nmi_watchdog_tick in arch/i386/kernel/nmi.c never count up alert_counter
      like this:
      
      	void nmi_watchdog_tick (struct pt_regs * regs) {
      	if (last_irq_sums[cpu] == sum) {
      		alert_counter[cpu]++;		<- count up alert_counter, but
      		if (alert_counter[cpu] == 5*nmi_hz)
      			die_nmi(regs, "NMI Watchdog detected LOCKUP");
      		alert_counter[cpu] = 0;		<- reset alert_counter
      
      This patch changes it back to the previous and working version.
      
      This was found and originally written by Kohta NAKASHIMA.
      
      (akpm: also uninline write_watchdog_counter(), saving 184 byets)
      Signed-off-by: default avatarGOTO Masanori <gotom@sanori.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b884e257
    • Atsushi Nemoto's avatar
      [PATCH] __get_unaligned() gcc-4 fix · 707ced0d
      Atsushi Nemoto authored
      If the 'ptr' is a const, this code cause "assignment of read-only variable"
      error on gcc 4.x.
      
      Use __u64 instead of __typeof__(*(ptr)) for temporary variable to get
      rid of errors on gcc 4.x.
      Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      707ced0d
    • Ingo Molnar's avatar
      [PATCH] idle threads should have a sane ->timestamp value · 81c29a85
      Ingo Molnar authored
      Idle threads should have a sane ->timestamp value, to avoid init kernel
      thread(s) from inheriting it and causing miscalculations in
      try_to_wake_up().
      
      Reported-by: Mike Galbraith <efault@gmx.de>.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      81c29a85
    • Phillip Susi's avatar
      [PATCH] udf: fix uid/gid options and add uid/gid=ignore and forget options · 4d6660eb
      Phillip Susi authored
      Fix a bug in udf where it would write uid/gid = 0 to the disk for files
      owned by the id given with the uid=/gid= mount options.  It also adds 4 new
      mount options: uid/gid=forget and uid/gid=ignore.  Without any options the
      id in core and on disk always match.  Giving uid/gid=nnn specifies a
      default ID to be used in core when the on disk ID is -1.  uid/gid=ignore
      forces the in core ID to allways be used no matter what the on disk ID is.
      uid/gid=forget forces the on disk ID to always be written out as -1.
      
      The use of these options allows you to override ownerships on a disk or
      disable ownwership information from being written, allowing the media to be
      used portably between different computers and possibly different users
      without permissions issues that would require root to correct.
      Signed-off-by: default avatarPhillip Susi <psusi@cfl.rr.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      4d6660eb
    • Andrew Morton's avatar
      [PATCH] numa_maps-update fix · 7f709ed0
      Andrew Morton authored
      Fix the mm/mempolicy.c build for !CONFIG_HUGETLB_PAGE.
      
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Cc: Martin Bligh <mbligh@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      7f709ed0
    • Pavel Machek's avatar
      [PATCH] serial core: work around sub-driver bugs · d5f735e5
      Pavel Machek authored
      We're presently getting oopses because Bluetooth (and possibly other) drivers
      are calling core functions after things have been shut down.
      
      So rather than oopsing, let's drop a warning then take avoiding action, so the
      machine survives.  Once all the sub-drivers are fixed up we can remove the
      take-avoiding-action part.
      Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      d5f735e5
    • Mark Fasheh's avatar
      [PATCH] powerpc: restore eeh_add_device_late() prototype stub · 1c6cc5fd
      Mark Fasheh authored
      We fixed this:
      
      arch/powerpc/platforms/pseries/eeh.c: In function `eeh_add_device_tree_late':
      arch/powerpc/platforms/pseries/eeh.c:901: warning: implicit declaration of function `eeh_add_device_late'
      arch/powerpc/platforms/pseries/eeh.c: At top level:
      arch/powerpc/platforms/pseries/eeh.c:918: error: conflicting types for 'eeh_add_device_late'
      arch/powerpc/platforms/pseries/eeh.c:901: error: previous implicit declaration of 'eeh_add_device_late' was here
      make[2]: *** [arch/powerpc/platforms/pseries/eeh.o] Error 1
      
      But we forgot the !CONFIG_EEH stub.
      Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1c6cc5fd
    • Linus Torvalds's avatar
      Mark the pipe file operations static · a19cbd4b
      Linus Torvalds authored
      They aren't used (nor even really usable) outside of pipe.c anyway
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a19cbd4b
    • Linus Torvalds's avatar
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 · 432e7c0d
      Linus Torvalds authored
      * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
        [IA64] mca recovery return value when no bus check
        [IA64] SGI SN drivers: don't report !sn2 hardware as an error
        [IA64] don't report !sn2 or !summit hardware as an error
        [IA64] gensparse_defconfig: turn on PNPACPI
        [IA64] Increase severity of MCA recovery messages
      432e7c0d
    • Linus Torvalds's avatar
      slab: fix calculate_slab_order() for SLAB_RECLAIM_ACCOUNT · f78bb8ad
      Linus Torvalds authored
      Instead of having a hard-to-read and confusing conditional in the
      caller, just make the slab order calculation handle this special case,
      since it's simple and obvious there.
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f78bb8ad
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-serial · 7986824e
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-serial:
        [SERIAL] ip22zilog: Fix oops on runlevel change with serial console
        [SERIAL] Fix two bugs in parport_serial
      7986824e
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · d423421c
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        [ARM] 3353/1: NAS100d: protect  nas100d_power_exit() with machine_is_nas100d()
        [ARM] 3352/1: DSB required for the completion of a TLB maintenance operation
      d423421c
  2. 07 Mar, 2006 25 commits