[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adf7fca9aab320abc7a0c364b3e99709e0d99548.camel@kernel.org>
Date: Wed, 18 May 2022 17:31:32 +0200
From: nicolas saenz julienne <nsaenz@...nel.org>
To: Frederic Weisbecker <frederic@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Phil Auld <pauld@...hat.com>,
Alex Belits <abelits@...vell.com>,
Xiongfeng Wang <wangxiongfeng2@...wei.com>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
Thomas Gleixner <tglx@...utronix.de>,
Yu Liao <liaoyu15@...wei.com>,
Boqun Feng <boqun.feng@...il.com>,
"Paul E . McKenney" <paulmck@...nel.org>,
Marcelo Tosatti <mtosatti@...hat.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Uladzislau Rezki <uladzislau.rezki@...y.com>,
Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 21/21] rcu/context_tracking: Merge dynticks counter and
context tracking states
On Tue, 2022-05-03 at 12:00 +0200, Frederic Weisbecker wrote:
[...]
> diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h
> index edd9f8f5b753..0841435620cf 100644
> --- a/include/linux/context_tracking_state.h
> +++ b/include/linux/context_tracking_state.h
> @@ -10,12 +10,20 @@
> #define DYNTICK_IRQ_NONIDLE ((LONG_MAX / 2) + 1)
>
> enum ctx_state {
> - CONTEXT_DISABLED = -1, /* returned by ct_state() if unknown */
> - CONTEXT_KERNEL = 0,
> - CONTEXT_USER,
> - CONTEXT_GUEST,
> + CONTEXT_DISABLED = -1, /* returned by ct_state() if unknown */
> + CONTEXT_KERNEL = 0,
> + CONTEXT_IDLE = 1,
> + CONTEXT_USER = 2,
> + CONTEXT_GUEST = 3,
> + CONTEXT_MAX = 4,
> };
>
> +/* Even value for idle, else odd. */
> +#define RCU_DYNTICKS_IDX CONTEXT_MAX
> +
> +#define CT_STATE_MASK (CONTEXT_MAX - 1)
> +#define CT_DYNTICKS_MASK (~CT_STATE_MASK)
Nit: These macros only work as long as we don't introduce new contexts. It's
maybe worth a comment.
Regards,
--
Nicolás Sáenz
Powered by blists - more mailing lists