v5.19-rc8-rt9
Subsystems (4)
Dear RT folks!
I'm pleased to announce the v5.19-rc8-rt9 patch set.
Changes since v5.19-rc8-rt8:
- Redo the dcache patch based on feedback from upstream.
- Add a comment to the scheduler code based on feedback from upstream.
- Printing a pointer usually leads to warning on PREEMPT_RT. Reported by Mike Galbraith.
Known issues
- Valentin Schneider reported a few splats on ARM64, see
https://lkml.kernel.org/r/[email protected]
The delta patch against v5.19-rc8-rt8 is appended below and can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.19/incr/patch-5.19-rc8-rt8-rt9.patch.xz
You can get this release via the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.19-rc8-rt9
The RT patch against v5.19-rc8 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patch-5.19-rc8-rt9.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.19/older/patches-5.19-rc8-rt9.tar.xz
Sebastian
fs/dcache.c +10 -12
@@ -2239,6 +2239,7 @@ struct dentry *d_add_ci(struct dentry *dentry, struct inode *inode, } } res =d_splice_alias (inode, found); +d_lookup_done (found);if (res) {dput (found);return res;
@@ -2580,11 +2581,13 @@ static inline unsigned start_dir_add(struct inode *dir) } } -static inline void end_dir_add (struct inode *dir,unsigned n) +static inline void end_dir_add (struct inode *dir,unsigned int n, +wait_queue_head_t *d_wait) {smp_store_release (&dir->i_dir_seq, n +2 );if (IS_ENABLED (CONFIG_PREEMPT_RT ))preempt_enable (); +wake_up_all (d_wait); }static void d_wait_lookup (struct dentry *dentry)
@@ -2735,13 +2738,13 @@ static wait_queue_head_t *__d_lookup_unhash(struct dentry *dentry)return d_wait; } -void __d_lookup_done (struct dentry *dentry) +void __d_lookup_unhash_wake (struct dentry *dentry) {spin_lock (&dentry->d_lock);wake_up_all (__d_lookup_unhash (dentry));spin_unlock (&dentry->d_lock); } -EXPORT_SYMBOL (__d_lookup_done); +EXPORT_SYMBOL (__d_lookup_unhash_wake);/* inode->i_lock held if inode is non-NULL */
@@ -2750,7 +2753,6 @@ static inline void __d_add(struct dentry *dentry, struct inode *inode)wait_queue_head_t *d_wait;struct inode *dir =NULL ;unsigned n; -spin_lock (&dentry->d_lock);if (unlikely (d_in_lookup (dentry))) { dir = dentry->d_parent->d_inode;
@@ -2766,10 +2768,8 @@ static inline void __d_add(struct dentry *dentry, struct inode *inode)fsnotify_update_flags (dentry); }__d_rehash (dentry); -if (dir) { -end_dir_add (dir, n); -wake_up_all (d_wait); - } +if (dir) +end_dir_add (dir, n, d_wait);spin_unlock (&dentry->d_lock);if (inode)spin_unlock (&inode->i_lock);
@@ -2982,10 +2982,8 @@ static void __d_move(struct dentry *dentry, struct dentry *target,write_seqcount_end (&target->d_seq);write_seqcount_end (&dentry->d_seq); -if (dir) { -end_dir_add (dir, n); -wake_up_all (d_wait); - } +if (dir) +end_dir_add (dir, n, d_wait);if (dentry->d_parent != old_parent)spin_unlock (&dentry->d_parent->d_lock);
include/linux/dcache.h +2 -2
@@ -349,7 +349,7 @@ static inline void dont_mount(struct dentry *dentry)spin_unlock (&dentry->d_lock); } -extern void __d_lookup_done (struct dentry *dentry); +extern void __d_lookup_unhash_wake (struct dentry *dentry);static inline int d_in_lookup (const struct dentry *dentry) {
@@ -359,7 +359,7 @@ static inline int d_in_lookup(const struct dentry *dentry)static inline void d_lookup_done (struct dentry *dentry) {if (unlikely (d_in_lookup (dentry))) -__d_lookup_done (dentry); +__d_lookup_unhash_wake (dentry); }extern void dput (struct dentry *);
kernel/sched/core.c +30 -0
@@ -3300,6 +3300,36 @@ int migrate_swap(struct task_struct *cur, struct task_struct *p,#endif /* CONFIG_NUMA_BALANCING */ #ifdef CONFIG_PREEMPT_RT + +/* +* Consider: +* +* set_special_state(X); +* +* do_things() +* // Somewhere in there is an rtlock that can be contended: +* current_save_and_set_rtlock_wait_state(); +* [...] +* schedule_rtlock(); (A) +* [...] +* current_restore_rtlock_saved_state(); +* +* schedule(); (B) +* +* If p->saved_state is anything else than TASK_RUNNING, then p blocked on an +* rtlock (A) *before* voluntarily calling into schedule() (B) after setting its +* state to X. For things like ptrace (X=TASK_TRACED), the task could have more +* work to do upon acquiring the lock in do_things() before whoever called +* wait_task_inactive() should return. IOW, we have to wait for: +* +* p.saved_state = TASK_RUNNING +* p.__state = X +* +* which implies the task isn't blocked on an RT lock and got to schedule() (B). +* +* Also see comments in ttwu_state_match(). +*/ + static __always_inline bool state_mismatch(struct task_struct *p, unsigned int match_state) {unsigned long flags;
lib/vsprintf.c +24 -21
61 lines not on this page · raw message
localversion-rt +1 -1
@@ -1 +1 @@ --rt8 +-rt9