All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: perfbook@vger.kernel.org
Subject: Re: [RFC PATCH] advsync: Add litmus tests of control dependency
Date: Wed, 19 Jul 2017 10:44:50 -0700	[thread overview]
Message-ID: <20170719174450.GI3730@linux.vnet.ibm.com> (raw)
In-Reply-To: <491b2704-0d61-aebc-0787-94cd0da74694@gmail.com>

On Mon, Jul 17, 2017 at 11:28:09PM +0900, Akira Yokosawa wrote:
> >From 892d8e1014c5bca1c83fbc35bcc1951c6c497b7f Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Mon, 17 Jul 2017 20:56:19 +0900
> Subject: [RFC PATCH] advsync: Add litmus tests of control dependency
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>

Hello, Akira,

If you make these have the ">" condition, I would be very happy to
apply the resulting patch.

							Thanx, Paul

> ---
> Hi Paul,
> 
> So I converted the 2 examples of control dependency to litmus tests.
> I mentioned the name "C-SB+o-c-o+o-c-o", but it should have been
> "C-LB+o-c-o+o-c-o".
> 
> They correspond to the example after the partial revert to the
> two-CPU example I submitted earlier.
> 
> Do they make sense?
> 
>           Thanks, Akira
> --
>  CodeSamples/advsync/herd/C-LB+o-c-o+o-c-o.litmus   | 27 ++++++++++++++++++
>  .../advsync/herd/C-WWC+o-c-o+o-c-o+o.litmus        | 32 ++++++++++++++++++++++
>  2 files changed, 59 insertions(+)
>  create mode 100644 CodeSamples/advsync/herd/C-LB+o-c-o+o-c-o.litmus
>  create mode 100644 CodeSamples/advsync/herd/C-WWC+o-c-o+o-c-o+o.litmus
> 
> diff --git a/CodeSamples/advsync/herd/C-LB+o-c-o+o-c-o.litmus b/CodeSamples/advsync/herd/C-LB+o-c-o+o-c-o.litmus
> new file mode 100644
> index 0000000..023af2e
> --- /dev/null
> +++ b/CodeSamples/advsync/herd/C-LB+o-c-o+o-c-o.litmus
> @@ -0,0 +1,27 @@
> +C C-LB+o-c-o+o-c-o
> +{
> +}
> +
> +{
> +#include "api.h"
> +}
> +
> +P0(int *x, int *y)
> +{
> +	int r1;
> +
> +	r1 = READ_ONCE(*x);
> +	if (r1 >= 0)
> +		WRITE_ONCE(*y, 1);
> +}
> +
> +P1(int *x, int *y)
> +{
> +	int r2;
> +
> +	r2 = READ_ONCE(*y);
> +	if (r2 >= 0)
> +		WRITE_ONCE(*x, 1);
> +}
> +
> +exists (0:r1=1 /\ 1:r2=1)
> diff --git a/CodeSamples/advsync/herd/C-WWC+o-c-o+o-c-o+o.litmus b/CodeSamples/advsync/herd/C-WWC+o-c-o+o-c-o+o.litmus
> new file mode 100644
> index 0000000..80dc2f6
> --- /dev/null
> +++ b/CodeSamples/advsync/herd/C-WWC+o-c-o+o-c-o+o.litmus
> @@ -0,0 +1,32 @@
> +C C-WWC+o-c-o+o-c-o+o
> +{
> +}
> +
> +{
> +#include "api.h"
> +}
> +
> +P0(int *x, int *y)
> +{
> +	int r1;
> +
> +	r1 = READ_ONCE(*x);
> +	if (r1 >= 0)
> +		WRITE_ONCE(*y, 1);
> +}
> +
> +P1(int *x, int *y)
> +{
> +	int r2;
> +
> +	r2 = READ_ONCE(*y);
> +	if (r2 >= 0)
> +		WRITE_ONCE(*x, 1);
> +}
> +
> +P2(int *x)
> +{
> +	WRITE_ONCE(*x, 2);
> +}
> +
> +exists (0:r1=2 /\ 1:r2=1 /\ x=2)
> -- 
> 2.7.4
> 


  reply	other threads:[~2017-07-19 17:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 14:28 [RFC PATCH] advsync: Add litmus tests of control dependency Akira Yokosawa
2017-07-19 17:44 ` Paul E. McKenney [this message]
2017-07-23  4:16   ` [PATCH v2] " Akira Yokosawa
2017-07-25 19:44     ` Paul E. McKenney

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=20170719174450.GI3730@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akiyks@gmail.com \
    --cc=perfbook@vger.kernel.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.