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: <20101203193008.GK10050@sequoia.sous-sol.org>
Date:	Fri, 3 Dec 2010 11:30:08 -0800
From:	Chris Wright <chrisw@...s-sol.org>
To:	Rik van Riel <riel@...hat.com>
Cc:	Chris Wright <chrisw@...s-sol.org>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, Avi Kiviti <avi@...hat.com>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...e.hu>,
	Anthony Liguori <aliguori@...ux.vnet.ibm.com>
Subject: Re: [RFC PATCH 2/3] sched: add yield_to function

* Rik van Riel (riel@...hat.com) wrote:
> On 12/02/2010 07:50 PM, Chris Wright wrote:
> >>+/*
> >>+ * Yield the CPU, giving the remainder of our time slice to task p.
> >>+ * Typically used to hand CPU time to another thread inside the same
> >>+ * process, eg. when p holds a resource other threads are waiting for.
> >>+ * Giving priority to p may help get that resource released sooner.
> >>+ */
> >>+void yield_to(struct task_struct *p)
> >>+{
> >>+	unsigned long flags;
> >>+	struct sched_entity *se =&p->se;
> >>+	struct rq *rq;
> >>+	struct cfs_rq *cfs_rq;
> >>+	u64 remain = slice_remain(current);
> >>+
> >>+	rq = task_rq_lock(p,&flags);
> >>+	if (task_running(rq, p) || task_has_rt_policy(p))
> >>+		goto out;
> >>+	cfs_rq = cfs_rq_of(se);
> >>+	se->vruntime -= remain;
> >>+	if (se->vruntime<  cfs_rq->min_vruntime)
> >>+		se->vruntime = cfs_rq->min_vruntime;
> >
> >Should these details all be in sched_fair?  Seems like the wrong layer
> >here.  And would that condition go the other way?  If new vruntime is
> >smaller than min, then it becomes new cfs_rq->min_vruntime?
> 
> That would be nice.  Unfortunately, EXPORT_SYMBOL() does
> not seem to work right from sched_fair.c, which is included
> from sched.c instead of being built from the makefile!

add a ->yield_to() to properly isolate (only relevant then in
sched_fair)?
--
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