Michal Sojka [Tue, 19 May 2009 11:53:03 +0000 (13:53 +0200)]
Aquosa is initialized only when it is really needed
Now, the framework can bi compiled with Aquosa supoprt, but test not
requring aquosa can run without aquosa kernel. Aquosa is initialized
just before the first contract for CPU is negotiated.
Dario Faggioli [Wed, 13 May 2009 09:58:22 +0000 (11:58 +0200)]
Added speed reading functions.
frsh_resource_get_speed() function (and their implementations for CPU and
LCD) are added by this commit.
They can be used to retreive the ratio between the speed of a power level
and the maximum achievable speed for that resource.
Michal Sojka [Wed, 13 May 2009 00:15:44 +0000 (02:15 +0200)]
Added test for spare capacity
Currently, the test only tests conversion of SC blocks to strings. The
functionality is almost the same as in negotiation.c The implementation
of spare capacity redistribution is still not finished, so that it
doesn't test that the spare capacity is redistributed correctly.
Dario Faggioli [Tue, 12 May 2009 08:07:49 +0000 (10:07 +0200)]
Fix (again) AQuoSA compilation.
This should --definitely-- fix all the still open issues with
compiling the framework while having AQuoSA installed in non-standard
(i.e., non /usr or /usr/local) path.
Michal Sojka [Sun, 10 May 2009 09:47:25 +0000 (11:47 +0200)]
Added fra_get()
This functions might be used later by frsh_resource_(set|get)_power_level()
to implement this functionality by virtual functions.
In my opinion, set/get_poer_level functions should not be part of FRSH API.
It is not clear (to me) what happens when one application set one
power-level and second application different level. I think this function
should only be used internally (e.g. by contract broker) to achieve the
requirements specified by frsh_contract_set_min_expiration() and similar
functions.
Michal Sojka [Sun, 10 May 2009 09:42:51 +0000 (11:42 +0200)]
Additional FRA functionality implemented by virtual functions
The new virtual functions are:
- (un)bind_thread
- vres_get_XXX_usage
- support for feedback module
In d9964709b8f6fe7ebf97535daaf1a3c52f519f89, these functions were called
from switch statements in FRSH API and it was not possible to compile the
framework without DISK support (there were missing #ifdefs).
Dario [Sat, 9 May 2009 17:04:27 +0000 (19:04 +0200)]
Large commit with power management related fixes and features.
This is a very (too much, probably!) large commit including:
- redesigned per-resource power management logic;
- test cases for battery status reading;
- test case for CPU and LCD power management;
- full implementation of battery related functions and of
their implications for core and contract functions;
- bugfixes in existent power managemtnt code
Dario [Sat, 9 May 2009 15:14:29 +0000 (17:14 +0200)]
Fixed AQuoSA CPU resource management.
AQuoSA based CPU manager implementation was affected by quite
serious bugs, mainly with respect to vres modification (during)
renegotiation and removal (during cancellation).
Dario [Tue, 5 May 2009 15:33:44 +0000 (17:33 +0200)]
Added minimum contract duration.
As prescribed by the energy management module, it is now possible to ask
a contract to be negotiated only if the system lifetime is greater than
a certain value, specified by means of the energy management API.
Dario [Mon, 4 May 2009 13:49:25 +0000 (15:49 +0200)]
Fix critical bugs in FRSH Feedback module.
Some critical bugs was present in the feedback module implementation.
First of all, the module was not being compiled, thus a lot of comilation
error were in place, and anybody has never noticed them.
Also, the name of the spare bandwidth setting functions (for CPU and DISK)
were totally wrong.
Finally, the registration of the spare capacity block was not being performed.
This quite disruptive commit the support for multiple
resources is introduced into the FRSH-FORB architecture.
For now, only CPU and DISK resources are supported, but, as usual,
the framework is flexible enough to make the adding of new resources
as easy as possible.
Unfortunately, we have not been able (yet), mainly for time reasons,
to go with the framework's usual ORB and virtual function based approach,
and some switch/case logic has been added in FRSH API implementation. :-(
We think this approach could anyway be valuable, at least for now...
Refinements and more "clean" solutions may come in the future, and any
kind of suggestion is welcome with this respect.
Added VRES type to the key of thread/VRES repository.
Since more than one single resource type has to be supported, it
came out that using only the thread-ID as the key of the trhead/VRES
repository (i.e., where the mapping between thread and vreses is kept)
is not enough.
In fact, what would happen if the user tries to bind _the_same_ thread
to two different vreses, each one associated to a different resource?
For that reason, the repository (and its accessor functions) has been
modified such that also the vres type is part of the key. Thus, the
same thread could be safely bound to one vres for each resource
we have in the system.
This commit implements a subset of the FRSH API for power management.
It only (for now) support CPU and make use of the special "resource"
acpi_cpu added by previous commits.
This commit augments the framework with the capability of dealing with
disk bandwidth, by means of a special disk scheduling algorithm, BFQ
(http://feanor.sssup.it/~fabio/linux/bfq/, provided it is present
in the kernel).
Notice that this commit is not enough to make disk contracts usable,
and some of the upcoming one are needed in order of "activate" them.
Michal Sojka [Thu, 23 Apr 2009 11:23:20 +0000 (13:23 +0200)]
Implemented support for contract renegotiation
This patch changes significantly the interface between FCB and resource
managers and allocators. There no longer exist cancel_* method. The main
negotiation methods (manager.reserve_contracts, allocator.change_vreses) now
use an interface which supports the semantic offered by
frsh_group_change_mode_sync() i.e. in one negotiation operation, there might
be a combination of multiple requests to negotiate, renegotiate or cancel
contracts. Resource managers process these requests atomically, i.e. either
all requests succeed or none of them.
The interface for implementing individual resource managers and allocators
remains the same with one exception - fres_sa_scenario_for_each_contract()
was replaced by fres_sa_scenario_for_each_no_cancel_contract().
First stub of the implementation of the spare capacity module.
Only the frsh_contract_set_reclamation_params() and
frsh_contract_get_reclamation_params() functions have been implemented
since now, since we need them also for feedback module.
Michal Sojka [Sun, 1 Mar 2009 19:18:31 +0000 (20:18 +0100)]
Merge branch 'dario'
This is a merge of patches sent by Dario with some fixes and comments added by me.
* Merged commits:
First stub of the feedback API.
Different solution for dedaling with csects serialization.
Added comment for a possible bug
Better dealing with attr = NULL bug.
Memory leak in shared objects removed.
Small fixes from the prev. commit.
Testcase and bugfixes for synchronization and shared objects.
Added comments on possible changes in csect IDL block
Shared Objects.
Synchronization objects.
Updates to the previous commit: added documentation and fixed bugs
Further improvements in core API implementation.
Resource independent thread functions and synch/shared objects stub.
Bugfix and FRSH thread function generalization.
Dario Faggioli [Fri, 27 Feb 2009 09:03:08 +0000 (10:03 +0100)]
First stub of the feedback API.
FRSH Feedback is implemented in this commit. It only is in place for
AQuoSA based CPU resource manager, since CGroups still lacks the basics
for having it up and running (it can be done, but it will be the focus
of future work... Not enough time to deal with it now!).
Something is still missing, like retreival and renegotiation of the fake
spare_contract used for the feedback. Some more discussion is needed in
order of deciding how to realize it.
Dario Faggioli [Fri, 27 Feb 2009 00:54:12 +0000 (01:54 +0100)]
Different solution for dedaling with csects serialization.
The functions for the de/serialization of the frsh_group_csects_t data
type have been rethinked and rewritten.
Serialization and deserialization of memory areas and function pointers
are still missing, and probably need some more thinking in order to
decide what to do with respect to them.
Dario Faggioli [Fri, 27 Feb 2009 00:50:24 +0000 (01:50 +0100)]
Better dealing with attr = NULL bug.
Differently cope with the possibility of the thread attributes being
NULL during thread_create_and_bind. This new solution initializes it
internally, thus avoiding a potential non-initialized used of variable
p, containing thread priority.