07 Mar, 2007

4 commits

  • Provide a module param "pool_mode" for sunrpc.ko which allows a sysadmin to
    choose the mode for mapping NFS thread service pools to CPUs. Values are:

    auto choose a mapping mode heuristically
    global (default, same as the pre-2.6.19 code) a single global pool
    percpu one pool per CPU
    pernode one pool per NUMA node

    Note that since 2.6.19 the hardcoded behaviour has been "auto", this patch
    makes the default "global".

    The pool mode can be changed after boot/modprobe using /sys, if the NFS and
    lockd services have been shut down. A useful side effect of this change is to
    fix a small memory leak when unloading the module.

    Signed-off-by: Greg Banks
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Banks
     
  • When the last thread of nfsd exits, it shuts down all related sockets. It
    currently uses svc_close_socket to do this, but that only is immediately
    effective if the socket is not SK_BUSY.

    If the socket is busy - i.e. if a request has arrived that has not yet been
    processes - svc_close_socket is not effective and the shutdown process spins.

    So create a new svc_force_close_socket which removes the SK_BUSY flag is set
    and then calls svc_close_socket.

    Also change some open-codes loops in svc_destroy to use
    list_for_each_entry_safe.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • They don't really save that much, and aren't worth the hassle.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • The sunrpc server code needs to know the source and destination address for
    UDP packets so it can reply properly. It currently copies code out of the
    network stack to pick the pieces out of the skb. This is ugly and causes
    compile problems with the IPv6 stuff.

    So, rip that out and use recv_msg instead. This is a much cleaner interface,
    but has a slight cost in that the checksum is now checked before the copy, so
    we don't benefit from doing both at the same time. This can probably be
    fixed.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

21 Feb, 2007

2 commits

  • We frequently need the maximum number of possible processors in order to
    allocate arrays for all processors. So far this was done using
    highest_possible_processor_id(). However, we do need the number of
    processors not the highest id. Moreover the number was so far dynamically
    calculated on each invokation. The number of possible processors does not
    change when the system is running. We can therefore calculate that number
    once.

    Signed-off-by: Christoph Lameter
    Cc: Frederik Deweerdt
    Cc: Neil Brown
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • highest_possible_node_id() is currently used to calculate the last possible
    node idso that the network subsystem can figure out how to size per node
    arrays.

    I think having the ability to determine the maximum amount of nodes in a
    system at runtime is useful but then we should name this entry
    correspondingly, it should return the number of node_ids, and the the value
    needs to be setup only once on bootup. The node_possible_map does not
    change after bootup.

    This patch introduces nr_node_ids and replaces the use of
    highest_possible_node_id(). nr_node_ids is calculated on bootup when the
    page allocators pagesets are initialized.

    [deweerdt@free.fr: fix oops]
    Signed-off-by: Christoph Lameter
    Cc: Neil Brown
    Cc: Trond Myklebust
    Signed-off-by: Frederik Deweerdt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

15 Feb, 2007

5 commits

  • The semantic effect of insert_at_head is that it would allow new registered
    sysctl entries to override existing sysctl entries of the same name. Which is
    pain for caching and the proc interface never implemented.

    I have done an audit and discovered that none of the current users of
    register_sysctl care as (excpet for directories) they do not register
    duplicate sysctl entries.

    So this patch simply removes the support for overriding existing entries in
    the sys_sysctl interface since no one uses it or cares and it makes future
    enhancments harder.

    Signed-off-by: Eric W. Biederman
    Acked-by: Ralf Baechle
    Acked-by: Martin Schwidefsky
    Cc: Russell King
    Cc: David Howells
    Cc: "Luck, Tony"
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Andi Kleen
    Cc: Jens Axboe
    Cc: Corey Minyard
    Cc: Neil Brown
    Cc: "John W. Linville"
    Cc: James Bottomley
    Cc: Jan Kara
    Cc: Trond Myklebust
    Cc: Mark Fasheh
    Cc: David Chinner
    Cc: "David S. Miller"
    Cc: Patrick McHardy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • We don't need this to prevent module unload races so remove the unnecessary
    code.

    Signed-off-by: Eric W. Biederman
    Cc: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Because the sunrpc sysctls don't conflict with any other sysctls the setting
    the insert at head flag to register_sysctl has no semantic meaning.

    Signed-off-by: Eric W. Biederman
    Cc: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     
  • AUTH_UNIX authentication (the standard with NFS) has a limit of 16 groups ids.
    This causes problems for people in more than 16 groups.

    So allow the server to map a uid into a list of group ids based on local
    knowledge rather depending on the (possibly truncated) list from the client.

    If there is no process on the server responding to upcalls, the gidlist in the
    request will still be used.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

13 Feb, 2007

17 commits


11 Feb, 2007

1 commit


10 Feb, 2007

1 commit

  • If you lose this race, it can iput a socket inode twice and you get a BUG
    in fs/inode.c

    When I added the option for user-space to close a socket, I added some
    cruft to svc_delete_socket so that I could call that function when closing
    a socket per user-space request.

    This was the wrong thing to do. I should have just set SK_CLOSE and let
    normal mechanisms do the work.

    Not only wrong, but buggy. The locking is all wrong and it openned up a
    race where-by a socket could be closed twice.

    So this patch:
    Introduces svc_close_socket which sets SK_CLOSE then either leave
    the close up to a thread, or calls svc_delete_socket if it can
    get SK_BUSY.

    Adds a bias to sk_busy which is removed when SK_DEAD is set,
    This avoid races around shutting down the socket.

    Changes several 'spin_lock' to 'spin_lock_bh' where the _bh
    was missing.

    Bugzilla-url: http://bugzilla.kernel.org/show_bug.cgi?id=7916

    Signed-off-by: Neil Brown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

04 Feb, 2007

5 commits


31 Jan, 2007

1 commit


27 Jan, 2007

2 commits

  • NFSd assumes that largest number of pages that will be needed for a
    request+response is 2+N where N pages is the size of the largest permitted
    read/write request. The '2' are 1 for the non-data part of the request, and 1
    for the non-data part of the reply.

    However, when a read request is not page-aligned, and we choose to use
    ->sendfile to send it directly from the page cache, we may need N+1 pages to
    hold the whole reply. This can overflow and array and cause an Oops.

    This patch increases size of the array for holding pages by one and makes sure
    that entry is NULL when it is not in use.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Due to silly typos, if the nfs versions are explicitly set, no NFSACL versions
    get enabled.

    Also improve an error message that would have made this bug a little easier to
    find.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     

25 Jan, 2007

1 commit


23 Dec, 2006

1 commit