31 Oct, 2009

5 commits

  • Move receive processing from event handler to a tasklet.
    This should help prevent hangcheck timer from going off
    when RDS is under heavy load.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • This issue was discovered by HP's Pradeep and fixed in OFED
    1.3, but not fixed in later versions, since the fix's implementation
    was not immediately applyable to the later code. This patch should
    do the trick for 1.4+ codebases.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • Remove explicit destruction of passive connection when destroying
    active end of the connection. The passive end is also on the
    device's connection list, and will thus be cleaned up properly.
    Panic was caused by trying to clean it up twice.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    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: Shin Hong
    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    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: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     

19 Oct, 2009

1 commit

  • 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: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

07 Oct, 2009

1 commit


01 Oct, 2009

1 commit

  • This provides safety against negative optlen at the type
    level instead of depending upon (sometimes non-trivial)
    checks against this sprinkled all over the the place, in
    each and every implementation.

    Based upon work done by Arjan van de Ven and feedback
    from Linus Torvalds.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Sep, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (66 commits)
    be2net: fix some cmds to use mccq instead of mbox
    atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
    pkt_sched: Fix qstats.qlen updating in dump_stats
    ipv6: Log the affected address when DAD failure occurs
    wl12xx: Fix print_mac() conversion.
    af_iucv: fix race when queueing skbs on the backlog queue
    af_iucv: do not call iucv_sock_kill() twice
    af_iucv: handle non-accepted sockets after resuming from suspend
    af_iucv: fix race in __iucv_sock_wait()
    iucv: use correct output register in iucv_query_maxconn()
    iucv: fix iucv_buffer_cpumask check when calling IUCV functions
    iucv: suspend/resume error msg for left over pathes
    wl12xx: switch to %pM to print the mac address
    b44: the poll handler b44_poll must not enable IRQ unconditionally
    ipv6: Ignore route option with ROUTER_PREF_INVALID
    bonding: make ab_arp select active slaves as other modes
    cfg80211: fix SME connect
    rc80211_minstrel: fix contention window calculation
    ssb/sdio: fix printk format warnings
    p54usb: add Zcomax XG-705A usbid
    ...

    Linus Torvalds
     

16 Sep, 2009

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
    powerpc64: convert to dynamic percpu allocator
    sparc64: use embedding percpu first chunk allocator
    percpu: kill lpage first chunk allocator
    x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
    percpu: update embedding first chunk allocator to handle sparse units
    percpu: use group information to allocate vmap areas sparsely
    vmalloc: implement pcpu_get_vm_areas()
    vmalloc: separate out insert_vmalloc_vm()
    percpu: add chunk->base_addr
    percpu: add pcpu_unit_offsets[]
    percpu: introduce pcpu_alloc_info and pcpu_group_info
    percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
    percpu: add @align to pcpu_fc_alloc_fn_t
    percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
    percpu: drop @static_size from first chunk allocators
    percpu: generalize first chunk allocator selection
    percpu: build first chunk allocators selectively
    percpu: rename 4k first chunk allocator to page
    percpu: improve boot messages
    percpu: fix pcpu_reclaim() locking
    ...

    Fix trivial conflict as by Tejun Heo in kernel/sched.c

    Linus Torvalds
     

15 Sep, 2009

1 commit


24 Aug, 2009

5 commits

  • Now that RDS transports are no longer compiled-in to RDS core,
    there is now the possibility that they will not be loaded. This
    adds a helpful suggestion when rds_bind() fails to find a transport.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • Now that transports can be loaded in arbitrary order,
    it is important for rds_trans_get_preferred() to look
    for them in a particular order, instead of walking the list
    until it finds a transport that works for a given address.
    Now, each transport registers for a specific transport slot,
    and these are ordered so that preferred transports come first,
    and then if they are not loaded, other transports are queried.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • Enable the building of transports as modules.

    Also, improve consistency of Kconfig messages in relation to other
    protocols, and move build dependency on IB from the RDS core code
    to the rds_rdma module.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • Now that rdma and tcp transports will be modularized,
    we need to export a number of functions so they can call them.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     
  • This code allows RDS to be tunneled over a TCP connection.

    RDMA operations are disabled when using TCP transport,
    but this frees RDS from the IB/RDMA stack dependency, and allows
    it to be used with standard Ethernet adapters, or in a VM.

    Signed-off-by: Andy Grover
    Signed-off-by: David S. Miller

    Andy Grover
     

06 Aug, 2009

2 commits

  • Elsewhere the sin_family field holds a value with a name of the form
    AF_..., so it seems reasonable to do so here as well. Also the values of
    PF_INET and AF_INET are the same.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    struct sockaddr_in sip;
    @@

    (
    sip.sin_family ==
    - PF_INET
    + AF_INET
    |
    sip.sin_family !=
    - PF_INET
    + AF_INET
    |
    sip.sin_family =
    - PF_INET
    + AF_INET
    )
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • String literals are constant, and usually, we can also tag the array
    of pointers const too, moving it to the .rodata section.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: David S. Miller

    Jan Engelhardt
     

20 Jul, 2009

15 commits


24 Jun, 2009

1 commit

  • 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: Tejun Heo
    Cc: Mike Frysinger
    Cc: Tony Luck
    Cc: Andy Grover

    Tejun Heo
     

19 May, 2009

1 commit


22 Apr, 2009

1 commit

  • 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: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     

10 Apr, 2009

4 commits