Re: Announce: many virtual servers on a single box (scheduling)

Jacques Gelinas (jack@solucorp.qc.ca)
Mon, 15 Oct 2001 21:43:31 -0500


On Mon, 15 Oct 2001 17:22:43 -0500, James Sutherland wrote

> Hmmm - does this work with devfs?

Not tried. Sorry. Note that vserver can't mount.

> Have you looked at the "fairsched" patch for this? It seems to be
> unmaintained since 2.4.0-testXX, but look close to your needs...

So far I am toying with a very simple solution. The current schedular (SCHED_OTHER)
is using each process p->counter (time quantum used so far) as one data to
compute the priority.

Security context are sharing a common struct context_info and it contains
a counter too (atomic_t counter). When the process p->counter is decremented
the context_info->counter is also decremented. This context_info counter is
used along with the p->counter to compute the process priority. So if a vserver
is running many processe, then their total cpu usage is accounted in their
common context_info->counter, so they have lover priority (together) than
a single process in another vserver.

Note that this idea is broad. A PAM module could be use to setup a per-user
context_info, without switching the security ID and you end up with
per-user fair schedular (well, per whatever).

Note also that this per context_info scheduling is a flag (you can only turn it on).
By default, there is no special scheduling in a vserver.

---------------------------------------------------------
Jacques Gelinas <jack@solucorp.qc.ca>
vserver: run general purpose virtual servers on one box, full speed!
http://www.solucorp.qc.ca/miscprj/s_context.hc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/