public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] ksm: mempolicy syscalls not implemented
       [not found] <f4ad73abd0251782d607e88f90a4a1a26001d9ea.1302595961.git.czhang@redhat.com>
@ 2011-04-12  8:13 ` Caspar Zhang
  2011-04-15 15:32   ` Caspar Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Caspar Zhang @ 2011-04-12  8:13 UTC (permalink / raw)
  To: LTP List

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]


since NUMA is only supported on a few i386 systems, mempolicy syscalls
([gs]et_mempolicy, mbind) may not implemented, thus, an ENOSYS errno
should be acceptable.

Signed-off-by: Caspar Zhang <czhang@redhat.com>
---
 testcases/kernel/mem/ksm/ksm02.c |    9 +++++++--
 testcases/kernel/mem/ksm/ksm04.c |    9 +++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-ksm-mempolicy-syscalls-not-implemented.patch --]
[-- Type: text/x-patch; name="0003-ksm-mempolicy-syscalls-not-implemented.patch", Size: 1416 bytes --]

diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c
index 33ed887..3ae4c08 100644
--- a/testcases/kernel/mem/ksm/ksm02.c
+++ b/testcases/kernel/mem/ksm/ksm02.c
@@ -102,8 +102,13 @@ int main(int argc, char *argv[])
 		Tst_count = 0;
 		check_ksm_options(&size, &num, &unit);
 
-		if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy");
+		if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) {
+			if (errno != ENOSYS)
+				tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy");
+			else
+				tst_resm(TCONF, cleanup,
+					"set_mempolicy syscall is not implemented on your system.");
+		}
 		create_same_memory(size, num, unit);
 
 		write_cpusets();
diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c
index 8bb791e..5121111 100644
--- a/testcases/kernel/mem/ksm/ksm04.c
+++ b/testcases/kernel/mem/ksm/ksm04.c
@@ -104,8 +104,13 @@ int main(int argc, char *argv[])
 
 		write_memcg();
 
-		if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1)
-			tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy");
+		if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) {
+			if (errno != ENOSYS)
+				tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy");
+			else
+				tst_resm(TCONF, cleanup,
+					"set_mempolicy syscall is not implemented on your system.");
+		}
 		create_same_memory(size, num, unit);
 
 		write_cpusets();

[-- Attachment #3: Type: text/plain, Size: 434 bytes --]

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] ksm: mempolicy syscalls not implemented
  2011-04-12  8:13 ` [LTP] [PATCH] ksm: mempolicy syscalls not implemented Caspar Zhang
@ 2011-04-15 15:32   ` Caspar Zhang
  2011-04-19 16:27     ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Caspar Zhang @ 2011-04-15 15:32 UTC (permalink / raw)
  To: LTP List

On 04/12/2011 04:13 PM, Caspar Zhang wrote:
> 
> since NUMA is only supported on a few i386 systems, mempolicy syscalls
> ([gs]et_mempolicy, mbind) may not implemented, thus, an ENOSYS errno
> should be acceptable.
> 
> Signed-off-by: Caspar Zhang <czhang@redhat.com>
> ---
>  testcases/kernel/mem/ksm/ksm02.c |    9 +++++++--
>  testcases/kernel/mem/ksm/ksm04.c |    9 +++++++--
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 

Hi, anyone can review this patch and get it merged if suitable?

Thanks,
Caspar

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH] ksm: mempolicy syscalls not implemented
  2011-04-15 15:32   ` Caspar Zhang
@ 2011-04-19 16:27     ` Cyril Hrubis
  0 siblings, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2011-04-19 16:27 UTC (permalink / raw)
  To: Caspar Zhang; +Cc: LTP List

Hi!
Commited.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-19 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <f4ad73abd0251782d607e88f90a4a1a26001d9ea.1302595961.git.czhang@redhat.com>
2011-04-12  8:13 ` [LTP] [PATCH] ksm: mempolicy syscalls not implemented Caspar Zhang
2011-04-15 15:32   ` Caspar Zhang
2011-04-19 16:27     ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox