Hello,
this patch changes the calculation of numer of groups in cpuctl test.
The new code doesn't need bc, and is more comprehensible IMHO
Regards
Jiri Palecek
---
testcases/kernel/controllers/cpuctl/parameters.sh | 11 +----------
1 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/testcases/kernel/controllers/cpuctl/parameters.sh
b/testcases/kernel/controllers/cpuctl/parameters.sh
index a23dbe5..502944e 100755
--- a/testcases/kernel/controllers/cpuctl/parameters.sh
+++ b/testcases/kernel/controllers/cpuctl/parameters.sh
@@ -61,16 +61,7 @@ set_def_group() #default group spinning a task to create
ideal scenario
get_num_groups() # Number of tasks should be >= number of cpu's (to
check scheduling fairness)
{
- num_grps=$(echo "$NUM_CPUS * 1.5"|bc) # temp variable num_grps
- int_part=`echo $num_grps | cut -d"." -f1`
- dec_part=`echo $num_grps | cut -d"." -f2`
-
- if [ $dec_part -gt 0 ]
- then
- NUM_GROUPS=$(echo "$int_part + 1"|bc)
- else
- NUM_GROUPS=$int_part;
- fi
+ NUM_GROUPS=$(( (NUM_CPUS*3 + 1)/2 ))
}
# Write the cleanup function
--
1.6.4.3
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list