1. 09 3月, 2006 13 次提交
    • D
      [PATCH] fix file counting · 529bf6be
      Dipankar Sarma 提交于
      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: NDipankar Sarma <dipankar@in.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      529bf6be
    • D
      [PATCH] rcu batch tuning · 21a1ea9e
      Dipankar Sarma 提交于
      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: NDipankar Sarma <dipankar@in.ibm.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      21a1ea9e
    • A
      [PATCH] percpu_counter_sum() · e2bab3d9
      Andrew Morton 提交于
      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: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e2bab3d9
    • G
      [PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi · b884e257
      GOTO Masanori 提交于
      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: NGOTO Masanori <gotom@sanori.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b884e257
    • A
      [PATCH] __get_unaligned() gcc-4 fix · 707ced0d
      Atsushi Nemoto 提交于
      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: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      707ced0d
    • I
      [PATCH] idle threads should have a sane ->timestamp value · 81c29a85
      Ingo Molnar 提交于
      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: NIngo Molnar <mingo@elte.hu>
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      81c29a85
    • P
      [PATCH] udf: fix uid/gid options and add uid/gid=ignore and forget options · 4d6660eb
      Phillip Susi 提交于
      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: NPhillip Susi <psusi@cfl.rr.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4d6660eb
    • A
      [PATCH] numa_maps-update fix · 7f709ed0
      Andrew Morton 提交于
      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: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7f709ed0
    • P
      [PATCH] serial core: work around sub-driver bugs · d5f735e5
      Pavel Machek 提交于
      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: NPavel Machek <pavel@suse.cz>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d5f735e5
    • M
      [PATCH] powerpc: restore eeh_add_device_late() prototype stub · 1c6cc5fd
      Mark Fasheh 提交于
      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: NMark Fasheh <mark.fasheh@oracle.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1c6cc5fd
    • L
      Mark the pipe file operations static · a19cbd4b
      Linus Torvalds 提交于
      They aren't used (nor even really usable) outside of pipe.c anyway
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a19cbd4b
    • L
      Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 · 432e7c0d
      Linus Torvalds 提交于
      * '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
    • L
      slab: fix calculate_slab_order() for SLAB_RECLAIM_ACCOUNT · f78bb8ad
      Linus Torvalds 提交于
      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: NLinus Torvalds <torvalds@osdl.org>
      f78bb8ad
  2. 08 3月, 2006 12 次提交
  3. 07 3月, 2006 15 次提交
    • C
      [ARM] 3352/1: DSB required for the completion of a TLB maintenance operation · 6a0e2430
      Catalin Marinas 提交于
      Patch from Catalin Marinas
      
      Chapter B2.7.3 in the latest ARM ARM (with v6 information) states that
      the completion of a TLB maintenance operation is only guaranteed by
      the execution of a DSB (Data Syncronization Barrier, formerly Data
      Write Barrier or Drain Write Buffer).
      
      Note that a DSB is only needed in the flush_tlb_kernel_* functions
      since the completion is guaranteed by a mode change (i.e. switching
      back to user mode) for the flush_tlb_user_* functions.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6a0e2430
    • M
      [TG3]: Add DMA address workaround · 72f2afb8
      Michael Chan 提交于
      Add DMA workaround for chips that do not support full 64-bit DMA
      addresses.
      
      5714, 5715, and 5780 chips only support DMA addresses less than 40
      bits. On 64-bit systems with IOMMU, set the dma_mask to 40-bit so
      that pci_map_xxx() calls will map the DMA address below 40 bits if
      necessary. On 64-bit systems without IOMMU, set the dma_mask to
      64-bit and check for DMA addresses exceeding the limit in
      tg3_start_xmit().
      
      5788 only supports 32-bit DMA so need to set the mask appropriately
      also.
      
      Thanks to Chris Elmquist at SGI for reporting and helping to debug
      the problem on 5714.
      
      Thanks to David Miller for explaining the HIGHMEM and DMA stuff.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72f2afb8
    • L
      Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband · d11d9b2d
      Linus Torvalds 提交于
      * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
        IB/srp: Don't send task management commands after target removal
      d11d9b2d
    • C
      [PATCH] s390: improve response code handling in chsc_enable_facility() · 15730ddb
      Cornelia Huck 提交于
      Rather than checking for some known failures, check positively for the
      success response code 0x0001 and return -EIO for unrecognized failure
      response codes.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Greg Smith <gsmith@nc.rr.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      15730ddb
    • B
      [PATCH] s390: fix match in ccw modalias · de1d9c03
      Bastian Blank 提交于
      Fix matching of devmodel in modaliases.  It breaks automatic loading of any
      dasd module.
      
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      de1d9c03
    • B
      [PATCH] windfarm license fix · cdd440fe
      Benjamin Herrenschmidt 提交于
      The Windfarm PID module lacks a licence, it should be GPL, here it is
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cdd440fe
    • N
      [PATCH] smaps: shared fix · ad820c5d
      Nick Piggin 提交于
      The point of the smaps "shared" is to count the number of pages that are
      mapped by more than one process, according to Mauricio Lin.  However, smaps
      uses page_count for this, so it will return a false positive for every page
      that is mapped by just that one process, which is also in pagecache or
      swapcache.  There are false positive situations for anonymous pages not in
      swapcache as well: - page reclaim, migration - get_user_pages (eg.
      direct-io, ptrace)
      
      Use page_mapcount instead, to count the number of mappings to the page.
      
      Use vm_normal_page so that weird things like /dev/mem aren't counted either.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ad820c5d
    • N
      [PATCH] smaps: hugepages fix · 5ddfae16
      Nick Piggin 提交于
      smaps doesn't have a hugepage pagetable walker. Skip walking hugepage
      vmas.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5ddfae16
    • P
      [PATCH] ramfs needs to update directory m/ctime on symlink · ecbd3a63
      Peter Staubach 提交于
      ramfs neglects to update the directory mtime and ctime fields when creating
      a new symbolic link.  Ramfs was modified in 2.6.15 to update these fields
      when other types of entries are created.  The symlink support is separate
      from that other support, so that change did not cover quite all of the
      possibilities.
      
      All of the directory content manipulation entry points now seem to be
      covered with respect to these time field updates.
      Signed-off-by: NPeter Staubach <staubach@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ecbd3a63
    • E
      [PATCH] EFI: Fix gdt load · e8c3b5a6
      Edgar Hucek 提交于
      This patch makes the kernel bootable again on ia32 EFI systems.
      Signed-off-by: NEdgar Hucek <hostmaster@ed-soft.at>
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: Zachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e8c3b5a6
    • C
      [PATCH] numa_maps update · 397874df
      Christoph Lameter 提交于
      Change the format of numa_maps to be more compact and contain additional
      information that is useful for managing and troubleshooting memory on a
      NUMA system.  Numa_maps can now also support huge pages.
      
      Fixes:
      
      1. More compact format. Only display fields if they contain additional
      	information.
      
      2. Always display information for all vmas. The old numa_maps did not display
      	vma with no mapped entries. This was a bit confusing because page
      	migration removes ptes for file backed vmas. After page migration
      	a part of the vmas vanished.
      
      3. Rename maxref to maxmap. This is the maximum mapcount of all the pages
      	in a vma and may be used as an indicator as to how many processes
      	may be using a certain vma.
      
      4. Include the ability to scan over huge page vmas.
      
      New items shown:
      
      dirty
      	Number of pages in a vma that have either the dirty bit set in the
      	page_struct or in the pte.
      
      file=<filename>
      	The file backing the pages if any
      
      stack
      	Stack area
      
      heap
      	Heap area
      
      huge
      	Huge page area. The number of pages shows is the number of huge
      	pages not the regular sized pages.
      
      swapcache
      	Number of pages with swap references. Must be >0 in order to
      	be shown.
      
      active
      	Number of active pages. Only displayed if different from the number
      	of pages mapped.
      
      writeback
      	Number of pages under writeback. Only displayed if >0.
      
      Sample ouput of a process using huge pages:
      
      00000000 default
      2000000000000000 default file=/lib/ld-2.3.90.so mapped=13 mapmax=30 N0=13
      2000000000044000 default file=/lib/ld-2.3.90.so anon=2 dirty=2 swapcache=2 N2=2
      2000000000064000 default file=/lib/librt-2.3.90.so mapped=2 active=1 N1=1 N3=1
      2000000000074000 default file=/lib/librt-2.3.90.so
      2000000000080000 default file=/lib/librt-2.3.90.so anon=1 swapcache=1 N2=1
      2000000000084000 default
      2000000000088000 default file=/lib/libc-2.3.90.so mapped=52 mapmax=32 active=48 N0=52
      20000000002bc000 default file=/lib/libc-2.3.90.so
      20000000002c8000 default file=/lib/libc-2.3.90.so anon=3 dirty=2 swapcache=3 active=2 N1=1 N2=2
      20000000002d4000 default anon=1 swapcache=1 N1=1
      20000000002d8000 default file=/lib/libpthread-2.3.90.so mapped=8 mapmax=3 active=7 N2=2 N3=6
      20000000002fc000 default file=/lib/libpthread-2.3.90.so
      2000000000308000 default file=/lib/libpthread-2.3.90.so anon=1 dirty=1 swapcache=1 N1=1
      200000000030c000 default anon=1 dirty=1 swapcache=1 N1=1
      2000000000320000 default anon=1 dirty=1 N1=1
      200000000071c000 default
      2000000000720000 default anon=2 dirty=2 swapcache=1 N1=1 N2=1
      2000000000f1c000 default
      2000000000f20000 default anon=2 dirty=2 swapcache=1 active=1 N2=1 N3=1
      200000000171c000 default
      2000000001720000 default anon=1 dirty=1 swapcache=1 N1=1
      2000000001b20000 default
      2000000001b38000 default file=/lib/libgcc_s.so.1 mapped=2 N1=2
      2000000001b48000 default file=/lib/libgcc_s.so.1
      2000000001b54000 default file=/lib/libgcc_s.so.1 anon=1 dirty=1 active=0 N1=1
      2000000001b58000 default file=/lib/libunwind.so.7.0.0 mapped=2 active=1 N1=2
      2000000001b74000 default file=/lib/libunwind.so.7.0.0
      2000000001b80000 default file=/lib/libunwind.so.7.0.0
      2000000001b84000 default
      4000000000000000 default file=/media/huge/test9 mapped=1 N1=1
      6000000000000000 default file=/media/huge/test9 anon=1 dirty=1 active=0 N1=1
      6000000000004000 default heap
      607fffff7fffc000 default anon=1 dirty=1 swapcache=1 N2=1
      607fffffff06c000 default stack anon=1 dirty=1 active=0 N1=1
      8000000060000000 default file=/mnt/huge/test0 huge dirty=3 N1=3
      8000000090000000 default file=/mnt/huge/test1 huge dirty=3 N0=1 N2=2
      80000000c0000000 default file=/mnt/huge/test2 huge dirty=3 N1=1 N3=2
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      397874df
    • T
      [PATCH] alsa: fix error paths in snd_ctl_elem_add() · 2fbf182e
      Takashi Iwai 提交于
      Fix bugs in error paths of snd_ctl_elem_add()
       - NULL reference
       - double free (already freed in snd_ctl_add())
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2fbf182e
    • A
      [PATCH] time: add barrier after updating jiffies_64 · 5aee405c
      Atsushi Nemoto 提交于
      Add a compiler barrier so that we don't read jiffies before updating
      jiffies_64.
      Signed-off-by: NAtsushi Nemoto <anemo@mba.ocn.ne.jp>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5aee405c
    • J
      [PATCH] Increase max kmalloc size for very large systems · a615fa83
      Jack Steiner 提交于
      Systems with extemely large numbers of nodes or cpus need to kmalloc
      structures larger than is currently supported.  This patch increases the
      maximum supported size for very large systems.
      
      This patch should have no effect on current systems.
      
      (akpm: why not just use alloc_pages() for sysfs_cpus?)
      Signed-off-by: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a615fa83
    • K
      [PATCH] memory-hotplug compile fix · 78679302
      KAMEZAWA Hiroyuki 提交于
      include/linux/memory_hotplug.h:53: warning: 'struct page' declared inside parameter list
      
      (akpm: I tossed in a couple more possibly-needed-sometime struct decls too)
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      78679302