Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove load balance code from base #40

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions oslat-base
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
#!/bin/bash

if ! source ${TOOLBOX_HOME}/bash/library/bench-base; then echo "ERROR: Could not source bench-base from \$TOOLBOX_HOME [${TOOLBOX_HOME}]"; exit 1; fi

function disable_balance()
{
local cpulist="$1"; shift
local cpu=""
local file=
local flags_cur=
for cpu in `echo ${cpulist} | sed -e 's/,/ /g'`; do
for file in $(find /proc/sys/kernel/sched_domain/cpu$cpu -name flags -print); do
flags_cur=$(cat $file)
flags_cur=$((flags_cur & 0xfffe))
echo $flags_cur > $file
done
done
}

function enable_balance()
{
local cpulist="$1"; shift
local cpu=""
local file=
local flags_cur=
for cpu in `echo ${cpulist} | sed -e 's/,/ /g'`; do
for file in $(find /proc/sys/kernel/sched_domain/cpu$cpu -name flags -print); do
flags_cur=$(cat $file)
flags_cur=$((flags_cur | 0x1))
echo $flags_cur > $file
done
done
}

Loading