lkml.org 
[lkml]   [2021]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] sched: Always print out preempt dynamic state
    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

    \
     
     \ /
      Last update: 2021-06-08 15:57    [W:3.420 / U:0.276 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site