[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgqV1BLbCx5V+6tq@linutronix.de>
Date: Mon, 14 Feb 2022 18:48:04 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Andy Lutomirski <luto@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-ia64@...r.kernel.org,
Ben Segall <bsegall@...gle.com>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
Vincent Guittot <vincent.guittot@...aro.org>
Subject: Re: [PATCH 7/8] kernel/fork: Only cache the VMAP stack in
finish_task_switch().
On 2022-02-14 17:54:48 [+0100], To Andy Lutomirski wrote:
> index fcf0c180617c2..defe31036930a 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -4895,8 +4895,11 @@ static struct rq *finish_task_switch(struct task_struct *prev)
> if (prev->sched_class->task_dead)
> prev->sched_class->task_dead(prev);
>
> - /* Task is done with its stack. */
> - put_task_stack(prev);
> + /*
> + * Task is done with its stack. Try to cache VMAP stack and
> + * delay free it otherwise.
> + */
> + put_task_stack_sched(prev);
Now that I write the commit message, there is probably nothing wrong
with unconditionally delaying it via RCU if caching failed. Then I don't
have to explain that there is one function is for the atomic context and
the other for non-atomic.
> put_task_struct_rcu_user(prev);
> }
> --
Sebastian
Powered by blists - more mailing lists