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]
Date:	Thu, 03 Feb 2011 13:58:34 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Rik van Riel <riel@...hat.com>
Cc:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Avi Kiviti <avi@...hat.com>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Mike Galbraith <efault@....de>,
	Chris Wright <chrisw@...s-sol.org>,
	"Nakajima, Jun" <jun.nakajima@...el.com>
Subject: Re: [PATCH -v8a 3/7] sched: use a buddy to implement
 yield_task_fair

On Tue, 2011-02-01 at 09:51 -0500, Rik van Riel wrote:
> -static void yield_task_fair(struct rq *rq)
> -{
> -       struct task_struct *curr = rq->curr;
> -       struct cfs_rq *cfs_rq = task_cfs_rq(curr);
> -       struct sched_entity *rightmost, *se = &curr->se;
> -
> -       /*
> -        * Are we the only task in the tree?
> -        */
> -       if (unlikely(rq->nr_running == 1))
> -               return;
> -
> -       clear_buddies(cfs_rq, se);
> -
> -       if (likely(!sysctl_sched_compat_yield) && curr->policy != SCHED_BATCH) {
> -               update_rq_clock(rq);
> -               /*
> -                * Update run-time statistics of the 'current'.
> -                */
> -               update_curr(cfs_rq);
> -
> -               return;
> -       }
> -       /*
> -        * Find the rightmost entry in the rbtree:
> -        */
> -       rightmost = __pick_last_entity(cfs_rq);
> -       /*
> -        * Already in the rightmost position?
> -        */
> -       if (unlikely(!rightmost || entity_before(rightmost, se)))
> -               return;
> -
> -       /*
> -        * Minimally necessary key value to be last in the tree:
> -        * Upon rescheduling, sched_class::put_prev_task() will place
> -        * 'current' within the tree based on its new key value.
> -        */
> -       se->vruntime = rightmost->vruntime + 1;
> -} 


This also wants the below bit in order to build without warnings for
SCHED_DEBUG=n:


---
Index: linux-2.6/kernel/sched_fair.c
===================================================================
--- linux-2.6.orig/kernel/sched_fair.c
+++ linux-2.6/kernel/sched_fair.c
@@ -431,6 +431,7 @@ static struct sched_entity *__pick_next_
 	return rb_entry(next, struct sched_entity, run_node);
 }
 
+#ifdef CONFIG_SCHED_DEBUG
 static struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq)
 {
 	struct rb_node *last = rb_last(&cfs_rq->tasks_timeline);
@@ -445,7 +446,6 @@ static struct sched_entity *__pick_last_
  * Scheduling class statistics methods:
  */
 
-#ifdef CONFIG_SCHED_DEBUG
 int sched_proc_update_handler(struct ctl_table *table, int write,
 		void __user *buffer, size_t *lenp,
 		loff_t *ppos)

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