1. 13 1月, 2011 4 次提交
    • A
      pass default dentry_operations to mount_pseudo() · c74a1cbb
      Al Viro 提交于
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      c74a1cbb
    • T
      net/ceph: make ceph_msgr_wq non-reentrant · f363e45f
      Tejun Heo 提交于
      ceph messenger code does a rather complex dancing around multithread
      workqueue to make sure the same work item isn't executed concurrently
      on different CPUs.  This restriction can be provided by workqueue with
      WQ_NON_REENTRANT.
      
      Make ceph_msgr_wq non-reentrant workqueue with the default concurrency
      level and remove the QUEUED/BUSY logic.
      
      * This removes backoff handling in con_work() but it couldn't reliably
        block execution of con_work() to begin with - queue_con() can be
        called after the work started but before BUSY is set.  It seems that
        it was an optimization for a rather cold path and can be safely
        removed.
      
      * The number of concurrent work items is bound by the number of
        connections and connetions are independent from each other.  With
        the default concurrency level, different connections will be
        executed independently.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Sage Weil <sage@newdream.net>
      Cc: ceph-devel@vger.kernel.org
      Signed-off-by: NSage Weil <sage@newdream.net>
      f363e45f
    • J
      ceph: Always free allocated memory in osdmap_decode() · b0aee351
      Jesper Juhl 提交于
      Always free memory allocated to 'pi' in
      net/ceph/osdmap.c::osdmap_decode().
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NSage Weil <sage@newdream.net>
      b0aee351
    • S
      ceph: add dir_layout to inode · 6c0f3af7
      Sage Weil 提交于
      Add a ceph_dir_layout to the inode, and calculate dentry hash values based
      on the parent directory's specified dir_hash function.  This is needed
      because the old default Linux dcache hash function is extremely week and
      leads to a poor distribution of files among dir fragments.
      Signed-off-by: NSage Weil <sage@newdream.net>
      6c0f3af7
  2. 12 1月, 2011 4 次提交
  3. 11 1月, 2011 9 次提交
  4. 10 1月, 2011 8 次提交
  5. 07 1月, 2011 15 次提交
    • G
      dccp: make upper bound for seq_window consistent on 32/64 bit · bfbb2346
      Gerrit Renker 提交于
      The 'seq_window' sysctl sets the initial value for the DCCP Sequence Window,
      which may range from 32..2^46-1 (RFC 4340, 7.5.2). The patch sets the upper
      bound consistently to 2^32-1 on both 32 and 64 bit systems, which should be
      sufficient - with a RTT of 1sec and 1-byte packets, a seq_window of 2^32-1
      corresponds to a link speed of 34 Gbps.
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      bfbb2346
    • S
      dccp: fix bug in updating the GSR · 763dadd4
      Samuel Jero 提交于
      Currently dccp_check_seqno allows any valid packet to update the Greatest
      Sequence Number Received, even if that packet's sequence number is less than
      the current GSR. This patch adds a check to make sure that the new packet's
      sequence number is greater than GSR.
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      763dadd4
    • S
      dccp: fix return value for sequence-invalid packets · 2cf5be93
      Samuel Jero 提交于
      Currently dccp_check_seqno returns 0 (indicating a valid packet) if the
      acknowledgment number is out of bounds and the sync that RFC 4340 mandates at
      this point is currently being rate-limited. This function should return -1,
      indicating an invalid packet.
      Signed-off-by: NSamuel Jero <sj323707@ohio.edu>
      Acked-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      2cf5be93
    • N
      fs: scale mntget/mntput · b3e19d92
      Nick Piggin 提交于
      The problem that this patch aims to fix is vfsmount refcounting scalability.
      We need to take a reference on the vfsmount for every successful path lookup,
      which often go to the same mount point.
      
      The fundamental difficulty is that a "simple" reference count can never be made
      scalable, because any time a reference is dropped, we must check whether that
      was the last reference. To do that requires communication with all other CPUs
      that may have taken a reference count.
      
      We can make refcounts more scalable in a couple of ways, involving keeping
      distributed counters, and checking for the global-zero condition less
      frequently.
      
      - check the global sum once every interval (this will delay zero detection
        for some interval, so it's probably a showstopper for vfsmounts).
      
      - keep a local count and only taking the global sum when local reaches 0 (this
        is difficult for vfsmounts, because we can't hold preempt off for the life of
        a reference, so a counter would need to be per-thread or tied strongly to a
        particular CPU which requires more locking).
      
      - keep a local difference of increments and decrements, which allows us to sum
        the total difference and hence find the refcount when summing all CPUs. Then,
        keep a single integer "long" refcount for slow and long lasting references,
        and only take the global sum of local counters when the long refcount is 0.
      
      This last scheme is what I implemented here. Attached mounts and process root
      and working directory references are "long" references, and everything else is
      a short reference.
      
      This allows scalable vfsmount references during path walking over mounted
      subtrees and unattached (lazy umounted) mounts with processes still running
      in them.
      
      This results in one fewer atomic op in the fastpath: mntget is now just a
      per-CPU inc, rather than an atomic inc; and mntput just requires a spinlock
      and non-atomic decrement in the common case. However code is otherwise bigger
      and heavier, so single threaded performance is basically a wash.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b3e19d92
    • N
      fs: improve scalability of pseudo filesystems · 4b936885
      Nick Piggin 提交于
      Regardless of how much we possibly try to scale dcache, there is likely
      always going to be some fundamental contention when adding or removing children
      under the same parent. Pseudo filesystems do not seem need to have connected
      dentries because by definition they are disconnected.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      4b936885
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: avoid inode RCU freeing for pseudo fs · ff0c7d15
      Nick Piggin 提交于
      Pseudo filesystems that don't put inode on RCU list or reachable by
      rcu-walk dentries do not need to RCU free their inodes.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      ff0c7d15
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
    • N
      fs: change d_delete semantics · fe15ce44
      Nick Piggin 提交于
      Change d_delete from a dentry deletion notification to a dentry caching
      advise, more like ->drop_inode. Require it to be constant and idempotent,
      and not take d_lock. This is how all existing filesystems use the callback
      anyway.
      
      This makes fine grained dentry locking of dput and dentry lru scanning
      much simpler.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fe15ce44
    • A
      NFS rename client back channel transport field · 4a19de0f
      Andy Adamson 提交于
      Differentiate from server backchannel
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Acked-by: NBruce Fields <bfields@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4a19de0f
    • A
      NFS associate sessionid with callback connection · 2c2618c6
      Andy Adamson 提交于
      The sessions based callback service is started prior to the CREATE_SESSION call
      so that it can handle CB_NULL requests which can be sent before the
      CREATE_SESSION call returns and the session ID is known.
      
      Set the callback sessionid after a sucessful CREATE_SESSION.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      2c2618c6
    • A
    • A
      SUNRPC new transport for the NFSv4.1 shared back channel · 1f11a034
      Andy Adamson 提交于
      Move the current sock create and destroy routines into the new transport ops.
      Back channel socket will be destroyed by the svc_closs_all call in svc_destroy.
      
      Added check: only TCP supported on shared back channel.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Acked-by: NBruce Fields <bfields@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1f11a034
    • A
      SUNRPC fix bc_send print · 71e161a6
      Andy Adamson 提交于
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      71e161a6
    • A
      SUNRPC move svc_drop to caller of svc_process_common · 4b5b3ba1
      Andy Adamson 提交于
      The NFSv4.1 shared back channel does not need to call svc_drop because the
      callback service never outlives the single connection it services, and it
      reuses it's buffers and keeps the trasport.
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Acked-by: NBruce Fields <bfields@redhat.com>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4b5b3ba1