1. 03 8月, 2022 2 次提交
  2. 01 6月, 2022 1 次提交
  3. 18 5月, 2022 3 次提交
  4. 23 3月, 2022 3 次提交
    • N
      nfs: remove reliance on bdi congestion · 6df25e58
      NeilBrown 提交于
      The bdi congestion tracking in not widely used and will be removed.
      
      NFS is one of a small number of filesystems that uses it, setting just
      the async (write) congestion flag at what it determines are appropriate
      times.
      
      The only remaining effect of the async flag is to cause (some)
      WB_SYNC_NONE writes to be skipped.
      
      So instead of setting the flag, set an internal flag and change:
      
       - .writepages to do nothing if WB_SYNC_NONE and the flag is set
      
       - .writepage to return AOP_WRITEPAGE_ACTIVATE if WB_SYNC_NONE and the
         flag is set.
      
      The writepages change causes a behavioural change in that pageout() can
      now return PAGE_ACTIVATE instead of PAGE_KEEP, so SetPageActive() will be
      called on the page which (I think) wil further delay the next attempt at
      writeout.  This might be a good thing.
      
      Link: https://lkml.kernel.org/r/164549983738.9187.3972219847989393182.stgit@noble.brownSigned-off-by: NNeilBrown <neilb@suse.de>
      Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>
      Cc: Chao Yu <chao@kernel.org>
      Cc: Darrick J. Wong <djwong@kernel.org>
      Cc: Ilya Dryomov <idryomov@gmail.com>
      Cc: Jaegeuk Kim <jaegeuk@kernel.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jeff Layton <jlayton@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
      Cc: Miklos Szeredi <miklos@szeredi.hu>
      Cc: Paolo Valente <paolo.valente@linaro.org>
      Cc: Philipp Reisner <philipp.reisner@linbit.com>
      Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
      Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6df25e58
    • T
      NFS: Avoid writeback threads getting stuck in mempool_alloc() · 0bae835b
      Trond Myklebust 提交于
      In a low memory situation, allow the NFS writeback code to fail without
      getting stuck in infinite loops in mempool_alloc().
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      0bae835b
    • T
      NFS: nfsiod should not block forever in mempool_alloc() · 515dcdcd
      Trond Myklebust 提交于
      The concern is that since nfsiod is sometimes required to kick off a
      commit, it can get locked up waiting forever in mempool_alloc() instead
      of failing gracefully and leaving the commit until later.
      
      Try to allocate from the slab first, with GFP_KERNEL | __GFP_NORETRY,
      then fall back to a non-blocking attempt to allocate from the memory
      pool.
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      515dcdcd
  5. 15 3月, 2022 1 次提交
  6. 14 3月, 2022 1 次提交
    • N
      SUNRPC: improve 'swap' handling: scheduling and PF_MEMALLOC · 8db55a03
      NeilBrown 提交于
      rpc tasks can be marked as RPC_TASK_SWAPPER.  This causes GFP_MEMALLOC
      to be used for some allocations.  This is needed in some cases, but not
      in all where it is currently provided, and in some where it isn't
      provided.
      
      Currently *all* tasks associated with a rpc_client on which swap is
      enabled get the flag and hence some GFP_MEMALLOC support.
      
      GFP_MEMALLOC is provided for ->buf_alloc() but only swap-writes need it.
      However xdr_alloc_bvec does not get GFP_MEMALLOC - though it often does
      need it.
      
      xdr_alloc_bvec is called while the XPRT_LOCK is held.  If this blocks,
      then it blocks all other queued tasks.  So this allocation needs
      GFP_MEMALLOC for *all* requests, not just writes, when the xprt is used
      for any swap writes.
      
      Similarly, if the transport is not connected, that will block all
      requests including swap writes, so memory allocations should get
      GFP_MEMALLOC if swap writes are possible.
      
      So with this patch:
       1/ we ONLY set RPC_TASK_SWAPPER for swap writes.
       2/ __rpc_execute() sets PF_MEMALLOC while handling any task
          with RPC_TASK_SWAPPER set, or when handling any task that
          holds the XPRT_LOCKED lock on an xprt used for swap.
          This removes the need for the RPC_IS_SWAPPER() test
          in ->buf_alloc handlers.
       3/ xprt_prepare_transmit() sets PF_MEMALLOC after locking
          any task to a swapper xprt.  __rpc_execute() will clear it.
       3/ PF_MEMALLOC is set for all the connect workers.
      
      Reviewed-by: Chuck Lever <chuck.lever@oracle.com> (for xprtrdma parts)
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      8db55a03
  7. 26 2月, 2022 2 次提交
  8. 10 1月, 2022 2 次提交
  9. 22 10月, 2021 1 次提交
  10. 21 10月, 2021 2 次提交
    • C
      SUNRPC: Trace calls to .rpc_call_done · b40887e1
      Chuck Lever 提交于
      Introduce a single tracepoint that can replace simple dprintk call
      sites in upper layer "rpc_call_done" callbacks. Example:
      
         kworker/u24:2-1254  [001]   771.026677: rpc_stats_latency:    task:00000001@00000002 xid=0x16a6f3c0 rpcbindv2 GETPORT backlog=446 rtt=101 execute=555
         kworker/u24:2-1254  [001]   771.026677: rpc_task_call_done:   task:00000001@00000002 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpcb_getport_done
         kworker/u24:2-1254  [001]   771.026678: rpcb_setport:         task:00000001@00000002 status=0 port=20048
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      b40887e1
    • T
      NFS: Fix up commit deadlocks · 133a48ab
      Trond Myklebust 提交于
      If O_DIRECT bumps the commit_info rpcs_out field, then that could lead
      to fsync() hangs. The fix is to ensure that O_DIRECT calls
      nfs_commit_end().
      
      Fixes: 723c921e ("sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API")
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      133a48ab
  11. 10 10月, 2021 2 次提交
    • T
      NFS: Fix deadlocks in nfs_scan_commit_list() · 64a93dbf
      Trond Myklebust 提交于
      Partially revert commit 2ce209c4 ("NFS: Wait for requests that are
      locked on the commit list"), since it can lead to deadlocks between
      commit requests and nfs_join_page_group().
      For now we should assume that any locked requests on the commit list are
      either about to be removed and committed by another task, or the writes
      they describe are about to be retransmitted. In either case, we should
      not need to worry.
      
      Fixes: 2ce209c4 ("NFS: Wait for requests that are locked on the commit list")
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      64a93dbf
    • C
      NFS: Instrument i_size_write() · 110cb2d2
      Chuck Lever 提交于
      Generate a trace event whenever the NFS client modifies the size of
      a file. These new events aid troubleshooting workloads that trigger
      races around size updates.
      
      There are four new trace points, all named nfs_size_something so
      they are easy to grep for or enable as a group with a single glob.
      
      Size updated on the server:
      
        kworker/u24:10-194   [010]   369.939174: nfs_size_update:      fileid=00:28:2 fhandle=0x36fbbe51 version=1752899344277980615 cursize=250471 newsize=172083
      
      Server-side size update reported via NFSv3 WCC attributes:
      
                   fsx-1387  [006]   380.760686: nfs_size_wcc:         fileid=00:28:2 fhandle=0x36fbbe51 version=1752899355909932456 cursize=146792 newsize=171216
      
      File has been truncated locally:
      
                   fsx-1387  [007]   369.437421: nfs_size_truncate:    fileid=00:28:2 fhandle=0x36fbbe51 version=1752899231200117272 cursize=215244 newsize=0
      
      File has been extended locally:
      
                   fsx-1387  [007]   369.439213: nfs_size_grow:        fileid=00:28:2 fhandle=0x36fbbe51 version=1752899343704248410 cursize=258048 newsize=262144
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      110cb2d2
  12. 04 10月, 2021 1 次提交
  13. 09 7月, 2021 1 次提交
  14. 13 4月, 2021 3 次提交
  15. 09 3月, 2021 1 次提交
  16. 17 2月, 2021 1 次提交
  17. 09 2月, 2021 1 次提交
  18. 03 6月, 2020 1 次提交
    • N
      mm/writeback: discard NR_UNSTABLE_NFS, use NR_WRITEBACK instead · 8d92890b
      NeilBrown 提交于
      After an NFS page has been written it is considered "unstable" until a
      COMMIT request succeeds.  If the COMMIT fails, the page will be
      re-written.
      
      These "unstable" pages are currently accounted as "reclaimable", either
      in WB_RECLAIMABLE, or in NR_UNSTABLE_NFS which is included in a
      'reclaimable' count.  This might have made sense when sending the COMMIT
      required a separate action by the VFS/MM (e.g.  releasepage() used to
      send a COMMIT).  However now that all writes generated by ->writepages()
      will automatically be followed by a COMMIT (since commit 919e3bd9
      ("NFS: Ensure we commit after writeback is complete")) it makes more
      sense to treat them as writeback pages.
      
      So this patch removes NR_UNSTABLE_NFS and accounts unstable pages in
      NR_WRITEBACK and WB_WRITEBACK.
      
      A particular effect of this change is that when
      wb_check_background_flush() calls wb_over_bg_threshold(), the latter
      will report 'true' a lot less often as the 'unstable' pages are no
      longer considered 'dirty' (as there is nothing that writeback can do
      about them anyway).
      
      Currently wb_check_background_flush() will trigger writeback to NFS even
      when there are relatively few dirty pages (if there are lots of unstable
      pages), this can result in small writes going to the server (10s of
      Kilobytes rather than a Megabyte) which hurts throughput.  With this
      patch, there are fewer writes which are each larger on average.
      
      Where the NR_UNSTABLE_NFS count was included in statistics
      virtual-files, the entry is retained, but the value is hard-coded as
      zero.  static trace points and warning printks which mentioned this
      counter no longer report it.
      
      [akpm@linux-foundation.org: re-layout comment]
      [akpm@linux-foundation.org: fix printk warning]
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      Acked-by: Michal Hocko <mhocko@suse.com>	[mm]
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Chuck Lever <chuck.lever@oracle.com>
      Link: http://lkml.kernel.org/r/87d06j7gqa.fsf@notabene.neil.brown.nameSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d92890b
  19. 13 5月, 2020 1 次提交
  20. 02 4月, 2020 4 次提交
  21. 01 4月, 2020 1 次提交
  22. 28 3月, 2020 1 次提交
  23. 26 3月, 2020 1 次提交
  24. 16 3月, 2020 1 次提交
  25. 15 1月, 2020 2 次提交