public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Zhang Qiao <zhangqiao22@huawei.com>, linux-kernel@vger.kernel.org
Cc: peterz@infradead.org, tglx@linutronix.de
Subject: Re: [PATCH 2/4] sched/core: change rq->nr_iowait type to atomic_long_t on 64-bit
Date: Mon, 19 Aug 2024 08:43:09 -0600	[thread overview]
Message-ID: <0d2ff3a0-868d-48ea-8e88-9123e57aecca@kernel.dk> (raw)
In-Reply-To: <004e1d6a-64ed-4024-b7f7-3f8ed1010e36@huawei.com>

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


  reply	other threads:[~2024-08-19 14:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-17 20:45 [PATCHSET v5 0/4] Split iowait into two states Jens Axboe
2024-08-17 20:45 ` [PATCH 1/4] sched/core: add helpers for iowait handling Jens Axboe
2024-08-17 20:45 ` [PATCH 2/4] sched/core: change rq->nr_iowait type to atomic_long_t on 64-bit Jens Axboe
2024-08-19  6:30   ` Zhang Qiao
2024-08-19 14:43     ` Jens Axboe [this message]
2024-08-17 20:45 ` [PATCH 3/4] sched/core: have io_schedule_prepare() return a long Jens Axboe
2024-08-17 20:45 ` [PATCH 4/4] sched/core: split iowait state into two states Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2024-04-16 12:11 [PATCHSET v4 0/4] Split iowait " Jens Axboe
2024-04-16 12:11 ` [PATCH 2/4] sched/core: change rq->nr_iowait type to atomic_long_t on 64-bit Jens Axboe
2024-04-24  9:56   ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d2ff3a0-868d-48ea-8e88-9123e57aecca@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=zhangqiao22@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox