1. 21 Jul, 2010 1 commit
    • Cliff Wickman's avatar
      x86, UV: Make kdump avoid stack dumps · 5edd19af
      Cliff Wickman authored
      UV NMI callback's should not write stack dumps when a kdump is to be written.
      
      When invoking the crash kernel to write a dump, kdump_nmi_shootdown_cpus()
      uses NMI's to get all the cpu's to save their register context and halt.
      
      But the NMI interrupt handler runs a callback list.  This patch sets a flag
      to prevent any of those callbacks from interfering with the halt of the cpu.
      
      For UV, which currently has the only callback to which this is relevant, the
      uv_handle_nmi() callback should not do dumping of stacks.
      
      The 'in_crash_kexec' flag is defined as an extern in kdebug.h firstly
      because x2apic_uv_x.c includes it.  Secondly because some future callback
      might need the flag to know that it should not enter the debugger.
      (Such a scenario was in fact present in the 2.6.32 kernel, SuSE distribution,
       where a call to kdb needed to be avoided.)
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      LKML-Reference: <E1ObLvt-0005UZ-Va@eag09.americas.sgi.com>
      Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
      5edd19af
  2. 17 Jul, 2010 1 commit
    • Cliff Wickman's avatar
      x86, UV: Initialize BAU MMRs only on hubs with cpus · 93a7ca0c
      Cliff Wickman authored
      Remove the initialization of MMRs
      UVH_LB_BAU_SB_ACTIVATION_CONTROL and UVH_BAU_DATA_BROADCAST on
      UV hubs that have no active cpus. Such initialization on hubs
      with no active cpus would result in a kernel page fault.
      
      This is not of real high priority, because we don't have any
      such systems (with UV hubs that have no active cpus).  But they
      will be coming.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      LKML-Reference: <E1OZmZN-0006cW-RC@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      93a7ca0c
  3. 08 Jun, 2010 13 commits
    • Cliff Wickman's avatar
      x86, UV: Modularize BAU send and wait · f6d8a566
      Cliff Wickman authored
      Streamline the large uv_flush_send_and_wait() function by use of
      a couple of helper functions.
      
      And remove some excess comments.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004ay-IH@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      f6d8a566
    • Cliff Wickman's avatar
      x86, UV: BAU broadcast to the local hub · 450a007e
      Cliff Wickman authored
      Make the Broadcast Assist Unit driver use the BAU for TLB
      shootdowns of cpu's on the local uvhub.
      
      It was previously thought that IPI might be faster to the cpu's
      on the local hub.  But the IPI operation would have to follow
      the completion of the BAU broadcast anyway.  So we broadcast to
      the local uvhub in all cases except when the current cpu was the
      only local cpu in the mask.
      
      This simplifies uv_flush_send_and_wait() in that it returns
      either all shootdowns complete, or none.
      
      Adjust the statistics to account for shootdowns on the local
      uvhub.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aq-G7@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      450a007e
    • Cliff Wickman's avatar
      x86, UV: Correct BAU regular message type · 7fba1bcd
      Cliff Wickman authored
      The Broadcast Assist Unit messages have a regular or retry
      message type. The regular type was not being set, but needs to
      be, because the lack of a message type is sometimes used to
      identify an unused entry in the message queue.
      Also removing some excess comments.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004ak-Dy@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7fba1bcd
    • Cliff Wickman's avatar
      x86, UV: Remove BAU check for stay-busy · 90cc7d94
      Cliff Wickman authored
      Remove a faulty assumption that a long running BAU request has
      encountered a hardware problem and will never finish.
      
      Numalink congestion can make a request appear to have
      encountered such a problem, but it is not safe to cancel the
      request.  If such a cancel is done but a reply is later received
      we can miss a TLB shootdown.
      
      We depend upon the max_bau_concurrent 'throttle' to prevent the
      stay-busy case from happening.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004ad-BV@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      90cc7d94
    • Cliff Wickman's avatar
      x86, UV: Correct BAU discovery of hubs and sockets · a8328ee5
      Cliff Wickman authored
      Correct the initialization-time assumption of contigous blade
      numbers and of sockets numbered from zero.
      
      There may be hubs present with no cpu's enabled.
      There may be disabled sockets such that the active socket is not
      number zero.
      
      And assign a 'socket master' by assuming that a socket is a
      node. (it is not safe to extract socket number from an apicid)
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aW-9S@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a8328ee5
    • Cliff Wickman's avatar
      x86, UV: Correct BAU software acknowledge · 39847e7f
      Cliff Wickman authored
      Correct the acknowledgment and the reset of a BAU
      software-acknowledged message.
      
      A retry message should be testing only for timed-out resources
      (mask << 8). (And we delete a log message that might cause
      unnecessary concern) The acknowledge MMR is
      |--timed-out--|---pending--|,  each is 8 bits.
      
      The IPI-driven reset of software acknowledge resources frees
      both timed out and pending resources.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aP-7O@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      39847e7f
    • Cliff Wickman's avatar
      x86, UV: BAU structure rearranging · 4faca155
      Cliff Wickman authored
      Move some structure definitions from the C code to the BAU
      header file, and change the organization of that header file a
      little.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aI-54@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4faca155
    • Cliff Wickman's avatar
      x86, UV: Shorten access to BAU statistics structure · 712157aa
      Cliff Wickman authored
      Use a pointer from the per-cpu BAU control structure to the
      per-cpu BAU statistics structure.
      We nearly always know the first before needing the second.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004aB-2k@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      712157aa
    • Cliff Wickman's avatar
      x86, UV: Disable BAU on network congestion · 50fb55ac
      Cliff Wickman authored
      The numalink network can become so congested that TLB shootdown
      using the Broadcast Assist Unit becomes slower than using IPI's.
      
      In that case, disable the use of the BAU for a period of time.
      The period is tunable.  When the period expires the use of the
      BAU is re-enabled. A count of these actions is added to the
      statistics file.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNy-0004a4-0a@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      50fb55ac
    • Cliff Wickman's avatar
      x86, UV: BAU tunables into a debugfs file · e8e5e8a8
      Cliff Wickman authored
      Make the Broadcast Assist Unit driver's nine tuning values variable by
      making them accessible through a read/write debugfs file.
      
      The file will normally be mounted as
      /sys/kernel/debug/sgi_uv/bau_tunables. The tunables are kept in each
      cpu's per-cpu BAU structure.
      
      The patch also does a little name improvement, and corrects the reset of
      two destination timeout counters.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNx-0004Zx-Uo@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e8e5e8a8
    • Cliff Wickman's avatar
      x86, UV: Calculate BAU destination timeout · 12a6611f
      Cliff Wickman authored
      Calculate the Broadcast Assist Unit's destination timeout period from the
      values in the relevant MMR's.
      
      Store it in each cpu's per-cpu BAU structure so that a destination
      timeout can be differentiated from a 'plugged' situation in which all
      software ack resources are already allocated and a timeout is pending.
      That case returns an immediate destination error.
      Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
      Cc: gregkh@suse.de
      LKML-Reference: <E1OJvNx-0004Zq-RK@eag09.americas.sgi.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      12a6611f
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/~dwmw2/mtd-2.6.35 · 3975d167
      Linus Torvalds authored
      * git://git.infradead.org/~dwmw2/mtd-2.6.35:
        jffs2: update ctime when changing the file's permission by setfacl
        jffs2: Fix NFS race by using insert_inode_locked()
        jffs2: Fix in-core inode leaks on error paths
        mtd: Fix NAND submenu
        mtd/r852: update card detect early.
        mtd/r852: Fixes in case of DMA timeout
        mtd/r852: register IRQ as last step
        drivers/mtd: Use memdup_user
        docbook: make mtd nand module init static
      3975d167
    • Linus Torvalds's avatar
      Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev · 4d3d769c
      Linus Torvalds authored
      * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
        ahci: redo stopping DMA engines on empty ports
        sata_sil24: fix kernel panic on ARM caused by unaligned access in sata_sil24
        ahci: add pci quirk for JMB362
        sata_via: explain the magic fix
      4d3d769c
  4. 07 Jun, 2010 6 commits
  5. 06 Jun, 2010 3 commits
  6. 05 Jun, 2010 15 commits
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · 78b36558
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: Fix remaining racy updates of EXT4_I(inode)->i_flags
        ext4: Make sure the MOVE_EXT ioctl can't overwrite append-only files
      78b36558
    • Dmitry Monakhov's avatar
      ext4: Fix remaining racy updates of EXT4_I(inode)->i_flags · 84a8dce2
      Dmitry Monakhov authored
      A few functions were still modifying i_flags in a racy manner.
      Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      84a8dce2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs · 6c5de280
      Linus Torvalds authored
      * 'for-linus' of git://oss.sgi.com/xfs/xfs:
        xfs: improve xfs_isilocked
        xfs: skip writeback from reclaim context
        xfs: remove done roadmap item from xfs-delayed-logging-design.txt
        xfs: fix race in inode cluster freeing failing to stale inodes
        xfs: fix access to upper inodes without inode64
        xfs: fix might_sleep() warning when initialising per-ag tree
        fs/xfs/quota: Add missing mutex_unlock
        xfs: remove duplicated #include
        xfs: convert more trace events to DEFINE_EVENT
        xfs: xfs_trace.c: remove duplicated #include
        xfs: Check new inode size is OK before preallocating
        xfs: clean up xlog_align
        xfs: cleanup log reservation calculactions
        xfs: be more explicit if RT mount fails due to config
        xfs: replace E2BIG with EFBIG where appropriate
      6c5de280
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · ed7dc1df
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits)
        X25: remove duplicated #include
        tcp: use correct net ns in cookie_v4_check()
        rps: tcp: fix rps_sock_flow_table table updates
        ppp_generic: fix multilink fragment sizes
        syncookies: remove Kconfig text line about disabled-by-default
        ixgbe: only check pfc bits in hang logic if pfc is enabled
        net: check for refcount if pop a stacked dst_entry
        ixgbe: return IXGBE_ERR_RAR_INDEX when out of range
        act_pedit: access skb->data safely
        sfc: Store port number in net_device::dev_id
        epic100: Test __BIG_ENDIAN instead of (non-existent) CONFIG_BIG_ENDIAN
        tehuti: return -EFAULT on copy_to_user errors
        isdn/kcapi: return -EFAULT on copy_from_user errors
        e1000e: change logical negate to bitwise
        sfc: Get port number from CS_PORT_NUM, not PCI function number
        cls_u32: use skb_header_pointer() to dereference data safely
        TCP: tcp_hybla: Fix integer overflow in slow start increment
        act_nat: fix the wrong checksum when addr isn't in old_addr/mask
        net/fec: fix pm to survive to suspend/resume
        korina: count RX DMA OVR as rx_fifo_error
        ...
      ed7dc1df
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 · 7926e0bf
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
        nilfs2: remove obsolete declarations of cache constructor and destructor
        nilfs2: fix style issue in nilfs_destroy_cachep
      7926e0bf
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 · 7f0d384c
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
        Minix: Clean up left over label
        fix truncate inode time modification breakage
        fix setattr error handling in sysfs, configfs
        fcntl: return -EFAULT if copy_to_user fails
        wrong type for 'magic' argument in simple_fill_super()
        fix the deadlock in qib_fs
        mqueue doesn't need make_bad_inode()
      7f0d384c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus · 90ec7819
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
        module: fix bne2 "gave up waiting for init of module libcrc32c"
        module: verify_export_symbols under the lock
        module: move find_module check to end
        module: make locking more fine-grained.
        module: Make module sysfs functions private.
        module: move sysfs exposure to end of load_module
        module: fix kdb's illicit use of struct module_use.
        module: Make the 'usage' lists be two-way
      90ec7819
    • Rusty Russell's avatar
      module: fix bne2 "gave up waiting for init of module libcrc32c" · 9bea7f23
      Rusty Russell authored
      Problem: it's hard to avoid an init routine stumbling over a
      request_module these days.  And it's not clear it's always a bad idea:
      for example, a module like kvm with dynamic dependencies on kvm-intel
      or kvm-amd would be neater if it could simply request_module the right
      one.
      
      In this particular case, it's libcrc32c:
      
      	libcrc32c_mod_init
      	 crypto_alloc_shash
      	  crypto_alloc_tfm
      	   crypto_find_alg
      	    crypto_alg_mod_lookup
      	     crypto_larval_lookup
      	      request_module
      
      If another module is waiting inside resolve_symbol() for libcrc32c to
      finish initializing (ie. bne2 depends on libcrc32c) then it does so
      holding the module lock, and our request_module() can't make progress
      until that is released.
      
      Waiting inside resolve_symbol() without the lock isn't all that hard:
      we just need to pass the -EBUSY up the call chain so we can sleep
      where we don't hold the lock.  Error reporting is a bit trickier: we
      need to copy the name of the unfinished module before releasing the
      lock.
      
      Other notes:
      1) This also fixes a theoretical issue where a weak dependency would allow
         symbol version mismatches to be ignored.
      2) We rename use_module to ref_module to make life easier for the only
         external user (the out-of-tree ksplice patches).
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Tim Abbot <tabbott@ksplice.com>
      Tested-by: default avatarBrandon Philips <bphilips@suse.de>
      9bea7f23
    • Rusty Russell's avatar
      module: verify_export_symbols under the lock · be593f4c
      Rusty Russell authored
      It disabled preempt so it was "safe", but nothing stops another module
      slipping in before this module is added to the global list now we don't
      hold the lock the whole time.
      
      So we check this just after we check for duplicate modules, and just
      before we put the module in the global list.
      
      (find_symbol finds symbols in coming and going modules, too).
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      be593f4c
    • Linus Torvalds's avatar
      module: move find_module check to end · 3bafeb62
      Linus Torvalds authored
      I think Rusty may have made the lock a bit _too_ finegrained there, and
      didn't add it to some places that needed it. It looks, for example, like
      PATCH 1/2 actually drops the lock in places where it's needed
      ("find_module()" is documented to need it, but now load_module() didn't
      hold it at all when it did the find_module()).
      
      Rather than adding a new "module_loading" list, I think we should be able
      to just use the existing "modules" list, and just fix up the locking a
      bit.
      
      In fact, maybe we could just move the "look up existing module" a bit
      later - optimistically assuming that the module doesn't exist, and then
      just undoing the work if it turns out that we were wrong, just before
      adding ourselves to the list.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      3bafeb62
    • Rusty Russell's avatar
      module: make locking more fine-grained. · 75676500
      Rusty Russell authored
      Kay Sievers <kay.sievers@vrfy.org> reports that we still have some
      contention over module loading which is slowing boot.
      
      Linus also disliked a previous "drop lock and regrab" patch to fix the
      bne2 "gave up waiting for init of module libcrc32c" message.
      
      This is more ambitious: we only grab the lock where we need it.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Brandon Philips <brandon@ifup.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      75676500
    • Rusty Russell's avatar
      module: Make module sysfs functions private. · 6407ebb2
      Rusty Russell authored
      These were placed in the header in ef665c1a to get the various
      SYSFS/MODULE config combintations to compile.
      
      That may have been necessary then, but it's not now.  These functions
      are all local to module.c.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      6407ebb2
    • Rusty Russell's avatar
      module: move sysfs exposure to end of load_module · 80a3d1bb
      Rusty Russell authored
      This means a little extra work, but is more logical: we don't put
      anything in sysfs until we're about to put the module into the
      global list an parse its parameters.
      
      This also gives us a logical place to put duplicate module detection
      in the next patch.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      80a3d1bb
    • Rusty Russell's avatar
      module: fix kdb's illicit use of struct module_use. · c8e21ced
      Rusty Russell authored
      Linus changed the structure, and luckily this didn't compile any more.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Jason Wessel <jason.wessel@windriver.com>
      Cc: Martin Hicks <mort@sgi.com>
      c8e21ced
    • Linus Torvalds's avatar
      module: Make the 'usage' lists be two-way · 2c02dfe7
      Linus Torvalds authored
      When adding a module that depends on another one, we used to create a
      one-way list of "modules_which_use_me", so that module unloading could
      see who needs a module.
      
      It's actually quite simple to make that list go both ways: so that we
      not only can see "who uses me", but also see a list of modules that are
      "used by me".
      
      In fact, we always wanted that list in "module_unload_free()": when we
      unload a module, we want to also release all the other modules that are
      used by that module.  But because we didn't have that list, we used to
      first iterate over all modules, and then iterate over each "used by me"
      list of that module.
      
      By making the list two-way, we simplify module_unload_free(), and it
      allows for some trivial fixes later too.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (cleaned & rebased)
      2c02dfe7
  7. 04 Jun, 2010 1 commit