1. 12 Mar, 2011 1 commit
  2. 11 Mar, 2011 8 commits
    • Lai Jiangshan's avatar
      plist: Add priority list test · 6d55da53
      Lai Jiangshan authored
      Add test code for checking plist when the kernel is booting.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <4D107986.1010302@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      6d55da53
    • Lai Jiangshan's avatar
      plist: Shrink struct plist_head · bf6a9b83
      Lai Jiangshan authored
      struct plist_head is used in struct task_struct as well as struct
      rtmutex. If we can make it smaller, it will also make these structures
      smaller as well.
      
      The field prio_list in struct plist_head is seldom used and we can get
      its information from the plist_nodes. Removing this field will decrease
      the size of plist_head by half.
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <4D107982.9090700@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      bf6a9b83
    • Lai Jiangshan's avatar
      futex,plist: Remove debug lock assignment from plist_node · 017f2b23
      Lai Jiangshan authored
      The original code uses &plist_node->plist as the fake head of
      the priority list for plist_del(), these debug locks in
      the fake head are needed for CONFIG_DEBUG_PI_LIST.
      
      But now we always pass the real head to plist_del(), the debug locks
      in plist_node will not be used, so we remove these assignments.
      Acked-by: default avatarDarren Hart <dvhart@linux.intel.com>
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <4D10797E.7040803@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      017f2b23
    • Lai Jiangshan's avatar
      futex,plist: Pass the real head of the priority list to plist_del() · 2e12978a
      Lai Jiangshan authored
      Some plist_del()s in kernel/futex.c are passed a faked head of the
      priority list.
      
      It does not fail because the current code does not require the real head
      in plist_del(). The current code of plist_del() just uses the head for checking,
      so it will not cause a bad result even when we use a faked head.
      
      But it is undocumented usage:
      
      /**
       * plist_del - Remove a @node from plist.
       *
       * @node:	&struct plist_node pointer - entry to be removed
       * @head:	&struct plist_head pointer - list head
       */
      
      The document says that the @head is the "list head" head of the priority list.
      
      In futex code, several places use "plist_del(&q->list, &q->list.plist);",
      they pass a fake head. We need to fix them all.
      
      Thanks to Darren Hart for many suggestions.
      Acked-by: default avatarDarren Hart <dvhart@linux.intel.com>
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      LKML-Reference: <4D11984A.5030203@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      2e12978a
    • Michel Lespinasse's avatar
      futex: Sanitize futex ops argument types · 8d7718aa
      Michel Lespinasse authored
      Change futex_atomic_op_inuser and futex_atomic_cmpxchg_inatomic
      prototypes to use u32 types for the futex as this is the data type the
      futex core code uses all over the place.
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311025058.GD26122@google.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      8d7718aa
    • Michel Lespinasse's avatar
      futex: Sanitize cmpxchg_futex_value_locked API · 37a9d912
      Michel Lespinasse authored
      The cmpxchg_futex_value_locked API was funny in that it returned either
      the original, user-exposed futex value OR an error code such as -EFAULT.
      This was confusing at best, and could be a source of livelocks in places
      that retry the cmpxchg_futex_value_locked after trying to fix the issue
      by running fault_in_user_writeable().
          
      This change makes the cmpxchg_futex_value_locked API more similar to the
      get_futex_value_locked one, returning an error code and updating the
      original value through a reference argument.
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Acked-by: Chris Metcalf <cmetcalf@tilera.com>  [tile]
      Acked-by: Tony Luck <tony.luck@intel.com>  [ia64]
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Tested-by: Michal Simek <monstr@monstr.eu>  [microblaze]
      Acked-by: David Howells <dhowells@redhat.com> [frv]
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311024851.GC26122@google.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      37a9d912
    • Michel Lespinasse's avatar
      futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic() · 522d7dec
      Michel Lespinasse authored
      kernel/futex.c disables page faults before calling
      futex_atomic_cmpxchg_inatomic(), so there is no need to do it again
      within that function.
      Signed-off-by: default avatarMichel Lespinasse <walken@google.com>
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311024731.GB26122@google.com>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      522d7dec
    • Thomas Gleixner's avatar
      futex: Avoid redudant evaluation of task_pid_vnr() · c0c9ed15
      Thomas Gleixner authored
      The result is not going to change under us, so no need to reevaluate
      this over and over. Seems to be a leftover from the mechanical mass
      conversion of task->pid to task_pid_vnr(tsk).
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c0c9ed15
  3. 10 Mar, 2011 1 commit
  4. 08 Mar, 2011 5 commits
  5. 07 Mar, 2011 9 commits
  6. 06 Mar, 2011 5 commits
  7. 05 Mar, 2011 11 commits