lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200907101717.39460.arnd@arndb.de>
Date:	Fri, 10 Jul 2009 17:17:38 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 1/2] sched: Drop the need_resched() loop from cond_resched()

On Friday 10 July 2009, Frederic Weisbecker wrote:
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -6613,11 +6613,9 @@ static void __cond_resched(void)
>          * PREEMPT_ACTIVE, which could trigger a second
>          * cond_resched() call.
>          */
> -       do {
> -               add_preempt_count(PREEMPT_ACTIVE);
> -               schedule();
> -               sub_preempt_count(PREEMPT_ACTIVE);
> -       } while (need_resched());
> +       add_preempt_count(PREEMPT_ACTIVE);
> +       schedule();
> +       sub_preempt_count(PREEMPT_ACTIVE);
>  }
>  

If you drop the loop, then you should also remove the comment that
explains why it was put there.

	Arnd <><
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ