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] [day] [month] [year] [list]
Message-ID: <0d2ff3a0-868d-48ea-8e88-9123e57aecca@kernel.dk>
Date: Mon, 19 Aug 2024 08:43:09 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Zhang Qiao <zhangqiao22@...wei.com>, linux-kernel@...r.kernel.org
Cc: peterz@...radead.org, tglx@...utronix.de
Subject: Re: [PATCH 2/4] sched/core: change rq->nr_iowait type to
 atomic_long_t on 64-bit

On 8/19/24 12:30 AM, Zhang Qiao wrote:
>> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
>> index b6b3b565bcb1..6a90c2da1eb3 100644
>> --- a/kernel/sched/sched.h
>> +++ b/kernel/sched/sched.h
>> @@ -1082,7 +1082,11 @@ struct rq {
>>  	u64			clock_idle_copy;
>>  #endif
>>  
>> +#ifdef CONFIG_64BIT
>> +	atomic_long_t		nr_iowait;
>> +#else
>>  	atomic_t		nr_iowait;
>> +#endif
> 
> When CONFIG_64BIT is not set, the type atomic_long_t as a synonym of
> the type atomic_t. Can you directly use atomic_long_t, is right?

Ah indeed, thanks! Yeah we can just use atomic_long_t unconditionally,
and that'd kill the ifdefs in sched/core/core.c as well as we can just
define the shift to be half the atomic_long_t size, 4 *
sizeof(atomic_long_t).

I'll respin with that.

-- 
Jens Axboe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ