All of lore.kernel.org
 help / color / mirror / Atom feed
From: TJ <tj@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: Trond Myklebust <trondmy@hammerspace.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH] NFS: switch nfsiod to be an UNBOUND workqueue.
Date: Wed, 2 Dec 2020 14:07:37 -0500	[thread overview]
Message-ID: <X8fl+cW4n0wlGkIn@mtj.duckdns.org> (raw)
In-Reply-To: <87pn3zlk8u.fsf@notabene.neil.brown.name>

On Fri, Nov 27, 2020 at 11:24:33AM +1100, NeilBrown wrote:
> 
> nfsiod is currently a concurrency-managed workqueue (CMWQ).
> This means that workitems scheduled to nfsiod on a given CPU are queued
> behind all other work items queued on any CMWQ on the same CPU.  This
> can introduce unexpected latency.
> 
> Occaionally nfsiod can even cause excessive latency.  If the work item
> to complete a CLOSE request calls the final iput() on an inode, the
> address_space of that inode will be dismantled.  This takes time
> proportional to the number of in-memory pages, which on a large host
> working on large files (e.g..  5TB), can be a large number of pages
> resulting in a noticable number of seconds.
> 
> We can avoid these latency problems by switching nfsiod to WQ_UNBOUND.
> This causes each concurrent work item to gets a dedicated thread which
> can be scheduled to an idle CPU.
> 
> There is precedent for this as several other filesystems use WQ_UNBOUND
> workqueue for handling various async events.
> 
> Signed-off-by: NeilBrown <neilb@suse.de>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

      reply	other threads:[~2020-12-02 19:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05  0:12 [PATCH/RFC] Does nfsiod need WQ_CPU_INTENSIVE? NeilBrown
2020-11-05 19:23 ` Trond Myklebust
2020-11-06  0:23   ` NeilBrown
2020-11-27  0:24     ` [PATCH] NFS: switch nfsiod to be an UNBOUND workqueue NeilBrown
2020-12-02 19:07       ` TJ [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X8fl+cW4n0wlGkIn@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=trondmy@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.