From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] ltp/numa: add new test11
Date: Thu, 18 May 2017 15:46:55 +0200 [thread overview]
Message-ID: <20170518134655.GD29477@rei.lan> (raw)
In-Reply-To: <1488526490-22120-1-git-send-email-liwang@redhat.com>
Hi!
> @@ -52,16 +52,43 @@ static void help(void)
> printf("Input: Describe input arguments to this program\n");
> printf(" argv[1] == 1 then allocate 1MB of memory\n");
> printf(" argv[1] == 2 then allocate 1MB of share memory\n");
> - printf(" argv[1] == 3 then pause the program to catch sigint\n");
> + printf(" argv[1] == 3 then allocate 1HUGE PAGE SIZE of memory\n");
> + printf(" argv[1] == 4 then pause the program to catch sigint\n");
> printf("Exit: On failure - Exits with non-zero value\n");
> printf(" On success - exits with 0 exit value\n");
Can we, pretty please, change this parameter to a string that describes
the operation?
Something as:
argv[1] == "alloc_1MB"
argv[1] == "alloc_1MB_shared"
argv[1] == "alloc_huge_page"
argv[1] == "pause"
So that we can use the helper as:
numactl --cpunodebind=$node --membind=$node support_numa alloc_1MB &
The helper would then do the classical if else:
if (!strcmp(argv[1], "alloc_1MB")) {
...
} else if (!strcmp(argv[1], "alloc_1MB_shared")) {
...
} else {
help();
}
Otherwise it looks fine.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2017-05-18 13:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 7:34 [LTP] [PATCH 1/2] ltp/numa: add new test11 Li Wang
2017-03-03 7:34 ` [LTP] [PATCH 2/2] ltp/numa: Kill the support_numa if FAILED Li Wang
2017-04-18 2:36 ` [LTP] [PATCH 1/2] ltp/numa: add new test11 Li Wang
2017-05-18 13:46 ` Cyril Hrubis [this message]
2017-05-19 7:08 ` Li Wang
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=20170518134655.GD29477@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.