[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKocOOMo-5Hiv_dBCpZNYMP_wXWiWugBYq4qsRcMBwm=TPM=dA@mail.gmail.com>
Date: Wed, 20 Feb 2013 17:31:21 -0700
From: Shuah Khan <shuahkhan@...il.com>
To: dan.carpenter@...cle.com, peterz@...radead.org, mingo@...nel.org
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
torvalds@...ux-foundation.org, Shuah Khan <shuahkhan@...il.com>
Subject: Re: sched: Fix signedness bug in yield_to()
On Tue, Feb 19, 2013 at 7:27 PM, Linux Kernel Mailing List
<linux-kernel@...r.kernel.org> wrote:
> Gitweb: http://git.kernel.org/linus/;a=commit;h=c3c186403c6abd32e719f005f0af950155a9e54d
> Commit: c3c186403c6abd32e719f005f0af950155a9e54d
> Parent: e0a79f529d5ba2507486d498b25da40911d95cf6
> Author: Dan Carpenter <dan.carpenter@...cle.com>
> AuthorDate: Tue Feb 5 14:37:51 2013 +0300
> Committer: Ingo Molnar <mingo@...nel.org>
> CommitDate: Tue Feb 5 12:59:29 2013 +0100
>
> sched: Fix signedness bug in yield_to()
>
> In 7b270f6099 "sched: Bail out of yield_to when source and
> target runqueue has one task" we changed this to store -ESRCH so
> it needs to be signed.
Dan, Ingo,
I can't find the 7b270f6099 "sched: Bail out of yield_to when source
and target runqueue has one task" in the latest Linus's git. Am I
missing something.
The current kenel/sched/core.c doesn't have the code from the
associated patch https://patchwork.kernel.org/patch/2016651/
> bool __sched yield_to(struct task_struct *p, bool preempt)
> {
> @@ -4303,6 +4306,15 @@ bool __sched yield_to(struct task_struct *p, bool preempt)
>
> again:
> p_rq = task_rq(p);
> + /*
> + * If we're the only runnable task on the rq and target rq also
> + * has only one task, there's absolutely no point in yielding.
> + */
> + if (rq->nr_running == 1 && p_rq->nr_running == 1) {
> + yielded = -ESRCH;
> + goto out_irq;
> + }
Without the 7b270f6099 "sched: Bail out of yield_to when source and
target runqueue has one task", do you need this change?
Am I missing something?
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists