All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] sched: Always print out preempt dynamic state
Date: Tue, 8 Jun 2021 15:56:57 +0200	[thread overview]
Message-ID: <YL93KX2go+Qwlhgg@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210608120442.93587-3-frederic@kernel.org>

On Tue, Jun 08, 2021 at 02:04:42PM +0200, Frederic Weisbecker wrote:
> Previously the preempt dynamic mode wasn't printed out if it wasn't
> overriden with the "preempt=" boot option.
> 
> But now that the default preempt dynamic behaviour can be selected at
> Kconfig time, we can't assume anymore that preempt=full is the default.
> The only way to retrieve that information is to browse the kernel config
> file.
> 
> Better print it out unconditionally then.
> 
> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
> ---
>  kernel/sched/core.c | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index df47a8275c37..6b883adad8f7 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6262,6 +6262,21 @@ int sched_dynamic_mode(const char *str)
>  
>  void sched_dynamic_update(int mode)
>  {
> +	switch (mode) {
> +		case preempt_dynamic_none:
> +			pr_info("Dynamic Preempt: none\n");
> +			break;
> +		case preempt_dynamic_voluntary:
> +			pr_info("Dynamic Preempt: voluntary\n");
> +			break;
> +		case preempt_dynamic_full:
> +			pr_info("Dynamic Preempt: full\n");
> +			break;
> +		default:
> +			pr_info("Dynamic Preempt: incorrect\n");
> +			return;
> +	}

Indent fail; for vim, use: set cino=(0:0

      reply	other threads:[~2021-06-08 13:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 12:04 [PATCH 0/2] sched: Define default preempt dynamic boot mode on Kconfig Frederic Weisbecker
2021-06-08 12:04 ` [PATCH 1/2] sched: Add default dynamic preempt mode Kconfig Frederic Weisbecker
2021-06-08 13:55   ` Peter Zijlstra
2021-06-08 14:04     ` Peter Zijlstra
2021-06-09 11:27       ` Frederic Weisbecker
2021-06-09 11:13     ` Frederic Weisbecker
2021-06-08 13:55   ` Peter Zijlstra
2021-06-09 11:25     ` Frederic Weisbecker
2021-06-08 12:04 ` [PATCH 2/2] sched: Always print out preempt dynamic state Frederic Weisbecker
2021-06-08 13:56   ` Peter Zijlstra [this message]

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=YL93KX2go+Qwlhgg@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.