linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: frank.rowand@am.sony.com
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
	"williams@redhat.com" <williams@redhat.com>,
	"jkacur@redhat.com" <jkacur@redhat.com>
Subject: Re: [PATCH 4/4] rt-tests: cyclictest warn of interaction between '-a', '--smp', and '--numa'
Date: Wed, 02 May 2012 13:41:58 -0700	[thread overview]
Message-ID: <4FA19C16.9040701@linux.intel.com> (raw)
In-Reply-To: <4FA09FD8.2040204@am.sony.com>

On 05/01/2012 07:45 PM, Frank Rowand wrote:
> The '-a' option is always ignored if --smp or --numa is specified.  Fix the
> warning message to not depend on --smp or --numa occuring first.
> 
> Signed-off-by: Frank Rowand <frank.rowand@am.sony.com>

Compiled and tested on qemuarm UP. Behaved as expected with --smp --numa
(not built-in) and -a alone.

Tested-by: Darren Hart <dvhart@linux.intel.com>

> ---
>  src/cyclictest/cyclictest.c |   14 	11 +	3 -	0 !
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> Index: b/src/cyclictest/cyclictest.c
> ===================================================================
> --- a/src/cyclictest/cyclictest.c
> +++ b/src/cyclictest/cyclictest.c
> @@ -949,6 +949,7 @@ static char *policyname(int policy)
>  static void process_options (int argc, char *argv[])
>  {
>  	int error = 0;
> +	int option_affinity = 0;
>  	int max_cpus = sysconf(_SC_NPROCESSORS_CONF);
>  	struct rlimit rlim;
>  
> @@ -1000,10 +1001,9 @@ static void process_options (int argc, c
>  			break;
>  		switch (c) {
>  		case 'a':
> -			if (smp) {
> -				warn("-a ignored due to --smp\n");
> +			option_affinity = 1;
> +			if (smp || numa)
>  				break;
> -			}
>  			if (optarg != NULL) {
>  				affinity = atoi(optarg);
>  				setaffinity = AFFINITY_SPECIFIED;
> @@ -1112,6 +1112,14 @@ static void process_options (int argc, c
>  		}
>  	}
>  
> +	if (option_affinity) {
> +		if (smp) {
> +			warn("-a ignored due to --smp\n");
> +		} else if (numa) {
> +			warn("-a ignored due to --numa\n");
> +		}
> +	}
> +
>  	if (setaffinity == AFFINITY_SPECIFIED) {
>  		if (affinity < 0)
>  			error = 1;
> 

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

  reply	other threads:[~2012-05-02 20:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02  2:35 [PATCH 1/4] rt-tests: printf format compile warning Frank Rowand
2012-05-02  2:44 ` [PATCH 2/4] rt-tests: cyclictest segfault with '-a' Frank Rowand
2012-05-02 20:37   ` Darren Hart
2012-05-02  2:45 ` [PATCH 3/4] rt-tests: cyclictest avoid unneeded warning Frank Rowand
2012-05-02 20:38   ` Darren Hart
2012-05-02  2:45 ` [PATCH 4/4] rt-tests: cyclictest warn of interaction between '-a', '--smp', and '--numa' Frank Rowand
2012-05-02 20:41   ` Darren Hart [this message]
2012-05-02 20:36 ` [PATCH 1/4] rt-tests: printf format compile warning Darren Hart

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=4FA19C16.9040701@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=frank.rowand@am.sony.com \
    --cc=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
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;
as well as URLs for NNTP newsgroup(s).