# HG changeset patch # User Florian Pose # Date 1224511462 0 # Node ID 9e9393cfc4f728f213ba25f36c6fcbe15341a56e # Parent dc1327c2ef5b56fd4bc6e46992f0ec5838be558e Added userspace timing. diff -r dc1327c2ef5b -r 9e9393cfc4f7 documentation/ethercat_doc.tex --- a/documentation/ethercat_doc.tex Fri Oct 17 13:37:29 2008 +0000 +++ b/documentation/ethercat_doc.tex Mon Oct 20 14:04:22 2008 +0000 @@ -2103,6 +2103,63 @@ \ldots +\subsection{Timing} +\label{sec:usertiming} + +An interesting aspect is the timing of the userspace library calls compared to +those of the kernel API. Table~\ref{tab:usertiming} shows the call times and +standard deviancies of typical (and time-critical) API functions measured on +an Intel Pentium 4 M CPU with \unit{2.2}{\giga\hertz} and a standard 2.6.26 +kernel. + +\begin{table}[htbp] + \centering + \caption{Application Interface Timing Comparison} + \label{tab:usertiming} + \vspace{2mm} + \begin{tabular}{l|c|c|c|c} + + & + \multicolumn{2}{|c}{\textbf{Kernelspace}} & + \multicolumn{2}{|c}{\textbf{Userspace}} \\ + + \textbf{Function} & + $\mu(t)$ & + $\sigma(t)$ & + $\mu(t)$ & + $\sigma(t)$ \\ + \hline + + \lstinline+ecrt_master_receive()+ & + \unit{1.1}{\micro\second} & + \unit{0.3}{\micro\second} & + \unit{2.2}{\micro\second} & + \unit{0.5}{\micro\second} \\ + + \lstinline+ecrt_domain_process()+ & + \unit{<0.1}{\micro\second} & + \unit{<0.1}{\micro\second} & + \unit{1.0}{\micro\second} & + \unit{0.2}{\micro\second} \\ + + \lstinline+ecrt_domain_queue()+ & + \unit{<0.1}{\micro\second} & + \unit{<0.1}{\micro\second} & + \unit{1.0}{\micro\second} & + \unit{0.1}{\micro\second} \\ + + \lstinline+ecrt_master_send()+ & + \unit{1.8}{\micro\second} & + \unit{0.2}{\micro\second} & + \unit{2.5}{\micro\second} & + \unit{0.5}{\micro\second} \\ + + \end{tabular} +\end{table} + +The test results show, that for this configuration, the userspace API adds +about \unit{1}{\micro\second} delay for each function. + %------------------------------------------------------------------------------ \section{System Integration}