23 Nov, 2011

1 commit


07 Jul, 2011

1 commit


31 Mar, 2011

1 commit


11 Mar, 2011

1 commit


12 Feb, 2011

1 commit

  • The recent commit to use cmwq for send and recv threads
    dcce240ead802d42b1e45ad2fcb2ed4a399cb255 introduced problems,
    apparently due to multiple workqueue threads. Single threads
    make the problems go away, so return to that until we fully
    understand the concurrency issues with multiple threads.

    Signed-off-by: David Teigland

    David Teigland
     

14 Dec, 2010

1 commit


13 Nov, 2010

3 commits

  • Calling cond_resched() after every send can unnecessarily
    degrade performance. Go back to an old method of scheduling
    after 25 messages.

    Signed-off-by: Bob Peterson
    Signed-off-by: David Teigland

    Bob Peterson
     
  • Nagling doesn't help and can sometimes hurt dlm comms.

    Signed-off-by: David Teigland

    David Teigland
     
  • So far as I can tell, there is no reason to use a single-threaded
    send workqueue for dlm, since it may need to send to several sockets
    concurrently. Both workqueues are set to WQ_MEM_RECLAIM to avoid
    any possible deadlocks, WQ_HIGHPRI since locking traffic is highly
    latency sensitive (and to avoid a priority inversion wrt GFS2's
    glock_workqueue) and WQ_FREEZABLE just in case someone needs to do
    that (even though with current cluster infrastructure, it doesn't
    make sense as the node will most likely land up ejected from the
    cluster) in the future.

    Signed-off-by: Steven Whitehouse
    Cc: Tejun Heo
    Signed-off-by: David Teigland

    Steven Whitehouse
     

12 Nov, 2010

1 commit

  • In the normal regime where an application uses non-blocking I/O
    writes on a socket, they will handle -EAGAIN and use poll() to
    wait for send space.

    They don't actually sleep on the socket I/O write.

    But kernel level RPC layers that do socket I/O operations directly
    and key off of -EAGAIN on the write() to "try again later" don't
    use poll(), they instead have their own sleeping mechanism and
    rely upon ->sk_write_space() to trigger the wakeup.

    So they do effectively sleep on the write(), but this mechanism
    alone does not let the socket layers know what's going on.

    Therefore they must emulate what would have happened, otherwise
    TCP cannot possibly see that the connection is application window
    size limited.

    Handle this, therefore, like SUNRPC by setting SOCK_NOSPACE and
    bumping the ->sk_write_count as needed when we hit the send buffer
    limits.

    This should make TCP send buffer size auto-tuning and the
    ->sk_write_space() callback invocations actually happen.

    Signed-off-by: David S. Miller
    Signed-off-by: David Teigland

    David Miller
     

06 Aug, 2010

1 commit

  • hlist_for_each_entry binds its first argument to a non-null value, and thus
    any null test on the value of that argument is superfluous.

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

    //
    @@
    iterator I;
    expression x,E,E1,E2;
    statement S,S1,S2;
    @@

    I(x,...) { }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David Teigland

    Julia Lawall
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

01 Dec, 2009

1 commit

  • Replace all GFP_KERNEL and ls_allocation with GFP_NOFS.
    ls_allocation would be GFP_KERNEL for userland lockspaces
    and GFP_NOFS for file system lockspaces.

    It was discovered that any lockspaces on the system can
    affect all others by triggering memory reclaim in the
    file system which could in turn call back into the dlm
    to acquire locks, deadlocking dlm threads that were
    shared by all lockspaces, like dlm_recv.

    Signed-off-by: David Teigland

    David Teigland
     

01 Oct, 2009

2 commits

  • The code to set up sctp sockets was not using the sockfd_lookup()
    and sockfd_put() routines to translate an fd to a socket. The
    direct fget and fput calls were resulting in error messages from
    alloc_fd().

    Also clean up two log messages and remove a third, related to
    setting up sctp associations.

    Signed-off-by: David Teigland

    David Teigland
     
  • The recently added dlm_lowcomms_connect_node() from
    391fbdc5d527149578490db2f1619951d91f3561 does not work
    when using SCTP instead of TCP. The sctp connection code
    has nothing to do without data to send. Check for no data
    in the sctp connection code and do nothing instead of
    triggering a BUG. Also have connect_node() do nothing
    when the protocol is sctp.

    Signed-off-by: David Teigland

    David Teigland
     

25 Aug, 2009

2 commits

  • Using kernel_sendpage() is cleaner and safer than following
    sock->ops ourselves.

    Signed-off-by: Paolo Bonzini
    Signed-off-by: David Teigland

    Paolo Bonzini
     
  • Closing a connection to a node can create problems if there are
    outstanding messages for that node. The problems include dlm_send
    spinning attempting to reconnect, or BUG from tcp_connect_to_sock()
    attempting to use a partially closed connection.

    To cleanly close a connection, we now first attempt to send any pending
    messages, cancel any remaining workqueue work, and flag the connection
    as closed to avoid reconnect attempts.

    Signed-off-by: Lars Marowsky-Bree
    Signed-off-by: Christine Caulfield
    Signed-off-by: David Teigland

    Lars Marowsky-Bree
     

19 Aug, 2009

1 commit

  • The last correction to the tcp_connect_to_sock error exit path,
    commit a89d63a159b1ba5833be2bef00adf8ad8caac8be, can free an already
    freed socket, due to collision with a previous (incomplete) attempt
    to fix the same issue, commit 311f6fc77c51926dbdfbeab0a5d88d70f01fa3f4.

    Signed-off-by: Casey Dahlin
    Signed-off-by: David Teigland

    Casey Dahlin
     

15 Jul, 2009

1 commit


16 May, 2009

1 commit

  • Change some GFP_KERNEL allocations to use either GFP_NOFS or
    ls_allocation (when available) which the fs sets to GFP_NOFS.
    The point is to prevent allocations from going back into the
    cluster fs in places where that might lead to deadlock.

    Signed-off-by: David Teigland

    David Teigland
     

15 May, 2009

1 commit

  • Make network connections to other nodes earlier, in the context of
    dlm_recoverd. This avoids connecting to nodes from dlm_send where we
    try to avoid allocations which could possibly deadlock if memory reclaim
    goes into the cluster fs which may try to do a dlm operation.

    Signed-off-by: Christine Caulfield
    Signed-off-by: David Teigland

    Christine Caulfield
     

12 Mar, 2009

1 commit


29 Jan, 2009

2 commits


24 Dec, 2008

2 commits

  • The pages used in lowcomms are not highmem, so kmap is not necessary.

    Cc: Christine Caulfield
    Signed-off-by: Steven Whitehouse
    Signed-off-by: David Teigland

    Steven Whitehouse
     
  • Use ls_allocation for memory allocations, which a cluster fs sets to
    GFP_NOFS. Use GFP_NOFS for allocations when no lockspace struct is
    available. Taking dlm locks needs to avoid calling back into the
    cluster fs because write-out can require taking dlm locks.

    Cc: Christine Caulfield
    Signed-off-by: Steven Whitehouse
    Signed-off-by: David Teigland

    Steven Whitehouse
     

15 Jul, 2008

1 commit

  • It seems that `sock' allocated by sock_create_kern in
    tcp_connect_to_sock() of dlm/fs/lowcomms.c is not released if
    dlm_nodeid_to_addr an error.

    Acked-by: Christine Caulfield
    Signed-off-by: Masatake YAMATO
    Signed-off-by: David Teigland

    Masatake YAMATO
     

20 May, 2008

2 commits


30 Jan, 2008

2 commits

  • This patch addresses a problem introduced with the last round of
    lowcomms patches where the 'othercon' connections do not get freed when
    the DLM shuts down.

    This results in the error message
    "slab error in kmem_cache_destroy(): cache `dlm_conn': Can't free all
    objects"

    and the DLM cannot be restarted without a system reboot.

    See bz#428119

    Signed-off-by: Patrick Caulfield
    Signed-off-by: Fabio M. Di Nitto
    Signed-off-by: David Teigland

    Patrick Caulfeld
     
  • A common problem occurs when multiple IP addresses within the same
    subnet are assigned to the same NIC. If we make a connection attempt to
    another address on the same subnet as one of those addresses, the
    connection attempt will not necessarily be routed from the address we
    want.

    In the case of the DLM, the other nodes will quickly drop the connection
    attempt, causing problems.

    This patch makes the DLM bind to the local address it acquired from the
    cluster manager when using TCP prior to making a connection, obviating
    the need for administrators to "fix" their systems or use clever routing
    tricks.

    Signed-off-by: Lon Hohberger
    Signed-off-by: Patrick Caulfield
    Signed-off-by: David Teigland

    Lon Hohberger
     

07 Nov, 2007

1 commit


10 Oct, 2007

2 commits


14 Aug, 2007

3 commits


20 Jul, 2007

1 commit

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt
     

09 Jul, 2007

2 commits