[stgt] [PATCH] add timerfd work scheduler support

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Fri Jan 21 06:34:50 CET 2011


On Thu, 20 Jan 2011 18:41:54 +0200
Alexander Nezhinsky <alexandern at Voltaire.COM> wrote:

> Added timerfd-backed work scheduler where the kernel supports it.
> Otherwise signal-based timer mechanism is used. 
> Using timerfd leads to less cpu usage compared with the signal-based scheduler.
> 
> This patch needs to be applied on the top of:
> http://lists.wpkg.org/pipermail/stgt/2011-January/004380.html
> 
> Signed-off-by: Alexander Nezhinsky <alexandern at voltaire.com>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
> ---
>  usr/Makefile |    4 ++
>  usr/work.c   |  145 +++++++++++++++++++++++++++++++++++-----------------------
>  usr/work.h   |   33 ++++++++++++-
>  3 files changed, 123 insertions(+), 59 deletions(-)

(snip)

> +	timer_fd[0] = __timerfd_create(WORK_TIMER_INT_USEC);
> +	if (timer_fd[0] > 0)

I think that zero is a valid fd.


> -#include <sys/time.h>
> +#if defined(__NR_timerfd) && defined(USE_TIMERFD)

There is no __NR_timerfd. You need to use __NR_timerfd_create, etc.


I fixed both and applied. Please check if the latest git works for
you.


Thanks,
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list