)]}'
{
  "commit": "95c4e2ad2603cd29af1357c0ceb780da8dc161cc",
  "tree": "7d95b189d7042ed700581baa9687ad8a7b1d7b8d",
  "parents": [
    "756e762eaccb12d277890cfee6cc9eec4a8eba3e"
  ],
  "author": {
    "name": "Daniel Bristot de Oliveira",
    "email": "bristot@redhat.com",
    "time": "Fri Nov 27 16:36:54 2015 -0200"
  },
  "committer": {
    "name": "Arnaldo Carvalho de Melo",
    "email": "acme@redhat.com",
    "time": "Fri Nov 27 16:20:57 2015 -0300"
  },
  "message": "tuna: fix the check of PF_NO_SETAFFINITY flag for threads\n\nTuna checks if PF_NO_SETAFFINITY is set on /proc/PID/stat\u0027s \u0027flag\u0027 field\nto verify if it is possible to migrate a process/thread.  This is\nworking fine for process, but not for threads.\n\nFor threads, the file /proc/TID/stat is being checked, but this file\ndoes not exist as the stat file of a thread is at\n/proc/PID/task/TID/stat.  Hence, the check was failing and threads were\nnot being migrated.\n\nThis patch adds a function to check thread\u0027s stat file, and this\nfunction is called to verify the PF_NO_SETAFFINITY flag for threads.\n\nCommitter note:\n\nBefore, doing:\n\n  # tuna --cpu 3 --isolate\n  # tuna -t firefox -CP\n                      thread       ctxt_switches\n      pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd\n   14838   OTHER     0    0,1,2    873954        27498         firefox\n    14857  OTHER     0  0,1,2,3         3            1  Gecko_IOThread\n    14858  OTHER     0  0,1,2,3         1            0    Link Monitor\n    14859  OTHER     0  0,1,2,3    126717        12214   Socket Thread\n  \u003cSNIP\u003e\n\nSo it affected just the main thread, all the children remained with\ntheir existing affinity mask.\n\nAfter the patch:\n\n  # tuna --cpu 3 --isolate\n  # tuna -t firefox -CP\n                        thread       ctxt_switches\n      pid SCHED_ rtpri affinity voluntary nonvoluntary             cmd\n   14838   OTHER     0    0,1,2    877488        27583         firefox\n    14857  OTHER     0    0,1,2         3            1  Gecko_IOThread\n    14858  OTHER     0    0,1,2         1            0    Link Monitor\n    14859  OTHER     0    0,1,2    126933        12235   Socket Thread\n  \u003cSNIP\u003e\n\nSigned-off-by: Daniel Bristot de Oliveira \u003cbristot@redhat.com\u003e\nTested-by: Arnaldo Carvalho de Melo \u003cacme@redhat.com\u003e\nCc: Jiri Kastner \u003cjkastner@redhat.com\u003e\nCc: John Kacur \u003cjkacur@redhat.com\u003e\nCc: Luiz Capitulino \u003clcapitulino@redhat.com\u003e\nCc: Tuna \u003ctuna-devel@lists.fedorahosted.org\u003e\nBugzilla: https://bugzilla.redhat.com/show_bug.cgi?id\u003d1286221\nSigned-off-by: Arnaldo Carvalho de Melo \u003cacme@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3c30f03ea134af1920f4aa0a650949dcc58f2036",
      "old_mode": 33261,
      "old_path": "tuna/tuna.py",
      "new_id": "1de63b07a5eec36a701696a01303ea4bfbb68e63",
      "new_mode": 33261,
      "new_path": "tuna/tuna.py"
    }
  ]
}
