Comment 3 for bug 1027203

Revision history for this message
Nicolas Pitre (npitre) wrote : Re: [Bug 1027203] Re: cache-coherency test failed. Abort!! while bigLITTLE test execution on Fastmodel

Here's what I found so far:

- The bug apparently doesn't affect the Ubuntu build. So I tried
  a kernel without the Android patches (the Android user space isn't
  all happy about it but the shell is working) and the test still fails.
  At least this rules out Android kernel changes.

- Then I hacked the cpufreq driver to let user space believe switch
  requests were honored but without doing any switching using this
  patch:

diff --git a/drivers/cpufreq/arm-bl-cpufreq.c b/drivers/cpufreq/arm-bl-cpufreq.c
index 85e1bb0519..14e62d9866 100644
--- a/drivers/cpufreq/arm-bl-cpufreq.c
+++ b/drivers/cpufreq/arm-bl-cpufreq.c
@@ -106,9 +106,13 @@ static void __get_current_cluster(void *_data)

 static int get_current_cluster(unsigned int cpu)
 {
+#if 0
  unsigned int cluster = 0;
  smp_call_function_single(cpu, __get_current_cluster, &cluster, 1);
  return cluster;
+#else
+ return per_cpu(cpu_cur_cluster, cpu);
+#endif
 }

 static int get_current_cached_cluster(unsigned int cpu)
@@ -143,7 +147,7 @@ static void switch_to_entry(unsigned int cpu,
  freqs.new = entry_to_freq(target);

  cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
- bL_switch_request(cpu, new_cluster);
+ //bL_switch_request(cpu, new_cluster);
  per_cpu(cpu_cur_cluster, cpu) = new_cluster;
  cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 }

  And then the test appears to work OK.

So... it seems that the difference between the Android user libraries
and the Ubuntu user libraries is triggering the bug. However the bug
appears only when real switching is taking place, indicating some
remaining flaw with the switcher.

Would it be possible to get a strace dump of the running test when
running on Ubuntu vs Android? Extracting syscalls differences between
the two could help identify the problem. No need to switch at the same
time therefore no need to use Fast Models for this.