linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rseq vcpu_id ideas
@ 2022-01-27  1:22 Mathieu Desnoyers
  2022-01-28 16:57 ` Peter Oskolkov
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Desnoyers @ 2022-01-27  1:22 UTC (permalink / raw)
  To: Paul Turner
  Cc: Peter Zijlstra, Michael Jeanson, paulmck, Boqun Feng, linux-kernel

Hi Paul,

I remember our LPC discussions about your virtual cpu ids ideas, and noticed some tcmalloc code
with "prototype" fields for vcpu_id and numa node id
(https://github.com/google/tcmalloc/blob/master/tcmalloc/internal/linux_syscall_support.h#L34).

I'm currently toying with ideas very close to vcpu_ids to solve issues with overzealous
memory allocation for LTTng-UST (user-space tracer) in use-cases where containers use few
cores.

My current thinking is that we could use your vcpu_id idea, but apply it on a per-pid-namespace
basis rather than per-process. We may have to be clever with NUMA as well to ensure good NUMA
locality.

Do you have any thought about this, and perhaps some prototype rseq extension code you could
share as a starting point ?

Thanks,

Mathieu

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: rseq vcpu_id ideas
  2022-01-27  1:22 rseq vcpu_id ideas Mathieu Desnoyers
@ 2022-01-28 16:57 ` Peter Oskolkov
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Oskolkov @ 2022-01-28 16:57 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Paul Turner, Peter Zijlstra, Michael Jeanson, paulmck,
	Boqun Feng, linux-kernel, Chris Kennelly

On Wed, Jan 26, 2022 at 5:22 PM Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
>
> Hi Paul,
>
> I remember our LPC discussions about your virtual cpu ids ideas, and noticed some tcmalloc code
> with "prototype" fields for vcpu_id and numa node id
> (https://github.com/google/tcmalloc/blob/master/tcmalloc/internal/linux_syscall_support.h#L34).
>
> I'm currently toying with ideas very close to vcpu_ids to solve issues with overzealous
> memory allocation for LTTng-UST (user-space tracer) in use-cases where containers use few
> cores.
>
> My current thinking is that we could use your vcpu_id idea, but apply it on a per-pid-namespace
> basis rather than per-process. We may have to be clever with NUMA as well to ensure good NUMA
> locality.
>
> Do you have any thought about this, and perhaps some prototype rseq extension code you could
> share as a starting point ?

We've been using rseq vcpu extensions in production for more than a
year, with good results. We have a perfect use case, though: wide
machines (hundreds of CPUs) with many narrow processes (restricted to
a small number of CPUs). Our extension can be configured to either do
a "flat" vcpu accounting, or a "per numa node" vcpu accounting. We
currently only use "flat" accounting, I guess because most of our
processes are affined to a single numa node.

I plan to post the code to the list after the UMCG saga comes to a
clear resolution.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-28 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27  1:22 rseq vcpu_id ideas Mathieu Desnoyers
2022-01-28 16:57 ` Peter Oskolkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).