All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: [RFC][PATCH] nfsd regression since delayed fput()
Date: Wed, 16 Oct 2013 19:52:09 +0100	[thread overview]
Message-ID: <20131016185209.GO13318@ZenIV.linux.org.uk> (raw)

Background: nfsd v[23] had throughput regression since delayed fput
went in; every read or write ends up doing fput() and we get a pair
of extra context switches out of that (plus quite a bit of work
in queue_work itselfi, apparently).  Use of schedule_delayed_work()
gives it a chance to accumulate a bit before we do __fput() on all
of them.  I'm not too happy about that solution, but... on at least
one real-world setup it reverts about 10% throughput loss we got from
switch to delayed fput.

If anybody has better ideas, I'll gladly take those instead - this
approach feels kludgy ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
--- 
diff --git a/fs/file_table.c b/fs/file_table.c
index abdd15a..0ca5fa4 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -317,7 +317,7 @@ void fput(struct file *file)
 		}
 
 		if (llist_add(&file->f_u.fu_llist, &delayed_fput_list))
-			schedule_work(&delayed_fput_work);
+			schedule_delayed_work(&delayed_fput_work, 1);
 	}
 }
 

             reply	other threads:[~2013-10-16 18:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 18:52 Al Viro [this message]
2013-10-17  4:48 ` [RFC][PATCH] nfsd regression since delayed fput() Linus Torvalds
2013-10-17 18:14   ` J. Bruce Fields
2013-10-17 18:29     ` Linus Torvalds
2013-10-17 18:39       ` Al Viro
2013-10-17 19:09         ` Linus Torvalds
2013-10-17 20:12           ` Al Viro
2013-10-17 22:33             ` Linus Torvalds
2013-10-25 14:18               ` Al Viro

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=20131016185209.GO13318@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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.