)]}'
{
  "commit": "ef53d9c5e4da147ecaa43c44c5e5945eb83970a2",
  "tree": "3b596445e5d0613fda4b33a4ae96e0e3fffdcf1e",
  "parents": [
    "53a9600c634e3bfd6230e0597aca159bf4d4d010"
  ],
  "author": {
    "name": "Srinivasa D S",
    "email": "srinivasa@in.ibm.com",
    "time": "Fri Jul 25 01:46:04 2008 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Jul 25 10:53:30 2008 -0700"
  },
  "message": "kprobes: improve kretprobe scalability with hashed locking\n\nCurrently list of kretprobe instances are stored in kretprobe object (as\nused_instances,free_instances) and in kretprobe hash table.  We have one\nglobal kretprobe lock to serialise the access to these lists.  This causes\nonly one kretprobe handler to execute at a time.  Hence affects system\nperformance, particularly on SMP systems and when return probe is set on\nlot of functions (like on all systemcalls).\n\nSolution proposed here gives fine-grain locks that performs better on SMP\nsystem compared to present kretprobe implementation.\n\nSolution:\n\n 1) Instead of having one global lock to protect kretprobe instances\n    present in kretprobe object and kretprobe hash table.  We will have\n    two locks, one lock for protecting kretprobe hash table and another\n    lock for kretporbe object.\n\n 2) We hold lock present in kretprobe object while we modify kretprobe\n    instance in kretprobe object and we hold per-hash-list lock while\n    modifying kretprobe instances present in that hash list.  To prevent\n    deadlock, we never grab a per-hash-list lock while holding a kretprobe\n    lock.\n\n 3) We can remove used_instances from struct kretprobe, as we can\n    track used instances of kretprobe instances using kretprobe hash\n    table.\n\nTime duration for kernel compilation (\"make -j 8\") on a 8-way ppc64 system\nwith return probes set on all systemcalls looks like this.\n\ncacheline              non-cacheline             Un-patched kernel\naligned patch \t       aligned patch\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nreal    9m46.784s       9m54.412s                  10m2.450s\nuser    40m5.715s       40m7.142s                  40m4.273s\nsys     2m57.754s       2m58.583s                  3m17.430s\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nTime duration for kernel compilation (\"make -j 8) on the same system, when\nkernel is not probed.\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nreal    9m26.389s\nuser    40m8.775s\nsys     2m7.283s\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nSigned-off-by: Srinivasa DS \u003csrinivasa@in.ibm.com\u003e\nSigned-off-by: Jim Keniston \u003cjkenisto@us.ibm.com\u003e\nAcked-by: Ananth N Mavinakayanahalli \u003cananth@in.ibm.com\u003e\nCc: Anil S Keshavamurthy \u003canil.s.keshavamurthy@intel.com\u003e\nCc: David S. Miller \u003cdavem@davemloft.net\u003e\nCc: Masami Hiramatsu \u003cmhiramat@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5ee39e10c8d18a37eb8004e91b0e5c046bd2eff7",
      "old_mode": 33188,
      "old_path": "arch/arm/kernel/kprobes.c",
      "new_id": "d28513f14d05906cec08a849128f76edaaf5ad16",
      "new_mode": 33188,
      "new_path": "arch/arm/kernel/kprobes.c"
    },
    {
      "type": "modify",
      "old_id": "233434f4f88f21cc58da0e0f2c7c726268db4f72",
      "old_mode": 33188,
      "old_path": "arch/ia64/kernel/kprobes.c",
      "new_id": "f07688da947c352217246d706435d09256d8894e",
      "new_mode": 33188,
      "new_path": "arch/ia64/kernel/kprobes.c"
    },
    {
      "type": "modify",
      "old_id": "4ba2af125450ea895583efc086a5ea4c5d5724cf",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/kprobes.c",
      "new_id": "de79915452c87d917728acbeefbd70a2b738d242",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/kprobes.c"
    },
    {
      "type": "modify",
      "old_id": "288ad490a6dd7ce931c0622c353d078eaf7a9799",
      "old_mode": 33188,
      "old_path": "arch/s390/kernel/kprobes.c",
      "new_id": "4f82e5b5f879f53d5f76effb049ed8020e019b61",
      "new_mode": 33188,
      "new_path": "arch/s390/kernel/kprobes.c"
    },
    {
      "type": "modify",
      "old_id": "f43b5d7553545ab8dcf7ec3900f9ba9100602591",
      "old_mode": 33188,
      "old_path": "arch/sparc64/kernel/kprobes.c",
      "new_id": "201a6e547e4aa0d256d062d251525c30ca49ea8f",
      "new_mode": 33188,
      "new_path": "arch/sparc64/kernel/kprobes.c"
    },
    {
      "type": "modify",
      "old_id": "43c019f85f0db749425e451957bd2279cee47b80",
      "old_mode": 33188,
      "old_path": "arch/x86/kernel/kprobes.c",
      "new_id": "6c27679ec6aa1753be87e05b6c72a10553f69574",
      "new_mode": 33188,
      "new_path": "arch/x86/kernel/kprobes.c"
    },
    {
      "type": "modify",
      "old_id": "04a3556bdea6b87e654db168240139dc887decb4",
      "old_mode": 33188,
      "old_path": "include/linux/kprobes.h",
      "new_id": "0be7795655fab4279d3b9b4a6fa110b01a4fc070",
      "new_mode": 33188,
      "new_path": "include/linux/kprobes.h"
    },
    {
      "type": "modify",
      "old_id": "1485ca8d0e00503104e81248a7c5e30b58edfb79",
      "old_mode": 33188,
      "old_path": "kernel/kprobes.c",
      "new_id": "cb0b3bde36173ad265c11a528e1116abbd862dae",
      "new_mode": 33188,
      "new_path": "kernel/kprobes.c"
    }
  ]
}
