1. 31 10月, 2009 2 次提交
    • A
      RDS: Fix potential race around rds_i[bw]_allocation · 86357b19
      Andy Grover 提交于
      "At rds_ib_recv_refill_one(), it first executes atomic_read(&rds_ib_allocation)
      for if-condition checking,
      
      and then executes atomic_inc(&rds_ib_allocation) if the condition was
      not satisfied.
      
      However, if any other code which updates rds_ib_allocation executes
      between these two atomic operation executions,
      it seems that it may result race condition. (especially when
      rds_ib_allocation + 1 == rds_ib_sysctl_max_recv_allocation)"
      
      This patch fixes this by using atomic_inc_unless to eliminate the
      possibility of allocating more than rds_ib_sysctl_max_recv_allocation
      and then decrementing the count if the allocation fails. It also
      makes an identical change to the iwarp transport.
      Reported-by: NShin Hong <hongshin@gmail.com>
      Signed-off-by: NAndy Grover <andy.grover@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86357b19
    • A
      RDS: Add GET_MR_FOR_DEST sockopt · 244546f0
      Andy Grover 提交于
      RDS currently supports a GET_MR sockopt to establish a
      memory region (MR) for a chunk of memory. However, the fastreg
      method ties a MR to a particular destination. The GET_MR_FOR_DEST
      sockopt allows the remote machine to be specified, and thus
      support for fastreg (aka FRWRs).
      
      Note that this patch does *not* do all of this - it simply
      implements the new sockopt in terms of the old one, so applications
      can begin to use the new sockopt in preparation for cutover to
      FRWRs.
      Signed-off-by: NAndy Grover <andy.grover@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      244546f0
  2. 19 10月, 2009 1 次提交
    • E
      inet: rename some inet_sock fields · c720c7e8
      Eric Dumazet 提交于
      In order to have better cache layouts of struct sock (separate zones
      for rx/tx paths), we need this preliminary patch.
      
      Goal is to transfert fields used at lookup time in the first
      read-mostly cache line (inside struct sock_common) and move sk_refcnt
      to a separate cache line (only written by rx path)
      
      This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
      sport and id fields. This allows a future patch to define these
      fields as macros, like sk_refcnt, without name clashes.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c720c7e8
  3. 07 10月, 2009 1 次提交
  4. 01 10月, 2009 1 次提交
  5. 15 9月, 2009 1 次提交
  6. 24 8月, 2009 5 次提交
  7. 06 8月, 2009 2 次提交
  8. 20 7月, 2009 15 次提交
  9. 24 6月, 2009 1 次提交
    • T
      percpu: use DEFINE_PER_CPU_SHARED_ALIGNED() · b9bf3121
      Tejun Heo 提交于
      There are a few places where ___cacheline_aligned* is used with
      DEFINE_PER_CPU().  Use DEFINE_PER_CPU_SHARED_ALIGNED() instead.
      
      DEFINE_PER_CPU_SHARED_ALIGNED() applies alignment only on SMPs.  While
      all other converted places used _in_smp variant or only get compiled
      for SMP, net/rds used unconditional ____cacheline_aligned.  I don't
      see any reason these data structures should be aligned on UP and thus
      converted together.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Andy Grover <andy.grover@oracle.com>
      b9bf3121
  10. 22 4月, 2009 1 次提交
    • D
      FRV: Fix the section attribute on UP DECLARE_PER_CPU() · 9b8de747
      David Howells 提交于
      In non-SMP mode, the variable section attribute specified by DECLARE_PER_CPU()
      does not agree with that specified by DEFINE_PER_CPU().  This means that
      architectures that have a small data section references relative to a base
      register may throw up linkage errors due to too great a displacement between
      where the base register points and the per-CPU variable.
      
      On FRV, the .h declaration says that the variable is in the .sdata section, but
      the .c definition says it's actually in the .data section.  The linker throws
      up the following errors:
      
      kernel/built-in.o: In function `release_task':
      kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
      kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
      
      To fix this, DECLARE_PER_CPU() should simply apply the same section attribute
      as does DEFINE_PER_CPU().  However, this is made slightly more complex by
      virtue of the fact that there are several variants on DEFINE, so these need to
      be matched by variants on DECLARE.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9b8de747
  11. 10 4月, 2009 10 次提交