From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Nicholas Mc Guire <der.herr@hofr.at>
Cc: williams@redhat.com, linux-rt-users@vger.kernel.org,
C.Emde@osadl.org, tglx@linutronix.de, andi@opentech.at
Subject: Re: [rt-tests][PATCH] align thread wakeup times
Date: Fri, 4 Oct 2013 15:22:07 +0200 [thread overview]
Message-ID: <20131004132207.GF19953@linutronix.de> (raw)
In-Reply-To: <20130909072948.GA1967@opentech.at>
* Nicholas Mc Guire | 2013-09-09 09:29:48 [+0200]:
>Hi !
Hi Nicholas,
> This patch provides and additional -A/--align flag to cyclictest to align
> thread wakeup times of all threads as closly defined as possible.
>
> When running multiple threads in cyclictest (-S or -t # option) the threads
> are launched in an unsynchronized manner. Basically the creation order and
> time for thread creation determines the start time. For provoking a maximum
> congestion situation (e.g. cache evictions) and to improve reproducibility
> or run conditions the start time should be defined distances appart. The
> well defined distance is implemented as a offset parameter to -A/--align
> and will offset each threads start time by the parameter * the sequentially
> assigned thread number (par->tnum), together with the -d0 (distance in the
> intervals of the individual threads) this alignment option allows to get
> the thread wakeup times as closely synchronized as possible.
>
> The method to sync is simply that the thread with par->tnum == 0 is chosen
> to set a globally shared timestamp, and all other threads use this timestamp
> as their starting time rather than each calling clock_gettime() at startup.
> To ensure synchronization of the thread startup the setting of the global
> time is guarded by pthread_barriers.
I would rather fix current behaviour instead introducing yet another
option. By using -d0 I assume that all threads wakeup at the same time.
According to your patch this does not happen due to the thread creating
/ starting overhead.
Is there is a reason to keep this "faulty" behavior? If not I would vote
to make this what you suggest the default.
Sebastian
next prev parent reply other threads:[~2013-10-04 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 7:29 [rt-tests][PATCH] align thread wakeup times Nicholas Mc Guire
2013-10-04 13:22 ` Sebastian Andrzej Siewior [this message]
2013-10-04 13:33 ` Nicholas Mc Guire
2013-10-04 15:01 ` Sebastian Andrzej Siewior
2013-10-04 16:21 ` Nicholas Mc Guire
2013-10-04 16:35 ` Sebastian Andrzej Siewior
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=20131004132207.GF19953@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=C.Emde@osadl.org \
--cc=andi@opentech.at \
--cc=der.herr@hofr.at \
--cc=linux-rt-users@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.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 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.