public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] turn signal_struct.stats_lock into seqcount_rwlock_t
@ 2023-09-13 15:49 Oleg Nesterov
  2023-09-13 15:49 ` [PATCH 1/5] seqlock: simplify SEQCOUNT_LOCKNAME() Oleg Nesterov
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Oleg Nesterov @ 2023-09-13 15:49 UTC (permalink / raw)
  To: Boqun Feng, Ingo Molnar, Peter Zijlstra, Rik van Riel,
	Thomas Gleixner, Waiman Long, Will Deacon
  Cc: Alexey Gladkov, Eric W. Biederman, linux-kernel

Hello,

RFC, not for inclusion yet. Please review, at least the intent.

In particular, can you look at the changelog from the last patch?
Am I right that currently thread_group_cputime() is not RT friendly?


During the (ongoing) s/while_each_thread/for_each_thread/ conversion
I noticed that some of these users can use signal->stats_lock instead
of lock_task_sighand(). And if we change them, we can try to avoid
stats_lock under siglock in wait_task_zombie() at least.

However, signal->stats_lock is seqlock_t but I think seqcount_rwlock_t
make more sense. So let me try to turn it into seqcount_rwlock_t first.

OTOH... I am not sure I understand the value of signal->stats_lock.
I mean, do we have any numbers which prove that seqlock_t is really
"better" than the plain rwlock_t ?

So far only compile tested, and I need to re-read these changes with
a clear head. In any case, it is not that I myself like this series
very much, and most probably I did something wrong...

Oleg.
---
 include/linux/sched/signal.h |   4 +-
 include/linux/seqlock.h      | 105 +++++++++++++++++++++++++++++++++++--------
 kernel/exit.c                |  12 +++--
 kernel/fork.c                |   3 +-
 kernel/sched/cputime.c       |  10 +++--
 5 files changed, 106 insertions(+), 28 deletions(-)


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

end of thread, other threads:[~2023-09-23 12:37 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-13 15:49 [PATCH 0/5] turn signal_struct.stats_lock into seqcount_rwlock_t Oleg Nesterov
2023-09-13 15:49 ` [PATCH 1/5] seqlock: simplify SEQCOUNT_LOCKNAME() Oleg Nesterov
2023-09-15 17:36   ` Alexey Gladkov
2023-09-16  8:51   ` Peter Zijlstra
2023-09-21 11:48     ` Oleg Nesterov
2023-09-21 14:04       ` Peter Zijlstra
2023-09-21 14:31         ` Oleg Nesterov
2023-09-13 15:49 ` [PATCH 2/5] seqlock: change __seqprop() to return the function pointer Oleg Nesterov
2023-09-13 17:37   ` kernel test robot
2023-09-13 18:30     ` Oleg Nesterov
2023-09-13 17:59   ` kernel test robot
2023-09-13 19:23   ` kernel test robot
2023-09-13 15:50 ` [PATCH 3/5] seqlock: introduce seqprop_lock/unlock Oleg Nesterov
2023-09-15 18:25   ` Alexey Gladkov
2023-09-15 18:43     ` Oleg Nesterov
2023-09-13 15:50 ` [PATCH 4/5] seqlock: introduce read_seqcount_begin_or_lock() and friends Oleg Nesterov
2023-09-13 15:50 ` [PATCH 5/5] time,signal: turn signal_struct.stats_lock into seqcount_rwlock_t Oleg Nesterov
2023-09-23 12:37   ` Alexey Gladkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox