Module: xenomai-3
Branch: next
Commit: 298c31281ce447107049cd236ce038e6bb95d484
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=298c31281ce447107049cd236ce038e6bb95d484

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Jan 24 11:01:29 2016 +0100

drivers/autotune: track gravit limit in progress messages

---

 kernel/drivers/autotune/autotune.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/kernel/drivers/autotune/autotune.c 
b/kernel/drivers/autotune/autotune.c
index 8d6cafe..1d18163 100644
--- a/kernel/drivers/autotune/autotune.c
+++ b/kernel/drivers/autotune/autotune.c
@@ -571,8 +571,11 @@ static int tune_gravity(struct gravity_tuner *tuner, int 
period)
                        goto fail;
 
                if (step < WARMUP_STEPS) {
-                       if (step == WARMUP_STEPS - 1 && state->min_lat >= 0)
+                       if (step == WARMUP_STEPS - 1 && state->min_lat >= 0) {
                                gravity_limit = state->min_lat;
+                               progress(tuner, "gravity limit set to %Lu ns",
+                                        xnclock_ticks_to_ns(&nkclock, 
gravity_limit));
+                       }
                        continue;
                }
 
@@ -599,8 +602,12 @@ static int tune_gravity(struct gravity_tuner *tuner, int 
period)
                 * at warmup would make no sense: cap the gravity we
                 * may try.
                 */
-               if (tuner->adjust_gravity(tuner, adjust) > gravity_limit)
+               if (tuner->adjust_gravity(tuner, adjust) > gravity_limit) {
+                       progress(tuner, "gravity limit reached at %Lu ns",
+                                xnclock_ticks_to_ns(&nkclock,
+                                                    
tuner->get_gravity(tuner)));
                        break;
+               }
        }
 
        progress(tuner, "calibration scores");


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to