[lttng-dev] [RFC PATCH 1/1] check if set_schedaffinity works in configure.ac

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Jul 11 11:55:34 EDT 2014


----- Original Message -----
> From: "Nathan Lynch" <Nathan_Lynch at mentor.com>
> To: "Pranith Kumar" <bobby.prani at gmail.com>
> Cc: "mathieu desnoyers" <mathieu.desnoyers at efficios.com>, lttng-dev at lists.lttng.org
> Sent: Monday, June 9, 2014 2:59:56 PM
> Subject: Re: [lttng-dev] [RFC PATCH 1/1] check if set_schedaffinity works in configure.ac
> 
> On 06/08/2014 03:31 PM, Pranith Kumar wrote:
> > +    AS_IF([test "x$sched_set_affinity_args" = "x3"], [
> > +        # test if sched_setaffinity works
> > +        AC_MSG_CHECKING([if sched_setaffinity works])
> > +        AC_RUN_IFELSE([AC_LANG_SOURCE([[
> > +                #include <sched.h>
> > +                int main()
> > +                {
> > +                    cpu_set_t foo;
> > +                    return sched_setaffinity(0, sizeof (foo), &foo);
> 
> This passes uninitialized stack memory to the system call; the return
> value is unpredictable.
> 
> If it turns out that such a test is necessary, it should probably call
> sched_getaffinity first and pass the result to sched_setaffinity.
> 

It looks like a respin of the patch taking care
of Nathan's comments is needed here. It might be
a good thing to open a bug report against Userspace
RCU on http://bugs.lttng.org to keep track of this
issue.

Thanks!

Mathieu


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list