All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC] [PATCH] pselect01: Tune thresholds
Date: Fri, 12 May 2017 08:51:31 +0200	[thread overview]
Message-ID: <20170512065131.GA24762@rei.lan> (raw)
In-Reply-To: <2075581666.10581422.1494518085371.JavaMail.zimbra@redhat.com>

Hi!
> > +static int compute_threshold(long long requested_us, unsigned int
> > iterations)
> > +{
> > +	unsigned int slack_per_run = MIN(100000, requested_us / 1000);
> > +
> > +	return (40 + slack_per_run) * iterations + 20000 / (iterations/200 + 1);
> > +}
> 
>   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...

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-05-12  6:51 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 [this message]
2017-05-12  7:11     ` Jan Stancek
2017-05-12  7:17       ` Cyril Hrubis
2017-05-12  7:33         ` Jan Stancek
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=20170512065131.GA24762@rei.lan \
    --to=chrubis@suse.cz \
    --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 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.