[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1263358823.3874.10.camel@entropy>
Date: Tue, 12 Jan 2010 21:00:23 -0800
From: Nicholas Miell <nmiell@...cast.net>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Cc: linux-kernel@...r.kernel.org,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Steven Rostedt <rostedt@...dmis.org>,
Oleg Nesterov <oleg@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>, akpm@...ux-foundation.org,
josh@...htriplett.org, tglx@...utronix.de, Valdis.Kletnieks@...edu,
dhowells@...hat.com, laijs@...fujitsu.com, dipankar@...ibm.com
Subject: Re: [RFC PATCH] introduce sys_membarrier(): process-wide memory
barrier (v5)
On Tue, 2010-01-12 at 20:37 -0500, Mathieu Desnoyers wrote:
> + * sys_membarrier - issue memory barrier on current process running threads
> + * @expedited: (0) Lowest overhead. Few milliseconds latency.
> + * (1) Few microseconds latency.
> + *
Alternate ABI proposal, keeping the possibility of future expansion in
mind:
/*
Mandatory flags to the membarrier system call that the kernel must
understand are in the high 16 bits.
*/
#define MEMBARRIER_MANDATORY_MASK 0xFFFF0000
/*
Optional hints that the kernel can ignore are in the low 16 bits.
*/
#define MEMBARRIER_OPTIONAL_MASK 0x0000FFFF
#define MEMBARRIER_EXPEDITED 1
extern int membarrier(unsigned int flags);
And then add to the system call itself:
if ((flags & MEMBARRIER_MANDATORY_MASK) != 0)
return -EINVAL;
--
Nicholas Miell <nmiell@...cast.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists