From: Mark Gross <mgross@linux.intel.com>
To: Valdis.Kletnieks@vt.edu
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
linux-pm <linux-pm@lists.linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] QoS params patch
Date: Thu, 27 Sep 2007 08:36:12 -0700 [thread overview]
Message-ID: <20070927153612.GE25718@linux.intel.com> (raw)
In-Reply-To: <22087.1190861583@turing-police.cc.vt.edu>
On Wed, Sep 26, 2007 at 10:53:03PM -0400, Valdis.Kletnieks@vt.edu wrote:
> On Wed, 26 Sep 2007 17:40:20 PDT, Mark Gross said:
> (others here are probably better at spotting leaks and races than I am,
> so I'm skipping those and picking other nits. ;)
>
> > --- linux-2.6.23-rc8/kernel/Makefile 2007-09-26 13:54:54.000000000 -0700
> > +++ linux-2.6.23-rc8-qos/kernel/Makefile 2007-09-26 14:06:38.000000000 -
> 0700
> > @@ -9,7 +9,7 @@
> > rcupdate.o extable.o params.o posix-timers.o \
> > kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
> > hrtimer.o rwsem.o latency.o nsproxy.o srcu.o die_notifier.o \
> > - utsname.o
> > + utsname.o qos_params.o
>
> So I don't get a choice in the matter if I will be dragging this thing
> around in my kernel, even if I have no intention of using the functionality?
nope.
>
> > + * This QoS design is best effort based. Dependents register their QoS needs.
> > + * Watchers register to keep track of the current QoS needs of the system.
> > + *
> > + * There are 3 basic classes of QoS parameter: latency, timeout, throughput
> > + * each have defined units:
> > + * latency: usec
> > + * timeout: usec <-- currently not used.
> > + * throughput: kbs (kilo byte / sec)
>
> It's unclear whether these are registering a differing QoS request for each
> process/container/whatever that asks for one, or if they're global across the
> system. Also, even though it's "best effort", it would be good to document
> what the failure mode is if we get conflicting requests, or an overcommit
> situation - do new requests get refused, or allowed and ignored, or allowed
> and only sometimes fulfilled. For instance, assume a gigabit ethernet,
> and 3 processes ask for 400 mbits/sec each - who wins, who gets part of what
> they asked for, and who loses and gets starved?
There are no overcommit failure modes. These QoS parameters are for
constraining aggressive power management throttling from breaking things
thereby enabling better power management solutions.
The QoS values are system wide parameters, not per process or driver.
So the code takes the max or min depending on what class of parameter is
in question. So if you have multiple applications asking for network
throughput of 400Mbs the current code will let the nic driver find out
that it shouldn't throttle itself to the point where it can provide
400Mbs to any one.
You raise a perspective I overlooked. For each of the parameter classes
I had been thinking of computing some extrema out of the set of
requests. However; for throughput it may make more sense to sum up a
collative value.
I'm not sure which way would make more sense.
--mgross
>
> > + * User mode requirements on a QOS parameter register themselves to the
> > + * subsystem by opening the device node /dev/... and writing there request to
> > + * the node. As long as the process holds a file handle open to the node the
>
> /dev? What /dev entry do you use for a network interface? Should this
> be a configfs creature instead, or maybe something else?
>
> > +/* static helper functions */
> > +static s32 max_compare(s32 v1, s32 v2)
>
> Blech. Is it time for the yearly stamp-out-reinvention-of-max() already?
> The use of pointer functions is interesting, but I have to wonder if there's
> not a better way...
>
> > +#define PID_NAME_LEN sizeof("process_1234567890")
> > +static char name[PID_NAME_LEN];
>
> And then you just pass a pointer to this and kstrdup() it. Why not kmalloc()
> the space initially and just 'dep->name = name;' and be done with it?
>
> General nit - why qos_power_*, when none of the supported QoS parameters
> seem to be power-related?
next prev parent reply other threads:[~2007-09-27 15:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-26 22:37 [RFC] QoS power Management enabling patch set Mark Gross
2007-09-26 22:40 ` [RFC] QoS params patch Mark Gross
2007-09-26 23:41 ` Randy Dunlap
2007-09-27 0:40 ` Mark Gross
2007-09-27 2:53 ` Valdis.Kletnieks
2007-09-27 3:18 ` Paul Mundt
2007-09-27 15:17 ` Mark Gross
2007-09-27 15:36 ` Mark Gross [this message]
2007-09-27 13:00 ` roel
2007-09-27 2:24 ` Paul Mundt
2007-09-27 4:05 ` Randy Dunlap
2007-09-27 15:37 ` Mark Gross
2007-09-27 20:17 ` [RFC] QoS params patch update Mark Gross
2007-09-28 0:08 ` Paul Mundt
2007-09-27 16:21 ` [RFC] QoS params patch Mark Gross
2007-09-28 6:25 ` Andrew Morton
2007-09-28 6:41 ` Paul Mundt
2007-09-28 17:22 ` Mark Gross
2007-09-28 17:19 ` Mark Gross
2007-09-28 18:51 ` Andrew Morton
2007-10-01 16:11 ` Mark Gross
2007-09-26 22:42 ` [RFC] QoS power Management enabling patch set Mark Gross
2007-09-26 22:45 ` [RFC] QoS power example / hack Mark Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070927153612.GE25718@linux.intel.com \
--to=mgross@linux.intel.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=randy.dunlap@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox