Re: [RFC PATCH] introduce sys_membarrier(): process-wide memorybarrier (v5)

From: Mathieu Desnoyers
Date: Wed Jan 13 2010 - 18:42:51 EST


* Nicholas Miell (nmiell@xxxxxxxxxxx) wrote:
> On Wed, 2010-01-13 at 11:42 -0800, David Daney wrote:
> > Mathieu Desnoyers wrote:
> > > * Nicholas Miell (nmiell@xxxxxxxxxxx) wrote:
> > >> On Wed, 2010-01-13 at 13:24 -0500, Mathieu Desnoyers wrote:
> > >>> * Nicholas Miell (nmiell@xxxxxxxxxxx) wrote:
> > >>>
> > >>>> The whole point of compat and incompat flags is that it allows new
> > >>>> applications to run on old kernels and either work or fail as
> > >>>> appropriate, depending on whether the new features they're using must be
> > >>>> implemented or can be silently ignored.
> > >>> I see. Thanks for the explanation. Then the expedited flag should
> > >>> clearly be part of the mandatory flags.
> > >>>
> > >>> Can you point me to other system calls that are doing this ?
> > >>>
> > >>> Thanks,
> > >>>
> > >>> Mathieu
> > >> Not off the top of my head, but I did steal the idea from the ext2/3/4
> > >> disk format.
> > >
> > > Sounds a bit over-engineered to me for system calls, but who knows if we
> > > eventually have to extend sys_membarrier(). This involves that, right
> > > now, I'd have to add a header to include/linux to define these flags.
> > > Also, "int expedited" is a bit clearer, but less flexible, than "int
> > > flags". Anyone else have comments about this ?
> > >
> >
> > It doesn't bother me that you have to do extra work to add the flag
> > definitions to a header file. :-)
> >

Work is not a problem. I just wanted to make sure I would not be going
in circles. :)

> > As I understand it, the proposal is to have the option to extend the ABI
> > based on as yet undefined flag bits. This doesn't seem like a bad thing.
> >
> > The runtime overhead of testing a single bit vs. non-zero in the
> > parameter shouldn't be an issue.
> >
>
> The recent introduction of accept4(), signalfd4(), eventfd2(),
> epoll_create1(), dup3(), pipe2(), and inotify_init1() suggest that this
> is the kind of thing you want to plan for, because you're probably going
> to end up doing it anyway.

Yes, that's a very convincing argument. OK, I'll cook something for v6.

Thanks a lot,

Mathieu

>
> --
> Nicholas Miell <nmiell@xxxxxxxxxxx>
>

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/