1. 24 6月, 2008 2 次提交
  2. 09 5月, 2008 1 次提交
  3. 24 4月, 2008 5 次提交
  4. 20 4月, 2008 1 次提交
    • M
      nodemask: use new node_to_cpumask_ptr function · c5f59f08
      Mike Travis 提交于
        * Use new node_to_cpumask_ptr.  This creates a pointer to the
          cpumask for a given node.  This definition is in mm patch:
      
      	asm-generic-add-node_to_cpumask_ptr-macro.patch
      
        * Use new set_cpus_allowed_ptr function.
      
      Depends on:
      	[mm-patch]: asm-generic-add-node_to_cpumask_ptr-macro.patch
      	[sched-devel]: sched: add new set_cpus_allowed_ptr function
      	[x86/latest]: x86: add cpus_scnprintf function
      
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Greg Banks <gnb@melbourne.sgi.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c5f59f08
  5. 02 2月, 2008 6 次提交
  6. 30 1月, 2008 1 次提交
  7. 10 10月, 2007 1 次提交
    • D
      knfsd: Add source address to sunrpc svc errors · 354ecbb9
      Dr. David Alan Gilbert 提交于
      This patch adds the address of the client that caused an error in
      sunrpc/svc.c so that you get errors that look like:
      
      svc: 192.168.66.28, port=709: unknown version (3 for prog 100003, nfsd)
      
      I've seen machines which get bunches of unknown version or similar
      errors from time to time, and while the recent patch to add the service
      helps to find which service has the wrong version it doesn't help find
      the potentially bad client.
      
      The patch is against a checkout of Linus's git tree made on 2007-08-24.
      
      One observation is that the svc_print_addr function prints to a buffer
      which in this case makes life a little more complex; it just feels as if
      there must be lots of places that print a connection address - is there
      a better function to use anywhere?
      
      I think actually there are a few places with semi duplicated code; e.g.
      one_sock_name switches on the address family but only currently has
      IPV4; I wonder how many other places are similar.
      Signed-off-by: NDave Gilbert <linux@treblig.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Acked-by: NNeil Brown <neilb@suse.de>
      354ecbb9
  8. 10 7月, 2007 1 次提交
  9. 10 5月, 2007 1 次提交
    • J
      RPC: add wrapper for svc_reserve to account for checksum · cd123012
      Jeff Layton 提交于
      When the kernel calls svc_reserve to downsize the expected size of an RPC
      reply, it fails to account for the possibility of a checksum at the end of
      the packet.  If a client mounts a NFSv2/3 with sec=krb5i/p, and does I/O
      then you'll generally see messages similar to this in the server's ring
      buffer:
      
      RPC request reserved 164 but used 208
      
      While I was never able to verify it, I suspect that this problem is also
      the root cause of some oopses I've seen under these conditions:
      
      https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=227726
      
      This is probably also a problem for other sec= types and for NFSv4.  The
      large reserved size for NFSv4 compound packets seems to generally paper
      over the problem, however.
      
      This patch adds a wrapper for svc_reserve that accounts for the possibility
      of a checksum.  It also fixes up the appropriate callers of svc_reserve to
      call the wrapper.  For now, it just uses a hardcoded value that I
      determined via testing.  That value may need to be revised upward as things
      change, or we may want to eventually add a new auth_op that attempts to
      calculate this somehow.
      
      Unfortunately, there doesn't seem to be a good way to reliably determine
      the expected checksum length prior to actually calculating it, particularly
      with schemes like spkm3.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Acked-by: NNeil Brown <neilb@suse.de>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Acked-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd123012
  10. 01 5月, 2007 1 次提交
  11. 07 3月, 2007 2 次提交
  12. 21 2月, 2007 2 次提交
  13. 11 2月, 2007 1 次提交
  14. 10 2月, 2007 1 次提交
    • N
      [PATCH] knfsd: fix a race in closing NFSd connections · aaf68cfb
      NeilBrown 提交于
      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=7916Signed-off-by: NNeil Brown <neilb@suse.de>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      aaf68cfb
  15. 04 2月, 2007 1 次提交
  16. 31 1月, 2007 1 次提交
  17. 27 1月, 2007 1 次提交
  18. 14 12月, 2006 1 次提交
  19. 17 10月, 2006 1 次提交
    • N
      [PATCH] knfsd: Allow lockd to drop replies as appropriate · d343fce1
      NeilBrown 提交于
      It is possible for the ->fopen callback from lockd into nfsd to find that an
      answer cannot be given straight away (an upcall is needed) and so the request
      has to be 'dropped', to be retried later.  That error status is not currently
      propagated back.
      
      So:
        Change nlm_fopen to return nlm error codes (rather than a private
        protocol) and define a new nlm_drop_reply code.
        Cause nlm_drop_reply to cause the rpc request to get rpc_drop_reply
        when this error comes back.
        Cause svc_process to drop a request which returns a status of
        rpc_drop_reply.
      
      [akpm@osdl.org: fix warning storm]
      Cc: Marc Eshel <eshel@almaden.ibm.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d343fce1
  20. 06 10月, 2006 1 次提交
    • N
      [PATCH] knfsd: tidy up up meaning of 'buffer size' in nfsd/sunrpc · c6b0a9f8
      NeilBrown 提交于
      There is some confusion about the meaning of 'bufsz' for a sunrpc server.
      In some cases it is the largest message that can be sent or received.  In
      other cases it is the largest 'payload' that can be included in a NFS
      message.
      
      In either case, it is not possible for both the request and the reply to be
      this large.  One of the request or reply may only be one page long, which
      fits nicely with NFS.
      
      So we remove 'bufsz' and replace it with two numbers: 'max_payload' and
      'max_mesg'.  Max_payload is the size that the server requests.  It is used
      by the server to check the max size allowed on a particular connection:
      depending on the protocol a lower limit might be used.
      
      max_mesg is the largest single message that can be sent or received.  It is
      calculated as the max_payload, rounded up to a multiple of PAGE_SIZE, and
      with PAGE_SIZE added to overhead.  Only one of the request and reply may be
      this size.  The other must be at most one page.
      
      Cc: Greg Banks <gnb@sgi.com>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c6b0a9f8
  21. 04 10月, 2006 4 次提交
  22. 02 10月, 2006 4 次提交
    • G
      [PATCH] knfsd: make rpc threads pools numa aware · bfd24160
      Greg Banks 提交于
      Actually implement multiple pools.  On NUMA machines, allocate a svc_pool per
      NUMA node; on SMP a svc_pool per CPU; otherwise a single global pool.  Enqueue
      sockets on the svc_pool corresponding to the CPU on which the socket bh is run
      (i.e.  the NIC interrupt CPU).  Threads have their cpu mask set to limit them
      to the CPUs in the svc_pool that owns them.
      
      This is the patch that allows an Altix to scale NFS traffic linearly
      beyond 4 CPUs and 4 NICs.
      
      Incorporates changes and feedback from Neil Brown, Trond Myklebust, and
      Christoph Hellwig.
      Signed-off-by: NGreg Banks <gnb@melbourne.sgi.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bfd24160
    • G
      [PATCH] knfsd: add svc_set_num_threads · a7455442
      Greg Banks 提交于
      Currently knfsd keeps its own list of all nfsd threads in nfssvc.c; add a new
      way of managing the list of all threads in a svc_serv.  Add
      svc_create_pooled() to allow creation of a svc_serv whose threads are managed
      by the sunrpc code.  Add svc_set_num_threads() to manage the number of threads
      in a service, either per-pool or globally across the service.
      Signed-off-by: NGreg Banks <gnb@melbourne.sgi.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a7455442
    • G
      [PATCH] knfsd: split svc_serv into pools · 3262c816
      Greg Banks 提交于
      Split out the list of idle threads and pending sockets from svc_serv into a
      new svc_pool structure, and allocate a fixed number (in this patch, 1) of
      pools per svc_serv.  The new structure contains a lock which takes over
      several of the duties of svc_serv->sv_lock, which is now relegated to
      protecting only sv_tempsocks, sv_permsocks, and sv_tmpcnt in svc_serv.
      
      The point is to move the hottest fields out of svc_serv and into svc_pool,
      allowing a following patch to arrange for a svc_pool per NUMA node or per CPU.
       This is a major step towards making the NFS server NUMA-friendly.
      Signed-off-by: NGreg Banks <gnb@melbourne.sgi.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3262c816
    • G
      [PATCH] knfsd: move tempsock aging to a timer · 36bdfc8b
      Greg Banks 提交于
      Following are 11 patches from Greg Banks which combine to make knfsd more
      Numa-aware.  They reduce hitting on 'global' data structures, and create some
      data-structures that can be node-local.
      
      knfsd threads are bound to a particular node, and the thread to handle a new
      request is chosen from the threads that are attach to the node that received
      the interrupt.
      
      The distribution of threads across nodes can be controlled by a new file in
      the 'nfsd' filesystem, though the default approach of an even spread is
      probably fine for most sites.
      
      Some (old) numbers that show the efficacy of these patches: N == number of
      NICs == number of CPUs == nmber of clients.  Number of NUMA nodes == N/2
      
      N	Throughput, MiB/s	CPU usage, % (max=N*100)
      	Before	After		Before	After
      	---	------	----		-----	-----
      	4	312	435		350	228
      	6	500	656		501	418
      	8	562	804		690	589
      
      This patch:
      
      Move the aging of RPC/TCP connection sockets from the main svc_recv() loop to
      a timer which uses a mark-and-sweep algorithm every 6 minutes.  This reduces
      the amount of work that needs to be done in the main RPC loop and the length
      of time we need to hold the (effectively global) svc_serv->sv_lock.
      
      [akpm@osdl.org: cleanup]
      Signed-off-by: NGreg Banks <gnb@melbourne.sgi.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      36bdfc8b