[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc4f324f-3c14-6cc1-deb2-5ca2022db804@oracle.com>
Date: Thu, 30 Aug 2018 13:48:33 -0700
From: Subhra Mazumdar <subhra.mazumdar@...cle.com>
To: linux-kernel@...r.kernel.org
Cc: peterz@...radead.org, dhaval.giani@...cle.com,
steven.sistare@...cle.com
Subject: Re: [RFC PATCH 0/2] Pipe busy wait
On 08/30/2018 01:24 PM, subhra mazumdar wrote:
> 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.
Hi,
Looking for comments on how useful you think this is. Network sockets does
similar. Some workloads other than hackbench didn't show any improvement.
Also for some it may regress. I initially tried to find the optimum spin
time for all workloads and systems but realized that is extremely
challenging. Given all these it is best to have a tunable and can be set if
beneficial. Also looking for more workloads suggestions that can benefit.
Thanks,
Subhra
>
> 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(-)
>
Powered by blists - more mailing lists