[stgt] [PATCH 1/2] add signalfd support

Or Gerlitz ogerlitz at Voltaire.com
Tue Sep 15 13:31:15 CEST 2009


FUJITA Tomonori wrote:
> We use threads and pipe for event notification (I/O completion); I/O
> threads signal the main thread when I/Os are complete. signalfd is
> faster than it (signalfd is supported as of 2.6.22).

Hi Tomo,

The code doesn't get built on RHEL5.1, see below. Looking on the patch, I didn't see an easy and not too much ugly (i.e fill the code with ifdefs) way to make it work in both schemes, since some of the code which comes with the patch uses signals wheres before that pipe was used... anyway, maybe you'll have an idea how / what would be the minimal abstraction here that will allow the code to function whether signalfd is supported or not

Or.

> cc -c -DISCSI -D_GNU_SOURCE -I. -g -O2 -Wall -Wstrict-prototypes -fPIC -DTGT_VERSION=\"0.9.8-git-d2717a6\" bs.c -o bs.o
> bs.c:34:28: error: linux/signalfd.h: No such file or directory
> bs.c: In function ‘bs_sig_request_done’:
> bs.c:159: error: array type has incomplete element type
> bs.c:159: warning: unused variable ‘siginfo’
> bs.c:247:34: error: macro "__signalfd" passed 3 arguments, but takes just 0
> bs.c: In function ‘bs_init’:
> bs.c:247: error: ‘__signalfd’ undeclared (first use in this function)
> bs.c:247: error: (Each undeclared identifier is reported only once
> bs.c:247: error: for each function it appears in.)
--
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