From: Thomas Gleixner <tglx@linutronix.de>
To: Marco Elver <elver@google.com>, Dmitry Vyukov <dvyukov@google.com>
Cc: oleg@redhat.com, linux-kernel@vger.kernel.org,
"Eric W . Biederman" <ebiederm@xmission.com>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH v4] posix-timers: Prefer delivery of signals to the current thread
Date: Thu, 26 Jan 2023 20:57:05 +0100 [thread overview]
Message-ID: <87o7qlgjce.ffs@tglx> (raw)
In-Reply-To: <CANpmjNM=PVigDZKu-H_-cLECUJKSx7TH+kxSjfF=4UHdrGBj+g@mail.gmail.com>
On Thu, Jan 26 2023 at 18:51, Marco Elver wrote:
> On Thu, 26 Jan 2023 at 16:41, Dmitry Vyukov <dvyukov@google.com> wrote:
>>
>> Prefer to deliver signals to the current thread if SIGEV_THREAD_ID
>> is not set. We used to prefer the main thread, but delivering
>> to the current thread is both faster, and allows to sample actual thread
>> activity for CLOCK_PROCESS_CPUTIME_ID timers, and does not change
>> the semantics (since we queue into shared_pending, all thread may
>> receive the signal in both cases).
>
> Reviewed-by: Marco Elver <elver@google.com>
>
> Nice - and and given the test, hopefully this behaviour won't regress in future.
The test does not tell much. It just waits until each thread got a
signal once, which can take quite a while. It does not tell about the
distribution of the signals, which can be completely randomly skewed
towards a few threads.
Also for real world use cases where you have multiple threads with
different periods and runtime per period I have a hard time to
understand how that signal measures anything useful.
The most time consuming thread might actually trigger rarely while other
short threads end up being the ones which cause the timer to fire.
What's the usefulness of this information?
Thanks,
tglx
next prev parent reply other threads:[~2023-01-26 19:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 17:18 [RFC PATCH] posix-timers: Support delivery of signals to the current thread Dmitry Vyukov
2023-01-11 15:49 ` Dmitry Vyukov
2023-01-11 21:28 ` Thomas Gleixner
2023-01-12 11:24 ` [RFC PATCH v2] " Dmitry Vyukov
2023-01-25 12:43 ` Oleg Nesterov
2023-01-25 15:17 ` Oleg Nesterov
2023-01-25 15:34 ` Dmitry Vyukov
2023-01-25 16:31 ` Oleg Nesterov
2023-01-25 16:45 ` Oleg Nesterov
2023-01-25 17:07 ` Oleg Nesterov
2023-01-26 10:58 ` Dmitry Vyukov
2023-01-26 10:56 ` Dmitry Vyukov
2023-01-26 10:51 ` [PATCH v3] posix-timers: Prefer " Dmitry Vyukov
2023-01-26 14:46 ` Oleg Nesterov
2023-01-26 15:41 ` [PATCH v4] " Dmitry Vyukov
2023-01-26 17:51 ` Marco Elver
2023-01-26 19:57 ` Thomas Gleixner [this message]
2023-01-27 6:58 ` Dmitry Vyukov
2023-01-28 19:56 ` Oleg Nesterov
2023-01-28 20:15 ` Oleg Nesterov
2023-01-30 9:00 ` Dmitry Vyukov
2023-01-30 16:49 ` Oleg Nesterov
2023-02-02 7:36 ` Dmitry Vyukov
2023-02-20 14:43 ` [PATCH v5] " Dmitry Vyukov
2023-02-22 15:19 ` Oleg Nesterov
2023-03-14 8:25 ` Dmitry Vyukov
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=87o7qlgjce.ffs@tglx \
--to=tglx@linutronix.de \
--cc=dvyukov@google.com \
--cc=ebiederm@xmission.com \
--cc=elver@google.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@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