summaryrefslogtreecommitdiffstats
path: root/rpm/SPECS
diff options
context:
space:
mode:
authorDaniel Bristot de Oliveira <bristot@redhat.com>2015-11-27 16:36:54 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-11-27 16:20:57 -0300
commit95c4e2ad2603cd29af1357c0ceb780da8dc161cc (patch)
tree7d95b189d7042ed700581baa9687ad8a7b1d7b8d /rpm/SPECS
parent756e762eaccb12d277890cfee6cc9eec4a8eba3e (diff)
downloadtuna-master.tar.gz
tuna: fix the check of PF_NO_SETAFFINITY flag for threadsHEADtuna.korg/mastermaster
Tuna checks if PF_NO_SETAFFINITY is set on /proc/PID/stat's 'flag' field to verify if it is possible to migrate a process/thread. This is working fine for process, but not for threads. For threads, the file /proc/TID/stat is being checked, but this file does not exist as the stat file of a thread is at /proc/PID/task/TID/stat. Hence, the check was failing and threads were not being migrated. This patch adds a function to check thread's stat file, and this function is called to verify the PF_NO_SETAFFINITY flag for threads. Committer note: Before, doing: # tuna --cpu 3 --isolate # tuna -t firefox -CP thread ctxt_switches pid SCHED_ rtpri affinity voluntary nonvoluntary cmd 14838 OTHER 0 0,1,2 873954 27498 firefox 14857 OTHER 0 0,1,2,3 3 1 Gecko_IOThread 14858 OTHER 0 0,1,2,3 1 0 Link Monitor 14859 OTHER 0 0,1,2,3 126717 12214 Socket Thread <SNIP> So it affected just the main thread, all the children remained with their existing affinity mask. After the patch: # tuna --cpu 3 --isolate # tuna -t firefox -CP thread ctxt_switches pid SCHED_ rtpri affinity voluntary nonvoluntary cmd 14838 OTHER 0 0,1,2 877488 27583 firefox 14857 OTHER 0 0,1,2 3 1 Gecko_IOThread 14858 OTHER 0 0,1,2 1 0 Link Monitor 14859 OTHER 0 0,1,2 126933 12235 Socket Thread <SNIP> Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Kastner <jkastner@redhat.com> Cc: John Kacur <jkacur@redhat.com> Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Tuna <tuna-devel@lists.fedorahosted.org> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1286221 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'rpm/SPECS')
0 files changed, 0 insertions, 0 deletions