public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: Caspar Zhang <caspar@casparzhang.com>
Cc: LTP List <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH/RFE 2/2] mm: use new numa_helper
Date: Tue, 31 Jul 2012 03:38:08 -0400 (EDT)	[thread overview]
Message-ID: <402709823.5725690.1343720288429.JavaMail.root@redhat.com> (raw)
In-Reply-To: <ba9ec47929d3aa8783905c1e9061536e515ca9f6.1343703433.git.caspar@casparzhang.com>

Hi Caspar,

------- snip --------
+	ret = get_allowed_nodes(NH_MEMS|NH_CPUS, 2, &nd1, &nd2);

+	switch (ret) {

+	case 0:

+		tst_resm(TINFO, "get node%lu.", nd2);

+		return nd2;

+	case -3:

+		/*

+		 * for unbalanced NUMA systems, at least 1 available node is

+		 * required.

+		 */

+		ret = get_allowed_nodes(NH_MEMS|NH_CPUS, 1, &nd1);

+		switch (ret) {

+		case 0:

+			tst_resm(TINFO, "get node%lu.", nd1);

+			return nd1;

+		case -3:

+			tst_brkm(TCONF, cleanup_fn, "require a NUMA system "

+				    "that has at least one node with both "

+				    "memory and cpu available.");

+		default:

+			tst_brkm(TBROK|TERRNO, cleanup_fn,

+				    "3rd get_allowed_nodes");

+		}

+	}

+	tst_brkm(TBROK|TERRNO, cleanup_fn, "2nd get_allowed_nodes");
------- snip --------

I'm not sure I follow this snippet.
So if there are 2+ nodes, it takes second one. If there is just one, it will take that one.
Can't it take always first one?

Regards,
Jan


----- Original Message -----
> From: "Caspar Zhang" <caspar@casparzhang.com>
> To: "LTP List" <ltp-list@lists.sourceforge.net>
> Sent: Tuesday, 31 July, 2012 4:57:19 AM
> Subject: [LTP] [PATCH/RFE 2/2] mm: use new numa_helper
> 
> 
> This patch makes the tests in mem/ dir use numa_helper in
> libkerntest.
> 
> Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
> ---
>  testcases/kernel/mem/cpuset/Makefile           |    1 +
>  testcases/kernel/mem/cpuset/cpuset01.c         |   16 +++---
>  testcases/kernel/mem/hugetlb/Makefile.inc      |    1 +
>  testcases/kernel/mem/hugetlb/hugemmap/Makefile |    1 +
>  testcases/kernel/mem/include/mem.h             |    2 +-
>  testcases/kernel/mem/ksm/Makefile              |    1 +
>  testcases/kernel/mem/ksm/ksm02.c               |    9 ++--
>  testcases/kernel/mem/ksm/ksm04.c               |    9 ++--
>  testcases/kernel/mem/lib/Makefile              |    1 +
>  testcases/kernel/mem/lib/mem.c                 |   61
>  +++++++++++++++++------
>  testcases/kernel/mem/oom/Makefile              |    1 +
>  testcases/kernel/mem/oom/oom02.c               |    4 --
>  testcases/kernel/mem/oom/oom04.c               |    4 --
>  testcases/kernel/mem/swapping/Makefile         |    1 +
>  testcases/kernel/mem/thp/Makefile              |    1 +
>  testcases/kernel/mem/tunable/Makefile          |    1 +
>  16 files changed, 71 insertions(+), 43 deletions(-)
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond.
> Discussions
> will include endpoint security, mobile security and the latest in
> malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2012-07-31  7:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31  2:57 [LTP] [PATCH/RFE 1/2] numa_helper: move to libkerntest Caspar Zhang
2012-07-31  2:57 ` [LTP] [PATCH/RFE 2/2] mm: use new numa_helper Caspar Zhang
2012-07-31  4:03   ` Garrett Cooper
2012-07-31  7:38   ` Jan Stancek [this message]
2012-08-01  8:55     ` Caspar Zhang
2012-08-01 10:23       ` Jan Stancek
2012-08-01 11:23         ` Caspar Zhang
2012-08-01 11:25         ` Caspar Zhang

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=402709823.5725690.1343720288429.JavaMail.root@redhat.com \
    --to=jstancek@redhat.com \
    --cc=caspar@casparzhang.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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