Re: [PATCH v4 12/17] s390/preempt: Enable HAS_SEPARATE_PREEMPT_RESCHED_BITS

From: Shrikanth Hegde

Date: Wed Aug 05 2026 - 09:19:43 EST


Hi Peter.

On 8/5/26 3:12 PM, Peter Zijlstra wrote:
On Wed, Aug 05, 2026 at 01:57:04AM +0530, Shrikanth Hegde wrote:
+maddy, christophe,

On 8/4/26 9:44 PM, Boqun Feng wrote:
From: Heiko Carstens <hca@xxxxxxxxxxxxx>

Convert s390's preempt_count to 64 bit, and change the preempt
primitives accordingly.


+ union {
+ struct {
+ __u32 need_resched; /* 0x03a8 */
+ __u32 count; /* 0x03ac */
+ } preempt;
+ __u64 preempt_count; /* 0x03a8 */
+ };


This is interesting. So arm64, s390 will have similar implementation
w.r.t to preempt_count.

I guess PoC that i was trying for ppc64 is worth pursuing even more,
since ppc64 is one missing major arch which still uses old method
of querying tif_need_resched.
With similar change ppc64 can set HAS_SEPARATE_PREEMPT_RESCHED_BITS too.

Yes. PPC should be able to the same thing ARM64 does.

Yes. I am thinking of moving it to PACA instead of keeping it in thread_info
as PACA is a natural per-CPU storage.

If i hit any major hurdle there, will use thread info similar to arm64.