v6.17-rc4-rt3
Subsystems (8)
Sebastian Andrzej Siewior
maintainerDear RT folks!
I'm pleased to announce the v6.17-rc4-rt3 patch set.
Changes since v6.17-rc4-rt2:
- Allow to drop the lock synchronisation local_bh_disable(). It is not effective immediately but with CONFIG_PREEMPT_RT_NEEDS_BH_LOCK=n. This required to backport a netfilter change and make changes to tasklets and workqueue (for BH worker).
- Backport a futex patch from -tip to address a warning during mmdrop().
Known issues
- Yoann Congal reported a bit spinlock in dm_exception_table_lock().
https://lore.kernel.org/all/[email protected]
The delta patch against v6.17-rc4-rt2 is appended below and can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.17/incr/patch-6.17-rc4-rt2-rt3.patch.xz
You can get this release via the git tree at:
https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v6.17-rc4-rt3
The RT patch against v6.17-rc4 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.17/older/patch-6.17-rc4-rt3.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.17/older/patches-6.17-rc4-rt3.tar.xz
Sebastian
kernel/Kconfig.preempt +13 -0
@@ -103,6 +103,19 @@ config PREEMPT_RT Select this if you are building a kernel for systems which require real-time guarantees. +config PREEMPT_RT_NEEDS_BH_LOCK + bool "Enforce softirq synchronisation on PREEMPT_RT" + depends on PREEMPT_RT + help + Enforce synchronisation across the softirqs context. On PREEMPT_RT + the softirq is preemptible. This enforces the same per-CPU BLK + semantic non-PREEMPT_RT builds have. This should not be needed + because per-CPU locks were added to avoid the per-CPU BKL. + + This switch provides the old behaviour for testing reasons. Select + this if you suspect an error with preemptible softirq and want test + the old synchronized behaviour. + config PREEMPT_COUNT bool
kernel/fork.c +1 -1
@@ -689,7 +689,6 @@ void __mmdrop(struct mm_struct *mm)mm_pasid_drop (mm);mm_destroy_cid (mm);percpu_counter_destroy_many (mm->rss_stat,NR_MM_COUNTERS ); -futex_hash_free (mm);free_mm (mm); }
@@ -1138,6 +1137,7 @@ static inline void __mmput(struct mm_struct *mm)if (mm->binfmt)module_put (mm->binfmt->module);lru_gen_del_mm (mm); +futex_hash_free (mm);mmdrop (mm); }
kernel/futex/core.c +12 -4
@@ -1722,12 +1722,9 @@ int futex_mm_init(struct mm_struct *mm)RCU_INIT_POINTER (mm->futex_phash,NULL ); mm->futex_phash_new =NULL ;/* futex-ref */ + mm->futex_ref =NULL ;atomic_long_set (&mm->futex_atomic,0 ); mm->futex_batches =get_state_synchronize_rcu (); - mm->futex_ref = alloc_percpu(unsigned int); -if (!mm->futex_ref) -return -ENOMEM ; -this_cpu_inc (*mm->futex_ref);/* 0 -> 1 */ return 0 ; }
@@ -1801,6 +1798,17 @@ static int futex_hash_allocate(unsigned int hash_slots, unsigned int flags) } } +if (!mm->futex_ref) { +/* +* This will always be allocated by the first thread and +* therefore requires no locking. +*/ + mm->futex_ref = alloc_percpu(unsigned int); +if (!mm->futex_ref) +return -ENOMEM ; +this_cpu_inc (*mm->futex_ref);/* 0 -> 1 */ + } + fph =kvzalloc (struct_size (fph, queues, hash_slots),GFP_KERNEL_ACCOUNT | __GFP_NOWARN);if (!fph)
kernel/softirq.c +120 -25
210 lines not on this page · raw message
kernel/workqueue.c +42 -9
90 lines not on this page · raw message
localversion-rt +1 -1
@@ -1 +1 @@ --rt2 +-rt3
net/netfilter/nf_conntrack_netlink.c +10 -29
@@ -60,7 +60,7 @@ MODULE_LICENSE("GPL");MODULE_DESCRIPTION ("List and change connection tracking table" );struct ctnetlink_list_dump_ctx { -struct nf_conn *last; +unsigned long last_id;unsigned int cpu;bool done; };
@@ -1733,16 +1733,6 @@ static int ctnetlink_get_conntrack(struct sk_buff *skb,return nfnetlink_unicast (skb2, info->net,NETLINK_CB (skb).portid); } -static int ctnetlink_done_list (struct netlink_callback *cb) -{ -struct ctnetlink_list_dump_ctx *ctx = (void *)cb->ctx; - -if (ctx->last) -nf_ct_put (ctx->last); - -return 0 ; -} -#ifdef CONFIG_NF_CONNTRACK_EVENTS static int ctnetlink_dump_one_entry(struct sk_buff *skb, struct netlink_callback *cb,
@@ -1757,11 +1747,11 @@ static int ctnetlink_dump_one_entry(struct sk_buff *skb,if (l3proto &&nf_ct_l3num (ct) != l3proto)return 0 ; -if (ctx->last) { -if (ct != ctx->last) +if (ctx->last_id) { +if (ctnetlink_get_id (ct) != ctx->last_id)return 0 ; - ctx->last =NULL ; + ctx->last_id =0 ; }/* We can't dump extension info for the unconfirmed
@@ -1775,12 +1765,8 @@ static int ctnetlink_dump_one_entry(struct sk_buff *skb, cb->nlh->nlmsg_seq,NFNL_MSG_TYPE (cb->nlh->nlmsg_type), ct, dying, 0); -if (res <0 ) { -if (!refcount_inc_not_zero (&ct->ct_general.use)) -return 0 ; - - ctx->last = ct; - } +if (res <0 ) + ctx->last_id =ctnetlink_get_id (ct);return res; }
@@ -1796,10 +1782,10 @@ static int ctnetlink_dump_dying(struct sk_buff *skb, struct netlink_callback *cb) { struct ctnetlink_list_dump_ctx *ctx = (void *)cb->ctx; -struct nf_conn *last = ctx->last;#ifdef CONFIG_NF_CONNTRACK_EVENTS const struct net *net =sock_net (skb->sk);struct nf_conntrack_net_ecache *ecache_net; +unsigned long last_id = ctx->last_id;struct nf_conntrack_tuple_hash *h;struct hlist_nulls_node *n;#endif
@@ -1807,7 +1793,7 @@ ctnetlink_dump_dying(struct sk_buff *skb, struct netlink_callback *cb)if (ctx->done)return 0 ; - ctx->last =NULL ; + ctx->last_id =0 ;#ifdef CONFIG_NF_CONNTRACK_EVENTS ecache_net =nf_conn_pernet_ecache (net);
@@ -1818,24 +1804,21 @@ ctnetlink_dump_dying(struct sk_buff *skb, struct netlink_callback *cb)int res; ct =nf_ct_tuplehash_to_ctrack (h); -if (last && last != ct) +if (last_id && last_id !=ctnetlink_get_id (ct))continue ; res =ctnetlink_dump_one_entry (skb, cb, ct, true);if (res <0 ) {spin_unlock_bh (&ecache_net->dying_lock); -nf_ct_put (last);return skb->len; } -nf_ct_put (last); - last = NULL; + last_id = 0; }spin_unlock_bh (&ecache_net->dying_lock);#endif ctx->done = true; -nf_ct_put (last);return skb->len; }
@@ -1847,7 +1830,6 @@ static int ctnetlink_get_ct_dying(struct sk_buff *skb,if (info->nlh->nlmsg_flags &NLM_F_DUMP ) {struct netlink_dump_control c = { .dump = ctnetlink_dump_dying, - .done = ctnetlink_done_list, };return netlink_dump_start (info->sk, skb, info->nlh, &c); }
@@ -1862,7 +1844,6 @@ static int ctnetlink_get_ct_unconfirmed(struct sk_buff *skb,if (info->nlh->nlmsg_flags &NLM_F_DUMP ) {struct netlink_dump_control c = { .dump = ctnetlink_dump_unconfirmed, - .done = ctnetlink_done_list, };return netlink_dump_start (info->sk, skb, info->nlh, &c); }
net/netfilter/nft_set_pipapo.c +53 -37
169 lines not on this page · raw message
net/netfilter/nft_set_pipapo.h +4 -4
@@ -124,14 +124,14 @@ struct nft_pipapo_field {/** * struct nft_pipapo_scratch - percpu data used for lookup and matching +* @bh_lock: PREEMPT_RT local spinlock * @map_index: Current working bitmap index, toggled between field matches -* @align_off: Offset to get the originally allocated address -* @map: store partial matching results during lookup +* @__map: store partial matching results during lookup */ struct nft_pipapo_scratch { +local_lock_t bh_lock;u8 map_index; -u32 align_off; -unsigned long map[]; +unsigned long __map[]; };/**
net/netfilter/nft_set_pipapo_avx2.c +89 -59
205 lines not on this page · raw message
net/netfilter/nft_set_pipapo_avx2.h +4 -0
@@ -5,8 +5,12 @@#include <asm/fpu/xstate.h> #define NFT_PIPAPO_ALIGN (XSAVE_YMM_SIZE / BITS_PER_BYTE) +struct nft_pipapo_match ;bool nft_pipapo_avx2_estimate (const struct nft_set_desc *desc,u32 features,struct nft_set_estimate *est); +struct nft_pipapo_elem *pipapo_get_avx2 (const struct nft_pipapo_match *m, +const u8 *data,u8 genmask, +u64 tstamp);#endif /* defined(CONFIG_X86_64) && !defined(CONFIG_UML) */ #endif /* _NFT_SET_PIPAPO_AVX2_H */