Skip to contentSkip to conversation

memcpy performance on Xenomai

Xenomai-help Daniel Schnell 5 participants 9 messages May 15, 2007 – May 16, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

I am testing the memcpy() performance of Xenomai on my board in comparision to the memcpy() performance of native linux and I get significant differences.

Attached find a program which compiles on native linux simply with (-lrt).
It gives me the following output:

=======
bash-2.05b# ./memcpy_perf
Test (10000) memcpy of sizes (1024) ....
10000 memcpy. Time per memcpy: 1567 [nsec] (653 MB/sec)
finished.
Test (10000) memcpy of sizes (2048) ....
10000 memcpy. Time per memcpy: 2939 [nsec] (696 MB/sec)
finished.
Test (10000) memcpy of sizes (4096) ....
10000 memcpy. Time per memcpy: 5706 [nsec] (717 MB/sec)
finished.
Test (10000) memcpy of sizes (8192) ....
10000 memcpy. Time per memcpy: 17077 [nsec] (479 MB/sec)
finished.
Test (10000) memcpy of sizes (16384) ....
10000 memcpy. Time per memcpy: 133314 [nsec] (122 MB/sec)
finished.
Test (1000) memcpy of sizes (32768) ....
1000 memcpy. Time per memcpy: 243417 [nsec] (134 MB/sec)
finished.
Test (1000) memcpy of sizes (51200) ....
1000 memcpy. Time per memcpy: 403455 [nsec] (126 MB/sec)
finished.
Test (1000) memcpy of sizes (102400) ....
1000 memcpy. Time per memcpy: 713316 [nsec] (143 MB/sec)
finished.
Test (100) memcpy of sizes (1048576) ....
100 memcpy. Time per memcpy: 7210570 [nsec] (145 MB/sec)
finished.
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 78162400 [nsec] (134 MB/sec)
finished.
Test (5) memcpy of sizes (52428800) ....
5 memcpy. Time per memcpy: 425281800 [nsec] (123 MB/sec)
finished.

======

Spawning the function testMemcpy() as a POSIX thread inside another program
yields the following results:

bash-2.05b# bin/testspecs
Test (10000) memcpy of sizes (1024) ....
10000 memcpy. Time per memcpy: 1566 [nsec] (653 MB/sec)
finished.
Test (10000) memcpy of sizes (2048) ....
10000 memcpy. Time per memcpy: 2943 [nsec] (695 MB/sec)
finished.
Test (10000) memcpy of sizes (4096) ....
10000 memcpy. Time per memcpy: 5696 [nsec] (719 MB/sec)
finished.
Test (10000) memcpy of sizes (8192) ....
10000 memcpy. Time per memcpy: 17325 [nsec] (472 MB/sec)
finished.
Test (10000) memcpy of sizes (16384) ....
10000 memcpy. Time per memcpy: 200892 [nsec] (81 MB/sec)
finished.
Test (1000) memcpy of sizes (32768) ....
1000 memcpy. Time per memcpy: 400213 [nsec] (81 MB/sec)
finished.
Test (1000) memcpy of sizes (51200) ....
1000 memcpy. Time per memcpy: 555240 [nsec] (92 MB/sec)
finished.
Test (1000) memcpy of sizes (102400) ....
1000 memcpy. Time per memcpy: 1253123 [nsec] (81 MB/sec)
finished.
Test (100) memcpy of sizes (1048576) ....
100 memcpy. Time per memcpy: 12413170 [nsec] (84 MB/sec)
finished.
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 124039572 [nsec] (84 MB/sec)
finished.
Test (5) memcpy of sizes (52428800) ....
5 memcpy. Time per memcpy: 596899212 [nsec] (87 MB/sec)
finished.

As long as the memcpy works on the cache line only, the results are identical. As soon as the real DDR memory is used, performance drops by 66% !

I am assuming because of different linked-in time functions (clock_gettime())) I am measuring somehow differently. But I am clueless at the moment where and if the performance is eaten up.

Please can anybody try to reproduce this behaviour on its board ?

Best regards,

Daniel Schnell.

#1 lore raw
Quoted 88 lines · Daniel Schnell

Hi,

I am testing the memcpy() performance of Xenomai on my board in comparision to the memcpy() performance of native linux and I get significant differences.

Attached find a program which compiles on native linux simply with (-lrt).
It gives me the following output:

=======
bash-2.05b# ./memcpy_perf
Test (10000) memcpy of sizes (1024) ....
10000 memcpy. Time per memcpy: 1567 [nsec] (653 MB/sec)
finished.
Test (10000) memcpy of sizes (2048) ....
10000 memcpy. Time per memcpy: 2939 [nsec] (696 MB/sec)
finished.
Test (10000) memcpy of sizes (4096) ....
10000 memcpy. Time per memcpy: 5706 [nsec] (717 MB/sec)
finished.
Test (10000) memcpy of sizes (8192) ....
10000 memcpy. Time per memcpy: 17077 [nsec] (479 MB/sec)
finished.
Test (10000) memcpy of sizes (16384) ....
10000 memcpy. Time per memcpy: 133314 [nsec] (122 MB/sec)
finished.
Test (1000) memcpy of sizes (32768) ....
1000 memcpy. Time per memcpy: 243417 [nsec] (134 MB/sec)
finished.
Test (1000) memcpy of sizes (51200) ....
1000 memcpy. Time per memcpy: 403455 [nsec] (126 MB/sec)
finished.
Test (1000) memcpy of sizes (102400) ....
1000 memcpy. Time per memcpy: 713316 [nsec] (143 MB/sec)
finished.
Test (100) memcpy of sizes (1048576) ....
100 memcpy. Time per memcpy: 7210570 [nsec] (145 MB/sec)
finished.
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 78162400 [nsec] (134 MB/sec)
finished.
Test (5) memcpy of sizes (52428800) ....
5 memcpy. Time per memcpy: 425281800 [nsec] (123 MB/sec)
finished.

======

Spawning the function testMemcpy() as a POSIX thread inside another program
yields the following results:

bash-2.05b# bin/testspecs
Test (10000) memcpy of sizes (1024) ....
10000 memcpy. Time per memcpy: 1566 [nsec] (653 MB/sec)
finished.
Test (10000) memcpy of sizes (2048) ....
10000 memcpy. Time per memcpy: 2943 [nsec] (695 MB/sec)
finished.
Test (10000) memcpy of sizes (4096) ....
10000 memcpy. Time per memcpy: 5696 [nsec] (719 MB/sec)
finished.
Test (10000) memcpy of sizes (8192) ....
10000 memcpy. Time per memcpy: 17325 [nsec] (472 MB/sec)
finished.
Test (10000) memcpy of sizes (16384) ....
10000 memcpy. Time per memcpy: 200892 [nsec] (81 MB/sec)
finished.
Test (1000) memcpy of sizes (32768) ....
1000 memcpy. Time per memcpy: 400213 [nsec] (81 MB/sec)
finished.
Test (1000) memcpy of sizes (51200) ....
1000 memcpy. Time per memcpy: 555240 [nsec] (92 MB/sec)
finished.
Test (1000) memcpy of sizes (102400) ....
1000 memcpy. Time per memcpy: 1253123 [nsec] (81 MB/sec)
finished.
Test (100) memcpy of sizes (1048576) ....
100 memcpy. Time per memcpy: 12413170 [nsec] (84 MB/sec)
finished.
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 124039572 [nsec] (84 MB/sec)
finished.
Test (5) memcpy of sizes (52428800) ....
5 memcpy. Time per memcpy: 596899212 [nsec] (87 MB/sec)
finished.

Quoted 7 lines

As long as the memcpy works on the cache line only, the results are identical. As soon as the real DDR memory is used, performance drops by 66% !

I am assuming because of different linked-in time functions (clock_gettime())) I am measuring somehow differently. But I am clueless at the moment where and if the performance is eaten up.

Improving clock_gettime overhead by reading directly the tsc is my very next task. If you want to check if the effect you measure is the result of clock_gettime overhead, you can measure the duration of memcpy with the native api service rt_timer_tsc, and convert the tsc difference with rt_timer_tsc2ns.

Signature · 1 line
                                                 Gilles Chanteperdrix
#2 lore raw

This was not the culprit. Same results.

Does Xenomai replace the memcpy() call with an own implementation ? (I don't think so.)

What about trashing of cash lines through context switches ? But then if we run it on Linux alone we should also have trashed cache lines. There should not be any difference.
Is maybe the presence of a Xenomai POSIX thread cause a lot of ctx switches, even if only a memcpy is executed inside the thread ? Shouldn't Xenomai threads run totally uninterrupted if they have the highest prio ?

Please could somebody actually run this test on his hardware and see if these differences between Xenomai POSIX skin and Linux native are happening there as well ?

Best regards,

Daniel Schnell

-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]
Sent: 15. maí 2007 12:16
To: Daniel Schnell
Cc: [email protected]
Subject: Re: [Xenomai-help] memcpy performance on Xenomai

Improving clock_gettime overhead by reading directly the tsc is my very next task. If you want to check if the effect you measure is the result of clock_gettime overhead, you can measure the duration of memcpy with the native api service rt_timer_tsc, and convert the tsc difference with rt_timer_tsc2ns.

Signature · 1 line
                                                 Gilles Chanteperdrix
#3 lore raw
Quoted 11 lines · Daniel Schnell
Quoted 9 lines

-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]
Sent: 15. maí 2007 12:16
To: Daniel Schnell
Cc: [email protected]
Subject: Re: [Xenomai-help] memcpy performance on Xenomai

Improving clock_gettime overhead by reading directly the tsc is my very next task. If you want to check if the effect you measure is the result of clock_gettime overhead, you can measure the duration of memcpy with the native api service rt_timer_tsc, and convert the tsc difference with rt_timer_tsc2ns.

This was not the culprit. Same results.

Does your processor have a tsc ? If yes, do you compile Xenomai with --enable-x86-tsc ? What happens if you disable the interruptions ?

Quoted 7 lines

Does Xenomai replace the memcpy() call with an own implementation ? (I don't think so.)

What about trashing of cash lines through context switches ? But then if we run it on Linux alone we should also have trashed cache lines. There should not be any difference.
Is maybe the presence of a Xenomai POSIX thread cause a lot of ctx switches, even if only a memcpy is executed inside the thread ? Shouldn't Xenomai threads run totally uninterrupted if they have the highest prio ?

Please could somebody actually run this test on his hardware and see if these differences between Xenomai POSIX skin and Linux native are happening there as well ?

If you want us to test the code, please send it, I mean the one adapted to the native skin.

Signature · 1 line
                                                 Gilles Chanteperdrix
#4 lore raw

Hi,

Some interesting insights about my last tests.

1.) The culprit is mlockall(MCL_FUTURE|MCL_CURRENT);

As soon I leave this away, I get much better results:

Without mlockall():
Test (10) memcpy of sizes (10485760)
10 memcpy. Time per memcpy: 78147209 [nsec] (134 MB/sec)
finished.

With mlockall():
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 124194618 [nsec] (84 MB/sec)
finished.

Then again I cannot use Xenomai without mlockall() :(

2.) rt_timer_tsc
If I use clock_gettime() this needs 3100 ns,
If I use rt_timer_tsc() this needs 74 (!) ns.

Oooh, we are using clock_gettime() a lot, so this makes a big difference for us.

Best regards,

Signature · 2 lines
Daniel Schnell                   | [email protected]
Hugbúnaðargerð                   | www.marel.com

-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]
Sent: 15. maí 2007 14:51
To: Daniel Schnell
Cc: [email protected]
Subject: Re: [Xenomai-help] memcpy performance on Xenomai

Quoted 11 lines · Daniel Schnell
Quoted 9 lines

-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]]
Sent: 15. maí 2007 12:16
To: Daniel Schnell
Cc: [email protected]
Subject: Re: [Xenomai-help] memcpy performance on Xenomai

Improving clock_gettime overhead by reading directly the tsc is my very next task. If you want to check if the effect you measure is the result of clock_gettime overhead, you can measure the duration of memcpy with the native api service rt_timer_tsc, and convert the tsc difference with rt_timer_tsc2ns.

This was not the culprit. Same results.

Does your processor have a tsc ? If yes, do you compile Xenomai with --enable-x86-tsc ? What happens if you disable the interruptions ?

Quoted 8 lines

Does Xenomai replace the memcpy() call with an own implementation ? (I don't think so.)

What about trashing of cash lines through context switches ? But then if we run it on Linux alone we should also have trashed cache lines. There should not be any difference.
Is maybe the presence of a Xenomai POSIX thread cause a lot of ctx switches, even if only a memcpy is executed inside the thread ? Shouldn't Xenomai threads run totally uninterrupted if they have the highest prio ?

Please could somebody actually run this test on his hardware and see if these differences between Xenomai POSIX skin and Linux native are happening there as well ?

If you want us to test the code, please send it, I mean the one adapted to the native skin.

Signature · 1 line
                                                 Gilles Chanteperdrix
#5 lore raw
Quoted 6 lines · Daniel Schnell

2.) rt_timer_tsc
If I use clock_gettime() this needs 3100 ns,
If I use rt_timer_tsc() this needs 74 (!) ns.

Oooh, we are using clock_gettime() a lot, so this makes a big difference for us.

Again, this issue should be adressed real soon.

Signature · 1 line
                                                 Gilles Chanteperdrix
#6 lore raw
In reply to Daniel Schnell

2007/5/15, Daniel Schnell <[email protected]>:

Quoted 13 lines

Hi,

Some interesting insights about my last tests.

1.) The culprit is mlockall(MCL_FUTURE|MCL_CURRENT);

As soon I leave this away, I get much better results:

Without mlockall():
Test (10) memcpy of sizes (10485760)
10 memcpy. Time per memcpy: 78147209 [nsec] (134 MB/sec)
finished.

Quoted 4 lines

With mlockall():
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 124194618 [nsec] (84 MB/sec)
finished.

I think you are not measuring the same thing in both case. I did some test on 2.6.20 (precompiled debian etch kernel) on a 1.6 GHz Pentium M.

I think the fact that you malloced your buffer and then immediatly memcpy the buffers does a non repeatable measure (at least on my side)
depending on something I do not understand .

Could you try my modified version of your code which adds:

memset(buf1,'\0',msgsize);
memset(buf2,'\0',msgsize);

just after malloc (you may try calloc too).

With this modification
I get similar figure for the mlockall version on my (quasi)-vanilla kernel.

that is:

./memcpy_perf_mlockall
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 35716568 [nsec] (293 MB/sec) finished.

./memcpy_perf_memset
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 36004454 [nsec] (291 MB/sec) finished.

./memcpy_perf
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 23881352 [nsec] (439 MB/sec) finished.

I think that without mlockall or no memset the memory pages you requested with malloc and did not --really-- get are brought to physical memory only when memcpy comes.

What puzzles me is WHY it is faster WITHOUT touching the page BEFORE memcpy???

Any memory handling expert is welcomed to answer.

Quoted 2 lines

Then again I cannot use Xenomai without mlockall() :(

And you cannot design a realtime application without ensuring you really have the memory you requested, this is not a xenomai issue (my opinion though).

PS: on line compilation used:

gcc memcpy_perf-erk.c -o memcpy_perf -lrt
gcc -DMLOCK memcpy_perf-erk.c -o memcpy_perf_mlockall -lrt gcc -DMEMSET memcpy_perf-erk.c -o memcpy_perf_memset -lrt

Signature · 1 line
Erk

#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <pthread.h>
#include <string.h>
#include <sys/mman.h>

int osa_now_timespec(struct timespec* t)

{
	return clock_gettime (CLOCK_REALTIME, t);
}

int osa_timediff(const struct timespec* t1, const struct timespec* t2, struct timespec* diff)

{
	if (t1!=NULL && t2!=NULL && diff!=NULL)
	{
		unsigned long long a_nsec, b_nsec, diff_nsec; 

		// calculate difference time
		a_nsec = t1->tv_sec*1000000000ULL + t1->tv_nsec;
		b_nsec = t2->tv_sec*1000000000ULL + t2->tv_nsec;
		diff_nsec = b_nsec - a_nsec;
		diff->tv_sec =  diff_nsec/1000000000ULL;
		diff->tv_nsec = diff_nsec%1000000000ULL;
		return 0;
	}
	return -1;
}

unsigned long long osa_to_ns(const struct timespec* t)

{
	 return (t->tv_sec*1000000000ULL + t->tv_nsec);
}

int testMemcpy(unsigned long num, size_t msgsize)

{
	printf("Test (%ld) memcpy of sizes (%ld) ....\n",
            num, msgsize);
    unsigned long i;
    unsigned long long nstime;
    struct timespec t1, t2, t3;

    char *buf1=malloc (msgsize);
    char *buf2=malloc (msgsize);
#ifdef MEMSET
    memset(buf1,'\0',msgsize);
    memset(buf2,'\0',msgsize);
#endif
    // measure
	osa_now_timespec(&t1);
    for (i=0; i<num; i++)
        {
        memcpy (buf1, buf2, msgsize);
        }
    // measure
	osa_now_timespec(&t2);
	osa_timediff(&t1, &t2, &t3);
    
    free (buf2);
    free (buf1);
    
    nstime = osa_to_ns(&t3)/(unsigned long long) i;
	printf("%ld memcpy. Time per memcpy: %llu [nsec] (%llu MB/sec)\n",
            i, nstime,
            (1000ULL * (unsigned long long) msgsize)/(nstime)) ;
    fflush (stdout);


	printf(" finished.\n");
    fflush (stdout);
}

int main()
{

#ifdef MLOCK
    mlockall(MCL_FUTURE|MCL_CURRENT);
#endif
    testMemcpy(10000,      1*1024);
    testMemcpy(10000,      2*1024);
    testMemcpy(10000,      4*1024);
    testMemcpy(10000,      8*1024);
    testMemcpy(10000,     16*1024);
    testMemcpy(1000 ,     32*1024);
    testMemcpy(1000 ,     50*1024);
    testMemcpy(1000 ,    100*1024);
    testMemcpy( 100 ,   1024*1024);
    testMemcpy(  10 ,10*1024*1024);
    testMemcpy(   5 ,50*1024*1024);

    return 0;
}
#7 lore raw

Hi!

I am not an memory expert.
However, I think that a zero-only page is handled specially by the MMU
(it actually does not use physical memory).
This is the reason why a malloc for a huge amount of memory is typically successful even if there is not that much physical memory available.
With malloc and a memset to zero only this will typically not lead to a physical RAM usage (I thinks this is the "copy-on-write" (COW) stuff)
Thus, I recommend to do a memset with a non-zero value after allocating the memory.

memset(buf1,123,msgsize);
memset(buf2,123,msgsize);

This should lead to a fair comparison.

Regards

Mathias

Quoted 77 lines
Quoted 11 lines

Some interesting insights about my last tests.

1.) The culprit is mlockall(MCL_FUTURE|MCL_CURRENT);

As soon I leave this away, I get much better results:

Without mlockall():
Test (10) memcpy of sizes (10485760)
10 memcpy. Time per memcpy: 78147209 [nsec] (134 MB/sec)
finished.

Quoted 4 lines

With mlockall():
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 124194618 [nsec] (84 MB/sec)
finished.

I think you are not measuring the same thing in both case. I did some test on 2.6.20 (precompiled debian etch kernel) on a 1.6 GHz Pentium M.

I think the fact that you malloced your buffer and then immediatly memcpy the buffers does a non repeatable measure (at least on my side)
depending on something I do not understand .

Could you try my modified version of your code which adds:

memset(buf1,'\0',msgsize);
memset(buf2,'\0',msgsize);

just after malloc (you may try calloc too).

With this modification
I get similar figure for the mlockall version on my (quasi)-vanilla kernel.

that is:

./memcpy_perf_mlockall
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 35716568 [nsec] (293 MB/sec)
finished.

./memcpy_perf_memset
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 36004454 [nsec] (291 MB/sec)
finished.

./memcpy_perf
Test (10) memcpy of sizes (10485760) ....
10 memcpy. Time per memcpy: 23881352 [nsec] (439 MB/sec)
finished.

I think that without mlockall or no memset the memory pages you requested with malloc and did not --really-- get are brought to physical memory only when memcpy comes.

What puzzles me is WHY it is faster WITHOUT touching the page BEFORE memcpy???

Any memory handling expert is welcomed to answer.

Quoted 2 lines

Then again I cannot use Xenomai without mlockall() :(

And you cannot design a realtime application without ensuring you really have the memory you requested, this is not a xenomai issue (my opinion though).

PS: on line compilation used:

gcc memcpy_perf-erk.c -o memcpy_perf -lrt
gcc -DMLOCK memcpy_perf-erk.c -o memcpy_perf_mlockall -lrt gcc -DMEMSET memcpy_perf-erk.c -o memcpy_perf_memset -lrt

Signature · 9 lines
Mathias Koehrer
[email protected]


Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig
und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer,
nur  39,85 €  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2
#8 lore raw
In reply to Daniel Schnell
Quoted 3 lines · Daniel Schnell

This was not the culprit. Same results.

Does Xenomai replace the memcpy() call with an own implementation ? (I don't think so.)

No.

Quoted 2 lines

What about trashing of cash lines through context switches ?

Interrupts also participate in cache trashing.

Quoted 1 line

But then if we run it on Linux alone we should also have trashed cache lines. There should not be any difference.

It depends. You are running 2.4.25/ppc kernel IIRC, which means that your system endures much fewer preemptions on a vanilla kernel (100 hz timer, no kernel preemption). Depending on the Xenomai timer freq, and the number of RT thread switches in your app, your cache may be under permanent pressure.

Quoted 3 lines

Is maybe the presence of a Xenomai POSIX thread cause a lot of ctx switches, even if only a memcpy is executed inside the thread ? Shouldn't Xenomai threads
run totally uninterrupted if they have the highest prio ?

I don't get what you mean actually. If your thread needs no switching, then Xenomai does no switches, period. However, if your RT thread is continuously moving from primary to secondary mode and back for instance, then switches would occur at a high rate;
see /proc/xenomai/stats to check this.

2.4/ppc kernels could possibly cause secondary mode switches to Xenomai threads, due to on-demand mapping and COW management issues when copying data, especially to/from large buffers. So, memcpy in primary mode -> page_fault -> mode_transition -> internal context_switch -> back to memcpy in secondary mode for the same thread.

High prio threads can also be preempted by interrupts.

Quoted 3 lines

Please could somebody actually run this test on his hardware and see if these differences between Xenomai POSIX skin and Linux native are happening there as well ?

FWIW, you have all the needed tools to check this yourself.

First, sampling /proc/xenomai/stats would tell you the average number of ctx switches, and the number of mode transitions, on a per-thread basis.
Then, you could move to a 2.6.x kernel for the purpose of testing and without having to change anything else runtime-wise, this would enable the latency tracer facility (Kernel hacking -> I-pipe debugging). A simple log showing how/by whom a given user-space memcpy has been preempted would definitely shed some light on this issue.

Quoted 16 lines

Best regards,

Daniel Schnell

-----Original Message-----
From: Gilles Chanteperdrix [mailto:[email protected]]
Sent: 15. maí 2007 12:16
To: Daniel Schnell
Cc: [email protected]
Subject: Re: [Xenomai-help] memcpy performance on Xenomai

Improving clock_gettime overhead by reading directly the tsc is my very next task. If you want to check if the effect you measure is the result of clock_gettime overhead, you can measure the duration of memcpy with the native api service rt_timer_tsc, and convert the tsc difference with rt_timer_tsc2ns.

Signature · 1 line
Philippe.