linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Pipe busy wait
@ 2018-08-30 20:24 subhra mazumdar
  2018-08-30 20:24 ` [RFC PATCH 1/2] pipe: introduce busy wait for pipe subhra mazumdar
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: subhra mazumdar @ 2018-08-30 20:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, dhaval.giani, steven.sistare, subhra.mazumdar

This patch introduces busy waiting for pipes similar to network sockets.
When pipe is full or empty a thread busy waits for some microseconds before
sleeping. This avoids the sleep and wakeup overhead and improves
performance in case wakeup happens very fast. It uses new fields in
pipe_inode_info to decide how much to spin and if data has been written or
read during spin. As different workloads on different systems can have
different optimum spin time, it is configurable via a tunable that can be
set via /proc. The default value is 0 which indicates no spin.

Following are the hackbench process run times using pipe for different
sized systems with baseline and suitable spin time.

Hackbench on 2 socket, 36 core and 72 threads Intel x86 machine
(lower is better):
groups  baseline     patch(spin=10us)
1       0.603        0.614 (-1.82%)
2       0.673        0.527 (21.7%)
4       0.765        0.638 (16.6%)
8       1.935        1.114 (42.43%)
16      7.314        2.007 (72.56%)
32      6.215        3.585 (42.32%)

Hackbench on 1 socket, 16 core and 32 threads Intel x86 VM
(lower is better):
groups  baseline     patch(spin=10us)
1       1.314        0.747 (43.15%)
2       1.454        0.754 (48.14%)
4       3.409        1.343 (60.6%)
8       6.879        2.559 (62.8%)
16      9.82         4.951 (49.58%)

Hackbench on 1 socket, 4 core and 8 threads Intel x86 VM
(lower is better):
groups  baseline     patch(spin=5us)
1       2.827        1.455 (48.53%)
2       6.201        2.805 (54.77%)
4       9.514        5.008 (47.36%)
8       14.571       8.422 (42.2%)

Hackbench on 1 socket, 1 core and 2 threads Intel x86 VM
(lower is better):
groups  baseline     patch(spin=5us)
1       3.365        2.948 (12.39%)
2       6.82         6.535 (4.18%)
4       13.18        13.025 (1.18%)

subhra mazumdar (2):
  pipe: introduce busy wait for pipe
  pipe: use pipe busy wait

 fs/pipe.c                 | 58 +++++++++++++++++++++++++++++++++++++++++++++--
 include/linux/pipe_fs_i.h | 20 ++++++++++++++++
 kernel/sysctl.c           |  7 ++++++
 3 files changed, 83 insertions(+), 2 deletions(-)

-- 
2.9.3


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

end of thread, other threads:[~2018-09-18  1:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-30 20:24 [RFC PATCH 0/2] Pipe busy wait subhra mazumdar
2018-08-30 20:24 ` [RFC PATCH 1/2] pipe: introduce busy wait for pipe subhra mazumdar
2018-08-31 16:09   ` Steven Sistare
2018-09-05  0:50     ` Subhra Mazumdar
2018-09-05 13:45       ` Steven Sistare
2018-08-30 20:24 ` [RFC PATCH 2/2] pipe: use pipe busy wait subhra mazumdar
2018-09-04 21:54   ` Thomas Gleixner
2018-09-05  0:20     ` Subhra Mazumdar
2018-09-07 12:25   ` Peter Zijlstra
2018-09-17 21:05     ` Subhra Mazumdar
2018-09-17 22:43       ` Peter Zijlstra
2018-09-18  1:07         ` Subhra Mazumdar
2018-08-30 20:48 ` [RFC PATCH 0/2] Pipe " Subhra Mazumdar

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).