)]}'
{
  "log": [
    {
      "commit": "3c5fd9c77d609b51c0bab682c9d40cbb496ec6f1",
      "tree": "72f8be799a5629458aca1da877d7616d928fa00d",
      "parents": [
        "8fc543c8f004fc9dfe0a262dc452dfe2eca4589b"
      ],
      "author": {
        "name": "David Miller",
        "email": "davem@davemloft.net",
        "time": "Tue Nov 06 21:13:56 2007 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri Nov 09 16:13:08 2007 -0800"
      },
      "message": "[FUTEX] Fix address computation in compat code.\n\ncompat_exit_robust_list() computes a pointer to the\nfutex entry in userspace as follows:\n\n\t(void __user *)entry + futex_offset\n\n\u0027entry\u0027 is a \u0027struct robust_list __user *\u0027, and\n\u0027futex_offset\u0027 is a \u0027compat_long_t\u0027 (typically a \u0027s32\u0027).\n\nThings explode if the 32-bit sign bit is set in futex_offset.\n\nType promotion sign extends futex_offset to a 64-bit value before\nadding it to \u0027entry\u0027.\n\nThis triggered a problem on sparc64 running 32-bit applications which\nwould lock up a cpu looping forever in the fault handling for the\nuserspace load in handle_futex_death().\n\nCompat userspace runs with address masking (wherein the cpu zeros out\nthe top 32-bits of every effective address given to a memory operation\ninstruction) so the sparc64 fault handler accounts for this by\nzero\u0027ing out the top 32-bits of the fault address too.\n\nSince the kernel properly uses the compat_uptr interfaces, kernel side\naccesses to compat userspace work too since they will only use\naddresses with the top 32-bit clear.\n\nBecause of this compat futex layer bug we get into the following loop\nwhen executing the get_user() load near the top of handle_futex_death():\n\n1) load from address \u00270xfffffffff7f16bd8\u0027, FAULT\n2) fault handler clears upper 32-bits, processes fault\n   for address \u00270xf7f16bd8\u0027 which succeeds\n3) goto #1\n\nI want to thank Bernd Zeimetz, Josip Rodin, and Fabio Massimo Di Nitto\nfor their tireless efforts helping me track down this bug.\n\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "228ebcbe634a30aec35132ea4375721bcc41bec0",
      "tree": "a875976fd5bde6e2f931aa235c34c88a2738493f",
      "parents": [
        "b488893a390edfe027bae7a46e9af8083e740668"
      ],
      "author": {
        "name": "Pavel Emelyanov",
        "email": "xemul@openvz.org",
        "time": "Thu Oct 18 23:40:16 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri Oct 19 11:53:40 2007 -0700"
      },
      "message": "Uninline find_task_by_xxx set of functions\n\nThe find_task_by_something is a set of macros are used to find task by pid\ndepending on what kind of pid is proposed - global or virtual one.  All of\nthem are wrappers above the most generic one - find_task_by_pid_type_ns() -\nand just substitute some args for it.\n\nIt turned out, that dereferencing the current-\u003ensproxy-\u003epid_ns construction\nand pushing one more argument on the stack inline cause kernel text size to\ngrow.\n\nThis patch moves all this stuff out-of-line into kernel/pid.c.  Together\nwith the next patch it saves a bit less than 400 bytes from the .text\nsection.\n\nSigned-off-by: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nCc: Sukadev Bhattiprolu \u003csukadev@us.ibm.com\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nAcked-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b488893a390edfe027bae7a46e9af8083e740668",
      "tree": "c469a7f99ad01005a73011c029eb5e5d15454559",
      "parents": [
        "3eb07c8c8adb6f0572baba844ba2d9e501654316"
      ],
      "author": {
        "name": "Pavel Emelyanov",
        "email": "xemul@openvz.org",
        "time": "Thu Oct 18 23:40:14 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri Oct 19 11:53:40 2007 -0700"
      },
      "message": "pid namespaces: changes to show virtual ids to user\n\nThis is the largest patch in the set. Make all (I hope) the places where\nthe pid is shown to or get from user operate on the virtual pids.\n\nThe idea is:\n - all in-kernel data structures must store either struct pid itself\n   or the pid\u0027s global nr, obtained with pid_nr() call;\n - when seeking the task from kernel code with the stored id one\n   should use find_task_by_pid() call that works with global pids;\n - when showing pid\u0027s numerical value to the user the virtual one\n   should be used, but however when one shows task\u0027s pid outside this\n   task\u0027s namespace the global one is to be used;\n - when getting the pid from userspace one need to consider this as\n   the virtual one and use appropriate task/pid-searching functions.\n\n[akpm@linux-foundation.org: build fix]\n[akpm@linux-foundation.org: nuther build fix]\n[akpm@linux-foundation.org: yet nuther build fix]\n[akpm@linux-foundation.org: remove unneeded casts]\nSigned-off-by: Pavel Emelyanov \u003cxemul@openvz.org\u003e\nSigned-off-by: Alexey Dobriyan \u003cadobriyan@openvz.org\u003e\nCc: Sukadev Bhattiprolu \u003csukadev@us.ibm.com\u003e\nCc: Oleg Nesterov \u003coleg@tv-sign.ru\u003e\nCc: Paul Menage \u003cmenage@google.com\u003e\nCc: \"Eric W. Biederman\" \u003cebiederm@xmission.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "9f96cb1e8bca179a92afa40dfc3c49990f1cfc71",
      "tree": "7d1f921f488aa570083420dc3846856b17a7b2b6",
      "parents": [
        "8792f961ba8057d9f27987def3600253a3ba060f"
      ],
      "author": {
        "name": "Martin Schwidefsky",
        "email": "schwidefsky@de.ibm.com",
        "time": "Mon Oct 01 01:20:13 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Mon Oct 01 07:52:23 2007 -0700"
      },
      "message": "robust futex thread exit race\n\nCalling handle_futex_death in exit_robust_list for the different robust\nmutexes of a thread basically frees the mutex.  Another thread might grab\nthe lock immediately which updates the next pointer of the mutex.\nfetch_robust_entry over the next pointer might therefore branch into the\nrobust mutex list of a different thread.  This can cause two problems: 1)\nsome mutexes held by the dead thread are not getting freed and 2) some\nmutexs held by a different thread are freed.\n\nThe next point need to be read before calling handle_futex_death.\n\nSigned-off-by: Martin Schwidefsky \u003cschwidefsky@de.ibm.com\u003e\nAcked-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nAcked-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "179c85ea53bef807621f335767e41e23f86f01df",
      "tree": "6320c1478ebe988b5251a92498836bf3d045642a",
      "parents": [
        "a570ab6f10462b062c28188b64377b8034235761"
      ],
      "author": {
        "name": "Arnd Bergmann",
        "email": "arnd@arndb.de",
        "time": "Tue Sep 11 15:23:49 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Tue Sep 11 17:21:20 2007 -0700"
      },
      "message": "futex_compat: fix list traversal bugs\n\nThe futex list traversal on the compat side appears to have\na bug.\n\nIt\u0027s loop termination condition compares:\n\n        while (compat_ptr(uentry) !\u003d \u0026head-\u003elist)\n\nBut that can\u0027t be right because \"uentry\" has the special\n\"pi\" indicator bit still potentially set at bit 0.  This\nis cleared by fetch_robust_entry() into the \"entry\"\nreturn value.\n\nWhat this seems to mean is that the list won\u0027t terminate\nwhen list iteration gets back to the the head.  And we\u0027ll\nalso process the list head like a normal entry, which could\ncause all kinds of problems.\n\nSo we should check for equality with \"entry\".  That pointer\nis of the non-compat type so we have to do a little casting\nto keep the compiler and sparse happy.\n\nThe same problem can in theory occur with the \u0027pending\u0027\nvariable, although that has not been reported from users\nso far.\n\nBased on the original patch from David Miller.\n\nAcked-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: David Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Arnd Bergmann \u003carnd@arndb.de\u003e\nCc: \u003cstable@kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bd197234b0a616c8f04f6b682326a5a24b33ca92",
      "tree": "1c31f8934b0d5472c9038c042ff27d08b52ffdc6",
      "parents": [
        "188e1f81ba31af1b65a2f3611df4c670b092bbac"
      ],
      "author": {
        "name": "Thomas Gleixner",
        "email": "tglx@linutronix.de",
        "time": "Sun Jun 17 21:11:10 2007 +0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Mon Jun 18 09:48:41 2007 -0700"
      },
      "message": "Revert \"futex_requeue_pi optimization\"\n\nThis reverts commit d0aa7a70bf03b9de9e995ab272293be1f7937822.\n\nIt not only introduced user space visible changes to the futex syscall,\nit is also non-functional and there is no way to fix it proper before\nthe 2.6.22 release.\n\nThe breakage report ( http://lkml.org/lkml/2007/5/12/17 ) went\nunanswered, and unfortunately it turned out that the concept is not\nfeasible at all.  It violates the rtmutex semantics badly by introducing\na virtual owner, which hacks around the coupling of the user-space\npi_futex and the kernel internal rt_mutex representation.\n\nAt the moment the only safe option is to remove it fully as it contains\nuser-space visible changes to broken kernel code, which we do not want\nto expose in the 2.6.22 release.\n\nThe patch reverts the original patch mostly 1:1, but contains a couple\nof trivial manual cleanups which were necessary due to patches, which\ntouched the same area of code later.\n\nVerified against the glibc tests and my own PI futex tests.\n\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nAcked-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nAcked-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nCc: Pierre Peiffer \u003cpierre.peiffer@bull.net\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "f0ede66fca23cfee4ee80b48298007d930f49bbe",
      "tree": "2deb9337847d472fe776d00bc4f53c7a82d0aea9",
      "parents": [
        "b9e82af823c10d8f981072e0d7c3a8a31f73e0bd"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Fri Jun 01 00:46:41 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri Jun 01 08:18:28 2007 -0700"
      },
      "message": "fix compat futex code for private futexes\n\nWhen the private futex support was added the compat code wasn\u0027t changed.\nThe result is that code using compat code which fail, e.g., because the\ntimeout values are not correctly passed.  The following patch should fix\nthat.\n\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nCc: Eric Dumazet \u003cdada1@cosmosbay.com\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d0aa7a70bf03b9de9e995ab272293be1f7937822",
      "tree": "194b30b7b8374b946f166996cb99fb95eb3b7819",
      "parents": [
        "c19384b5b296905d4988c7c684ff540a0f9d65be"
      ],
      "author": {
        "name": "Pierre Peiffer",
        "email": "pierre.peiffer@bull.net",
        "time": "Wed May 09 02:35:02 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed May 09 12:30:55 2007 -0700"
      },
      "message": "futex_requeue_pi optimization\n\nThis patch provides the futex_requeue_pi functionality, which allows some\nthreads waiting on a normal futex to be requeued on the wait-queue of a\nPI-futex.\n\nThis provides an optimization, already used for (normal) futexes, to be used\nwith the PI-futexes.\n\nThis optimization is currently used by the glibc in pthread_broadcast, when\nusing \"normal\" mutexes.  With futex_requeue_pi, it can be used with\nPRIO_INHERIT mutexes too.\n\nSigned-off-by: Pierre Peiffer \u003cpierre.peiffer@bull.net\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "c19384b5b296905d4988c7c684ff540a0f9d65be",
      "tree": "071cfe0855d409d63de80ec1b9b663738efb09de",
      "parents": [
        "ec92d08292d3e9b0823eba138a4564d2d39f25c7"
      ],
      "author": {
        "name": "Pierre Peiffer",
        "email": "pierre.peiffer@bull.net",
        "time": "Wed May 09 02:35:02 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Wed May 09 12:30:55 2007 -0700"
      },
      "message": "Make futex_wait() use an hrtimer for timeout\n\nThis patch modifies futex_wait() to use an hrtimer + schedule() in place of\nschedule_timeout().\n\nschedule_timeout() is tick based, therefore the timeout granularity is the\ntick (1 ms, 4 ms or 10 ms depending on HZ).  By using a high resolution timer\nfor timeout wakeup, we can attain a much finer timeout granularity (in the\nmicrosecond range).  This parallels what is already done for futex_lock_pi().\n\nThe timeout passed to the syscall is no longer converted to jiffies and is\ntherefore passed to do_futex() and futex_wait() as an absolute ktime_t\ntherefore keeping nanosecond resolution.\n\nAlso this removes the need to pass the nanoseconds timeout part to\nfutex_lock_pi() in val2.\n\nIn futex_wait(), if there is no timeout then a regular schedule() is\nperformed.  Otherwise, an hrtimer is fired before schedule() is called.\n\n[akpm@linux-foundation.org: fix `make headers_check\u0027]\nSigned-off-by: Sebastien Dugue \u003csebastien.dugue@bull.net\u003e\nSigned-off-by: Pierre Peiffer \u003cpierre.peiffer@bull.net\u003e\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "ba46df984b8e8114c3cf19c51670fab084bd4196",
      "tree": "ed41e3a2278dfc22bd7fda59e99d8c74af8f429d",
      "parents": [
        "28c4dadd3a7221f5b9cd5c7d03c499788b193353"
      ],
      "author": {
        "name": "Al Viro",
        "email": "viro@ftp.linux.org.uk",
        "time": "Tue Oct 10 22:46:07 2006 +0100"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Tue Oct 10 15:37:22 2006 -0700"
      },
      "message": "[PATCH] __user annotations: futex\n\nSigned-off-by: Al Viro \u003cviro@zeniv.linux.org.uk\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "ce2c6b53847afc444c4d0a7a1075c61f499c57a5",
      "tree": "ad7e920292169f1febcf0cdc12375a8473d75337",
      "parents": [
        "2b8de5f50e4a302b83ebcd5b0120621336d50bd6"
      ],
      "author": {
        "name": "Thomas Gleixner",
        "email": "tglx@linutronix.de",
        "time": "Sat Aug 05 12:15:15 2006 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Sun Aug 06 08:57:49 2006 -0700"
      },
      "message": "[PATCH] futex: Apply recent futex fixes to futex_compat\n\nThe recent fixups in futex.c need to be applied to futex_compat.c too.  Fixes\na hang reported by Olaf.\n\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Olaf Hering \u003colh@suse.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "e3f2ddeac718c768fdac4b7fe69d465172f788a8",
      "tree": "5428532dc6c87710c35a71858425f6d726f0e44c",
      "parents": [
        "627371d73cdd04ed23fe098755b4f855138ad9e0"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Sat Jul 29 05:17:57 2006 +0200"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Fri Jul 28 21:02:00 2006 -0700"
      },
      "message": "[PATCH] pi-futex: robust-futex exit\n\nFix robust PI-futexes to be properly unlocked on unexpected exit.\n\nFor this to work the kernel has to know whether a futex is a PI or a\nnon-PI one, because the semantics are different.  Since the space in\nrelevant glibc data structures is extremely scarce, the best solution is\nto encode the \u0027PI\u0027 information in bit 0 of the robust list pointer.\nExisting (non-PI) glibc robust futexes have this bit always zero, so the\nABI is kept.  New glibc with PI-robust-futexes will set this bit.\n\nFurther fixes from Thomas Gleixner \u003ctglx@linutronix.de\u003e\n\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "c87e2837be82df479a6bae9f155c43516d2feebc",
      "tree": "ad6ab35f0b78f71abaa7b05185e9e3f97809c6de",
      "parents": [
        "0cdbee9920fb37eb2dc49b860c2b28862d647adc"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Tue Jun 27 02:54:58 2006 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Tue Jun 27 17:32:47 2006 -0700"
      },
      "message": "[PATCH] pi-futex: futex_lock_pi/futex_unlock_pi support\n\nThis adds the actual pi-futex implementation, based on rt-mutexes.\n\n[dino@in.ibm.com: fix an oops-causing race]\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Arjan van de Ven \u003carjan@linux.intel.com\u003e\nSigned-off-by: Dinakar Guniguntala \u003cdino@in.ibm.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "e2970f2fb6950183a34e8545faa093eb49d186e1",
      "tree": "a4035274368d846488a3b0152925502c06b064b0",
      "parents": [
        "66e5393a78b3fcca63e7748e38221dcca61c4aab"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Tue Jun 27 02:54:47 2006 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Tue Jun 27 17:32:46 2006 -0700"
      },
      "message": "[PATCH] pi-futex: futex code cleanups\n\nWe are pleased to announce \"lightweight userspace priority inheritance\" (PI)\nsupport for futexes.  The following patchset and glibc patch implements it,\nontop of the robust-futexes patchset which is included in 2.6.16-mm1.\n\nWe are calling it lightweight for 3 reasons:\n\n - in the user-space fastpath a PI-enabled futex involves no kernel work\n   (or any other PI complexity) at all.  No registration, no extra kernel\n   calls - just pure fast atomic ops in userspace.\n\n - in the slowpath (in the lock-contention case), the system call and\n   scheduling pattern is in fact better than that of normal futexes, due to\n   the \u0027integrated\u0027 nature of FUTEX_LOCK_PI.  [more about that further down]\n\n - the in-kernel PI implementation is streamlined around the mutex\n   abstraction, with strict rules that keep the implementation relatively\n   simple: only a single owner may own a lock (i.e.  no read-write lock\n   support), only the owner may unlock a lock, no recursive locking, etc.\n\n  Priority Inheritance - why, oh why???\n  -------------------------------------\n\nMany of you heard the horror stories about the evil PI code circling Linux for\nyears, which makes no real sense at all and is only used by buggy applications\nand which has horrible overhead.  Some of you have dreaded this very moment,\nwhen someone actually submits working PI code ;-)\n\nSo why would we like to see PI support for futexes?\n\nWe\u0027d like to see it done purely for technological reasons.  We dont think it\u0027s\na buggy concept, we think it\u0027s useful functionality to offer to applications,\nwhich functionality cannot be achieved in other ways.  We also think it\u0027s the\nright thing to do, and we think we\u0027ve got the right arguments and the right\nnumbers to prove that.  We also believe that we can address all the\ncounter-arguments as well.  For these reasons (and the reasons outlined below)\nwe are submitting this patch-set for upstream kernel inclusion.\n\nWhat are the benefits of PI?\n\n  The short reply:\n  ----------------\n\nUser-space PI helps achieving/improving determinism for user-space\napplications.  In the best-case, it can help achieve determinism and\nwell-bound latencies.  Even in the worst-case, PI will improve the statistical\ndistribution of locking related application delays.\n\n  The longer reply:\n  -----------------\n\nFirstly, sharing locks between multiple tasks is a common programming\ntechnique that often cannot be replaced with lockless algorithms.  As we can\nsee it in the kernel [which is a quite complex program in itself], lockless\nstructures are rather the exception than the norm - the current ratio of\nlockless vs.  locky code for shared data structures is somewhere between 1:10\nand 1:100.  Lockless is hard, and the complexity of lockless algorithms often\nendangers to ability to do robust reviews of said code.  I.e.  critical RT\napps often choose lock structures to protect critical data structures, instead\nof lockless algorithms.  Furthermore, there are cases (like shared hardware,\nor other resource limits) where lockless access is mathematically impossible.\n\nMedia players (such as Jack) are an example of reasonable application design\nwith multiple tasks (with multiple priority levels) sharing short-held locks:\nfor example, a highprio audio playback thread is combined with medium-prio\nconstruct-audio-data threads and low-prio display-colory-stuff threads.  Add\nvideo and decoding to the mix and we\u0027ve got even more priority levels.\n\nSo once we accept that synchronization objects (locks) are an unavoidable fact\nof life, and once we accept that multi-task userspace apps have a very fair\nexpectation of being able to use locks, we\u0027ve got to think about how to offer\nthe option of a deterministic locking implementation to user-space.\n\nMost of the technical counter-arguments against doing priority inheritance\nonly apply to kernel-space locks.  But user-space locks are different, there\nwe cannot disable interrupts or make the task non-preemptible in a critical\nsection, so the \u0027use spinlocks\u0027 argument does not apply (user-space spinlocks\nhave the same priority inversion problems as other user-space locking\nconstructs).  Fact is, pretty much the only technique that currently enables\ngood determinism for userspace locks (such as futex-based pthread mutexes) is\npriority inheritance:\n\nCurrently (without PI), if a high-prio and a low-prio task shares a lock [this\nis a quite common scenario for most non-trivial RT applications], even if all\ncritical sections are coded carefully to be deterministic (i.e.  all critical\nsections are short in duration and only execute a limited number of\ninstructions), the kernel cannot guarantee any deterministic execution of the\nhigh-prio task: any medium-priority task could preempt the low-prio task while\nit holds the shared lock and executes the critical section, and could delay it\nindefinitely.\n\n  Implementation:\n  ---------------\n\nAs mentioned before, the userspace fastpath of PI-enabled pthread mutexes\ninvolves no kernel work at all - they behave quite similarly to normal\nfutex-based locks: a 0 value means unlocked, and a value\u003d\u003dTID means locked.\n(This is the same method as used by list-based robust futexes.) Userspace uses\natomic ops to lock/unlock these mutexes without entering the kernel.\n\nTo handle the slowpath, we have added two new futex ops:\n\n  FUTEX_LOCK_PI\n  FUTEX_UNLOCK_PI\n\nIf the lock-acquire fastpath fails, [i.e.  an atomic transition from 0 to TID\nfails], then FUTEX_LOCK_PI is called.  The kernel does all the remaining work:\nif there is no futex-queue attached to the futex address yet then the code\nlooks up the task that owns the futex [it has put its own TID into the futex\nvalue], and attaches a \u0027PI state\u0027 structure to the futex-queue.  The pi_state\nincludes an rt-mutex, which is a PI-aware, kernel-based synchronization\nobject.  The \u0027other\u0027 task is made the owner of the rt-mutex, and the\nFUTEX_WAITERS bit is atomically set in the futex value.  Then this task tries\nto lock the rt-mutex, on which it blocks.  Once it returns, it has the mutex\nacquired, and it sets the futex value to its own TID and returns.  Userspace\nhas no other work to perform - it now owns the lock, and futex value contains\nFUTEX_WAITERS|TID.\n\nIf the unlock side fastpath succeeds, [i.e.  userspace manages to do a TID -\u003e\n0 atomic transition of the futex value], then no kernel work is triggered.\n\nIf the unlock fastpath fails (because the FUTEX_WAITERS bit is set), then\nFUTEX_UNLOCK_PI is called, and the kernel unlocks the futex on the behalf of\nuserspace - and it also unlocks the attached pi_state-\u003ert_mutex and thus wakes\nup any potential waiters.\n\nNote that under this approach, contrary to other PI-futex approaches, there is\nno prior \u0027registration\u0027 of a PI-futex.  [which is not quite possible anyway,\ndue to existing ABI properties of pthread mutexes.]\n\nAlso, under this scheme, \u0027robustness\u0027 and \u0027PI\u0027 are two orthogonal properties\nof futexes, and all four combinations are possible: futex, robust-futex,\nPI-futex, robust+PI-futex.\n\n  glibc support:\n  --------------\n\nUlrich Drepper and Jakub Jelinek have written glibc support for PI-futexes\n(and robust futexes), enabling robust and PI (PTHREAD_PRIO_INHERIT) POSIX\nmutexes.  (PTHREAD_PRIO_PROTECT support will be added later on too, no\nadditional kernel changes are needed for that).  [NOTE: The glibc patch is\nobviously inofficial and unsupported without matching upstream kernel\nfunctionality.]\n\nthe patch-queue and the glibc patch can also be downloaded from:\n\n  http://redhat.com/~mingo/PI-futex-patches/\n\nMany thanks go to the people who helped us create this kernel feature: Steven\nRostedt, Esben Nielsen, Benedikt Spranger, Daniel Walker, John Cooper, Arjan\nvan de Ven, Oleg Nesterov and others.  Credits for related prior projects goes\nto Dirk Grambow, Inaky Perez-Gonzalez, Bill Huey and many others.\n\nClean up the futex code, before adding more features to it:\n\n - use u32 as the futex field type - that\u0027s the ABI\n - use __user and pointers to u32 instead of unsigned long\n - code style / comment style cleanups\n - rename hash-bucket name from \u0027bh\u0027 to \u0027hb\u0027.\n\nI checked the pre and post futex.o object files to make sure this\npatch has no code effects.\n\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Arjan van de Ven \u003carjan@linux.intel.com\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nCc: Jakub Jelinek \u003cjakub@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "9741ef964dc8bfeb6520825df9fed8f538c3336e",
      "tree": "6cc09d6b10a9ea9119a3a73e226300d747008bfe",
      "parents": [
        "d425b274ba83ba4e7746a40446ec0ba3267de51f"
      ],
      "author": {
        "name": "Thomas Gleixner",
        "email": "tglx@linutronix.de",
        "time": "Fri Mar 31 02:31:32 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Fri Mar 31 12:18:59 2006 -0800"
      },
      "message": "[PATCH] futex: check and validate timevals\n\nThe futex timeval is not checked for correctness.  The change does not\nbreak existing applications as the timeval is supplied by glibc (and glibc\nalways passes a correct value), but the glibc-internal tests for this\nfunctionality fail.\n\nSigned-off-by: Thomas Gleixner \u003ctglx@tglx.de\u003e\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "ec7e15d6486e9d1da1c2f344b670b8388ba7019b",
      "tree": "479d803ee546b536521dc87095c31781a98a0bb6",
      "parents": [
        "4fa95ef639830ccf0ca1ad42ee9bed87ef642f32"
      ],
      "author": {
        "name": "Andrew Morton",
        "email": "akpm@osdl.org",
        "time": "Tue Mar 28 01:56:55 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Tue Mar 28 09:16:09 2006 -0800"
      },
      "message": "[PATCH] compat_sys_futex() warning fix\n\nkernel/futex_compat.c: In function `compat_sys_futex\u0027:\nkernel/futex_compat.c:140: warning: passing arg 1 of `do_futex\u0027 makes integer from pointer without a cast\nkernel/futex_compat.c:140: warning: passing arg 5 of `do_futex\u0027 makes integer from pointer without a cast\n\nNot sure what Ingo was thinking of here.  Put the casts back in.\n\nCc: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "8f17d3a5049d32392b79925c73a0cf99ce6d5af0",
      "tree": "3c2aa0cbe337684d353dd2cfb0c177b4ae15217c",
      "parents": [
        "8fdd6c6df7889dc89df3d9fe0f5bbe6733e39f48"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Mon Mar 27 01:16:27 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Mon Mar 27 08:44:49 2006 -0800"
      },
      "message": "[PATCH] lightweight robust futexes updates\n\n- fix: initialize the robust list(s) to NULL in copy_process.\n\n- doc update\n\n- cleanup: rename _inuser to _inatomic\n\n- __user cleanups and other small cleanups\n\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nCc: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nCc: Arjan van de Ven \u003carjan@infradead.org\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nCc: Andi Kleen \u003cak@muc.de\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    },
    {
      "commit": "34f192c6527f20c47ccec239e7d51a27691b93fc",
      "tree": "6c80416cf6a170a193f829e414051cc618b15ee3",
      "parents": [
        "2eec9ad91f71a3dbacece5c4fb5adc09fad53a96"
      ],
      "author": {
        "name": "Ingo Molnar",
        "email": "mingo@elte.hu",
        "time": "Mon Mar 27 01:16:24 2006 -0800"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@g5.osdl.org",
        "time": "Mon Mar 27 08:44:49 2006 -0800"
      },
      "message": "[PATCH] lightweight robust futexes: compat\n\n32-bit syscall compatibility support.  (This patch also moves all futex\nrelated compat functionality into kernel/futex_compat.c.)\n\nSigned-off-by: Ingo Molnar \u003cmingo@elte.hu\u003e\nSigned-off-by: Thomas Gleixner \u003ctglx@linutronix.de\u003e\nSigned-off-by: Arjan van de Ven \u003carjan@infradead.org\u003e\nAcked-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n"
    }
  ]
}
