[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200817021714.GB1492280@google.com>
Date: Sun, 16 Aug 2020 22:17:14 -0400
From: Joel Fernandes <joel@...lfernandes.org>
To: peterz@...radead.org
Cc: linux-kernel@...r.kernel.org, Aaron Lu <aaron.lwe@...il.com>,
Aubrey Li <aubrey.li@...ux.intel.com>,
Julien Desfossez <jdesfossez@...italocean.com>,
Kees Cook <keescook@...omium.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Paul Turner <pjt@...gle.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Tim Chen <tim.c.chen@...el.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Vineeth Pillai <viremana@...ux.microsoft.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
fweisbec@...il.com, kerrnel@...gle.com,
Phil Auld <pauld@...hat.com>,
Valentin Schneider <valentin.schneider@....com>,
Paolo Bonzini <pbonzini@...hat.com>,
Chen Yu <yu.c.chen@...el.com>,
Christian Brauner <christian.brauner@...ntu.com>
Subject: Re: [PATCH RFC 02/12] entry/idle: Add a common function for
activites during idle entry/exit
Hello Peter,
On Sat, Aug 15, 2020 at 10:14:41AM +0200, peterz@...radead.org wrote:
> On Fri, Aug 14, 2020 at 11:18:58PM -0400, Joel Fernandes (Google) wrote:
> > Currently only RCU hooks for idle entry/exit are called. In later
> > patches, kernel-entry protection functionality will be added.
> >
> > Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
>
> NAK, rcu_idle_enter() is broken where it is now, it needs to be pushed
> in deeper:
>
> http://lkml.kernel.org/r/20200807193017.962482579@infradead.org
Thank you for pointing it out. Not a huge problem, a couple ways I can do it:
1. Move the calls to sched_core_unsafe_{enter,exit}() deeper into the idle loop.
2. Keep the calls to sched_core_unsafe_{enter,exit}() where they are now as
in this patch, but leave out the rcu_idle_{enter,exit}() calls alone so
they can be moved deeper as you mentioned.
#1 is not necessary for these patches to work and might be overkill.
I'll go the #2 route then. Let me know any other ideas you might have.
What I am trying to do here is to handle a case where task is switching to
idle (say it went to sleep) and wakes up later.
usermode -> syscall (kernel mode - so mark unsafe) -> idle (mark safe).
idle -> syscall wakes (kernel mode - so mark unsafe) -> usermode (mark safe).
Thank you,
- Joel
Powered by blists - more mailing lists