lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o73p54en.fsf@mail.lhotse>
Date: Sun, 13 Oct 2024 09:42:56 +1100
From: Michael Ellerman <mpe@...erman.id.au>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>, Ankur Arora
 <ankur.a.arora@...cle.com>, Sebastian Andrzej Siewior
 <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, peterz@...radead.org, tglx@...utronix.de,
 paulmck@...nel.org, mingo@...nel.org, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, dietmar.eggemann@....com, rostedt@...dmis.org,
 bsegall@...gle.com, mgorman@...e.de, vschneid@...hat.com,
 frederic@...nel.org, efault@....de
Subject: Re: [PATCH 7/7] powerpc: add support for PREEMPT_LAZY

Shrikanth Hegde <sshegde@...ux.ibm.com> writes:
> On 10/10/24 23:40, Ankur Arora wrote:
>> 
>> Sebastian Andrzej Siewior <bigeasy@...utronix.de> writes:
>> 
>>> On 2024-10-09 09:54:11 [-0700], Ankur Arora wrote:
>>>> From: Shrikanth Hegde <sshegde@...ux.ibm.com>
>>>>
>>>> Add PowerPC arch support for PREEMPT_LAZY by defining LAZY bits.
>> 
...
>>>> diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h
>>>> index 6ebca2996f18..ae7793dae763 100644
>>>> --- a/arch/powerpc/include/asm/thread_info.h
>>>> +++ b/arch/powerpc/include/asm/thread_info.h
>>>> @@ -117,11 +117,14 @@ void arch_setup_new_exec(void);
>>>>   #endif
>>>>   #define TIF_POLLING_NRFLAG	19	/* true if poll_idle() is polling TIF_NEED_RESCHED */
>>>>   #define TIF_32BIT		20	/* 32 bit binary */
>>>> +#define TIF_NEED_RESCHED_LAZY	21	/* Lazy rescheduling */
>>>
>>> I don't see any of the bits being used in assembly anymore.
>>> If you group the _TIF_USER_WORK_MASK bits it a single 16 bit block then
>>> the compiler could issue a single andi.
>
> That's a good find. since by default powerpc uses 4 byte fixed ISA, 
> compiler would generate extra code for _TIF_USER_WORK_MASK. Looked at 
> the objdump. It indeed does.
>
> I see that value 9 isn't being used. It was last used for TIF_NOHZ which 
> is removed now. That value could be used for RESCHED_LAZY. Using that 
> value i see the code generated is similar to what we have now.
>
> +mpe

Yep, 9 looks good.

I don't think it *really* matters that it's a single andi. on modern
CPUs, but seeing as bit 9 is free we may as well use it.

cheers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ