linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Subhra Mazumdar <subhra.mazumdar@oracle.com>
To: linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, dhaval.giani@oracle.com, steven.sistare@oracle.com
Subject: Re: [RFC PATCH 0/2] Pipe busy wait
Date: Thu, 30 Aug 2018 13:48:33 -0700	[thread overview]
Message-ID: <dc4f324f-3c14-6cc1-deb2-5ca2022db804@oracle.com> (raw)
In-Reply-To: <20180830202458.32579-1-subhra.mazumdar@oracle.com>



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


      parent reply	other threads:[~2018-08-30 20:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Subhra Mazumdar [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=dc4f324f-3c14-6cc1-deb2-5ca2022db804@oracle.com \
    --to=subhra.mazumdar@oracle.com \
    --cc=dhaval.giani@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=steven.sistare@oracle.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 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).