public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [RFC] [PATCH] pselect01: Tune thresholds
Date: Fri, 12 May 2017 03:33:09 -0400 (EDT)	[thread overview]
Message-ID: <1049610106.10797216.1494574389728.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170512071719.GB24762@rei.lan>


----- Original Message -----
> Hi!
> > > >   requested_us = tst_timespec_to_us(t->tv) * t->iterations;
> > > > 
> > > > If slack_per_run is slack of all iterations, why is it multiplied
> > > > again with number of iterations?
> > > 
> > > That variable is poorly named. It should have been slack_per_call or
> > > slack_per_iteration. It's slack per one syscall computed using the same
> > > formula that is used in kernel...
> > 
> > If it's per iteration, shouldn't this function be passed time per
> > iteration?
> > At the moment, it's time of all iterations:
> >   requested_us = tst_timespec_to_us(t->tv) * t->iterations;
> >   threshold = compute_threshold(requested_us, t->iterations);
> > 
> > Should it be ... ?
> >   threshold = compute_threshold(tst_timespec_to_us(t->tv), t->iterations);
> 
> Good catch, I will fix that, retest and send v2.

OK, if we agree, it's supposed to be time of single iteration,
isn't new function (in some cases) more strict than it used to be?

Before we had:
  threshold = requested_us / 100 + 200 * t->iterations;
which was 1% slack plus small number (200) that scales with iterations.

Now we have 0.1% slack plus small number (40) that scales
with iterations plus big number (20000) that scales inverse
to number number of iterations.

Say for 1000 us and 1000 iterations we used to have slack
10000 + 200*1000 =~ 210000. And now it's
(40 + 1) * 1000 + 20000 / (1000/200+1) = 41000 + 3333 =~ 44333

Regards,
Jan

  reply	other threads:[~2017-05-12  7:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 13:18 [LTP] [RFC] [PATCH] pselect01: Tune thresholds Cyril Hrubis
2017-05-11 12:29 ` Cyril Hrubis
2017-05-11 15:54 ` Jan Stancek
2017-05-12  6:51   ` Cyril Hrubis
2017-05-12  7:11     ` Jan Stancek
2017-05-12  7:17       ` Cyril Hrubis
2017-05-12  7:33         ` Jan Stancek [this message]
2017-05-12 10:04           ` Helge Deller
2017-05-12 13:17             ` Cyril Hrubis
2017-05-12 13:59               ` Cyril Hrubis
2017-05-12 15:38           ` Cyril Hrubis

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=1049610106.10797216.1494574389728.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /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