Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1240121 > unrolled thread

Re: [PATCH 0/3] sys_membarrier (x86, generic)

Started byRusty Russell <rusty@ozlabs.org>
First post2015-10-06 04:10 +0200
Last post2015-10-09 02:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 0/3] sys_membarrier (x86, generic) Rusty Russell <rusty@ozlabs.org> - 2015-10-06 04:10 +0200
    Re: [PATCH 0/3] sys_membarrier (x86, generic) Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-10-06 04:20 +0200
      Re: [PATCH 0/3] sys_membarrier (x86, generic) Rusty Russell <rusty@ozlabs.org> - 2015-10-09 02:50 +0200

#1240121 — Re: [PATCH 0/3] sys_membarrier (x86, generic)

FromRusty Russell <rusty@ozlabs.org>
Date2015-10-06 04:10 +0200
SubjectRe: [PATCH 0/3] sys_membarrier (x86, generic)
Message-ID<qgpRw-vR-3@gated-at.bofh.it>
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> writes:
> Hi Andrew,
>
> Here is a repost of sys_membarrier, rebased on top of Linus commit
> c4b5fd3fb2058b650447372472ad24e2a989f9f6 without any change since the
> last v19 post other that proceeding to further testing. When merging
> with other system calls, system call number conflicts should be quite
> straightforward to handle, there is nothing special there.

Hi Mathieu,

        Great to see this go in!  One small note: it talks about
threads, but membarrier as currently implemented would cover any shared
memory.  If you plan to optimize in future, that might not be the case:
we'd want an address argument for those cases?

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1240123

FromMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date2015-10-06 04:20 +0200
Message-ID<qgq1b-Nd-1@gated-at.bofh.it>
In reply to#1240121
----- On Oct 5, 2015, at 7:21 PM, Rusty Russell rusty@ozlabs.org wrote:

> Mathieu Desnoyers <mathieu.desnoyers@efficios.com> writes:
>> Hi Andrew,
>>
>> Here is a repost of sys_membarrier, rebased on top of Linus commit
>> c4b5fd3fb2058b650447372472ad24e2a989f9f6 without any change since the
>> last v19 post other that proceeding to further testing. When merging
>> with other system calls, system call number conflicts should be quite
>> straightforward to handle, there is nothing special there.
> 
> Hi Mathieu,
> 
>        Great to see this go in!  One small note: it talks about
> threads, but membarrier as currently implemented would cover any shared
> memory.  If you plan to optimize in future, that might not be the case:
> we'd want an address argument for those cases?

Hi Rusty,

Indeed, the current membarrier implementation only supports
the MEMBARRIER_CMD_SHARED flag, which works even with shared
memory across processes. If we ever want to optimize that for
single-process, multi-threaded cases, we would have to add
a new flag (e.g. MEMBARRIER_CMD_PRIVATE). This is quite
similar to what already exists in the futex system call.

I'm not sure I fully understand where the address argument
you are describing would be useful. So far, I see two
main use-cases: we either interact with memory that is
local to a single process, or with memory shared across
processes.

We could indeed think about sending a membarrier to all
processes using a specific shared memory area (hence the
possible need for an address argument). This could eventually
be supported by adding a specific flag for this (e.g.
MEMBARRIER_CMD_SHM), which would indicate that an extra
parameter is provided (an address).

Thoughts ?

Thanks for the feedback!

Mathieu

> 
> Cheers,
> Rusty.

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1242951

FromRusty Russell <rusty@ozlabs.org>
Date2015-10-09 02:50 +0200
Message-ID<qhu2M-31O-51@gated-at.bofh.it>
In reply to#1240123
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> writes:
> ----- On Oct 5, 2015, at 7:21 PM, Rusty Russell rusty@ozlabs.org wrote:
>
>> Mathieu Desnoyers <mathieu.desnoyers@efficios.com> writes:
>>> Hi Andrew,
>>>
>>> Here is a repost of sys_membarrier, rebased on top of Linus commit
>>> c4b5fd3fb2058b650447372472ad24e2a989f9f6 without any change since the
>>> last v19 post other that proceeding to further testing. When merging
>>> with other system calls, system call number conflicts should be quite
>>> straightforward to handle, there is nothing special there.
>> 
>> Hi Mathieu,
>> 
>>        Great to see this go in!  One small note: it talks about
>> threads, but membarrier as currently implemented would cover any shared
>> memory.  If you plan to optimize in future, that might not be the case:
>> we'd want an address argument for those cases?
>
> Hi Rusty,
>
> Indeed, the current membarrier implementation only supports
> the MEMBARRIER_CMD_SHARED flag, which works even with shared
> memory across processes. If we ever want to optimize that for
> single-process, multi-threaded cases, we would have to add
> a new flag (e.g. MEMBARRIER_CMD_PRIVATE). This is quite
> similar to what already exists in the futex system call.
>
> I'm not sure I fully understand where the address argument
> you are describing would be useful. So far, I see two
> main use-cases: we either interact with memory that is
> local to a single process, or with memory shared across
> processes.
>
> We could indeed think about sending a membarrier to all
> processes using a specific shared memory area (hence the
> possible need for an address argument). This could eventually
> be supported by adding a specific flag for this (e.g.
> MEMBARRIER_CMD_SHM), which would indicate that an extra
> parameter is provided (an address).

That's exactly what I was thinking; eg. it can be optimized in the case
where nothing else with the memory mapped is running.

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web