linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH] nfsd regression since delayed fput()
@ 2013-10-16 18:52 Al Viro
  2013-10-17  4:48 ` Linus Torvalds
  0 siblings, 1 reply; 9+ messages in thread
From: Al Viro @ 2013-10-16 18:52 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-fsdevel

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);
 	}
 }
 

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-10-25 14:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 18:52 [RFC][PATCH] nfsd regression since delayed fput() Al Viro
2013-10-17  4:48 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).