Linux-rt-users archive on lore.kernel.org
 help / color / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Clark Williams <williams@redhat.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] pi_stress: limit the number of inversion groups to the number of online cores
Date: Tue, 21 Jul 2020 18:29:32 -0400 (EDT)
Message-ID: <alpine.LFD.2.23.451.2007211829040.195349@fionn> (raw)
In-Reply-To: <20200721211022.734344-1-williams@redhat.com>



On Tue, 21 Jul 2020, Clark Williams wrote:

> Each inversion group is three SCHED_FIFO threads, so the chances of more groups
> than online cores actually getting to run is very slim. Limit the number of
> groups requested to be <= the number of online cpus.
> 
> Signed-off-by: Clark Williams <williams@redhat.com>
> ---
>  src/pi_tests/pi_stress.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c
> index 0ed844c636cd..ce446d4ea037 100644
> --- a/src/pi_tests/pi_stress.c
> +++ b/src/pi_tests/pi_stress.c
> @@ -1327,6 +1327,12 @@ void process_command_line(int argc, char **argv)
>  			break;
>  		case 'g':
>  			ngroups = strtol(optarg, NULL, 10);
> +			if (ngroups > num_processors) {
> +				pi_error("the number of groups cannot exceed "
> +					 "the number of online processors (%d)\n",
> +					 num_processors);
> +				exit(-1);
> +			}
>  			pi_info("number of groups set to %d\n", ngroups);
>  			break;
>  		case 'r':
> -- 
> 2.26.2
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 21:10 Clark Williams
2020-07-21 22:29 ` John Kacur [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=alpine.LFD.2.23.451.2007211829040.195349@fionn \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --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

Linux-rt-users archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rt-users/0 linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ https://lore.kernel.org/linux-rt-users \
		linux-rt-users@vger.kernel.org
	public-inbox-index linux-rt-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rt-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git