public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	"André Almeida" <andrealmeid@igalia.com>,
	"Darren Hart" <dvhart@infradead.org>,
	"Davidlohr Bueso" <dave@stgolabs.net>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Juri Lelli" <juri.lelli@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Valentin Schneider" <vschneid@redhat.com>,
	"Waiman Long" <longman@redhat.com>
Subject: Re: [RFC PATCH 2/3] futex: Add basic infrastructure for local task local hash.
Date: Mon, 28 Oct 2024 11:58:18 +0100	[thread overview]
Message-ID: <87y128335h.ffs@tglx> (raw)
In-Reply-To: <20241028103058.tERYBWZu@linutronix.de>

On Mon, Oct 28 2024 at 11:30, Sebastian Andrzej Siewior wrote:
> On 2024-10-27 13:19:54 [+0100], Thomas Gleixner wrote:
>> So T1 and T2 create their local hash and the subsequent usage will fail
>> because they operate on different hashs. You have the same problem
>> vs. your allocation scheme when two threads do prctl(ALLOC). We really
>> want to make this as simple as possible.
>
> So I moved this to struct signal_struct and limited allocation to the
> group leader.
>
> You want automated creation of this? For everyone or with a hint? This
> is 64 bytes per slot due to the cache alignment but event without this
> struct takes 56 bytes on PREEMPT_RT and 24 bytes on non-RT. So the four
> slots are 256 bytes. Assuming 2.5k tasks it takes 625 KiB. Maybe not
> that much.
>
> Let me post v2 the signal_struct and then think about auto ON.

It only affects actual futex users. A lot of executables never use
them. For ease of testing, can you please make this automatic so there
is no need to modify a test case?

Aside of that for RT we really want it automatically enabled and as
Linus suggested back then probably for NUMA too.

Stick a trace point or a debugfs counter into the allocation so you can
observe how many of those are actually allocated and used concurrently.

Thanks,

        tglx




  reply	other threads:[~2024-10-28 10:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26 22:34 [RFC PATCH 0/3] futex: Add support task local hash maps Sebastian Andrzej Siewior
2024-10-26 22:34 ` [RFC PATCH 1/3] futex: Create helper function to initialize a hash slot Sebastian Andrzej Siewior
2024-10-26 22:34 ` [RFC PATCH 2/3] futex: Add basic infrastructure for local task local hash Sebastian Andrzej Siewior
2024-10-27 12:19   ` Thomas Gleixner
2024-10-28 10:30     ` Sebastian Andrzej Siewior
2024-10-28 10:58       ` Thomas Gleixner [this message]
2024-10-28 11:00         ` Peter Zijlstra
2024-10-28 12:02           ` Thomas Gleixner
2024-10-30 21:08             ` Peter Zijlstra
2024-10-30 23:14               ` Thomas Gleixner
2024-10-31  9:13                 ` Peter Zijlstra
2024-10-28 10:16   ` Peter Zijlstra
2024-10-28 10:24     ` Sebastian Andrzej Siewior
2024-10-28 10:46       ` Peter Zijlstra
2024-10-28 13:10         ` Peter Zijlstra
2024-10-26 22:34 ` [RFC PATCH 3/3] futex: Use the task local hashmap Sebastian Andrzej Siewior
2024-10-28 10:22   ` Peter Zijlstra
2024-10-28 10:24     ` Sebastian Andrzej Siewior
2024-10-27 10:01 ` [RFC PATCH 0/3] futex: Add support task local hash maps Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y128335h.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=andrealmeid@igalia.com \
    --cc=bigeasy@linutronix.de \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox