1. 08 Apr, 2009 2 commits
    • Christoph Lameter's avatar
      percpu: remove rbtree and use page->index instead · e1b9aa3f
      Christoph Lameter authored
      Impact: use page->index for addr to chunk mapping instead of dedicated rbtree
      
      The rbtree is used to determine the chunk from the virtual address.
      However, we can already determine the page struct from a virtual
      address and there are several unused fields in page struct used by
      vmalloc.  Use the index field to store a pointer to the chunk. Then
      there is no need anymore for an rbtree.
      
      tj: * s/(set|get)_chunk/pcpu_\1_page_chunk/
      
          * Drop inline from the above two functions and moved them upwards
            so that they are with other simple helpers.
      
          * Initial pages might not (actually most of the time don't) live
            in the vmalloc area.  With the previous patch to manually
            reverse-map both first chunks, this is no longer an issue.
            Removed pcpu_set_chunk() call on initial pages.
      Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: rusty@rustcorp.com.au
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: rmk@arm.linux.org.uk
      Cc: starvik@axis.com
      Cc: ralf@linux-mips.org
      Cc: davem@davemloft.net
      Cc: cooloney@kernel.org
      Cc: kyle@mcmartin.ca
      Cc: matthew@wil.cx
      Cc: grundler@parisc-linux.org
      Cc: takata@linux-m32r.org
      Cc: benh@kernel.crashing.org
      Cc: rth@twiddle.net
      Cc: ink@jurassic.park.msu.ru
      Cc: heiko.carstens@de.ibm.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nick Piggin <npiggin@suse.de>
      LKML-Reference: <49D43D58.4050102@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e1b9aa3f
    • Tejun Heo's avatar
      percpu: don't put the first chunk in reverse-map rbtree · ae9e6bc9
      Tejun Heo authored
      Impact: both first chunks don't use rbtree, no functional change
      
      There can be two first chunks - reserved and dynamic with the former
      one being optional.  Dynamic first chunk was linked on reverse-mapping
      rbtree while the reserved one was mapped manually using the start
      address and reserved offset limit.
      
      This patch makes both first chunks to be looked up manually without
      using the rbtree.  This is to help getting rid of the rbtree.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: rusty@rustcorp.com.au
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: rmk@arm.linux.org.uk
      Cc: starvik@axis.com
      Cc: ralf@linux-mips.org
      Cc: davem@davemloft.net
      Cc: cooloney@kernel.org
      Cc: kyle@mcmartin.ca
      Cc: matthew@wil.cx
      Cc: grundler@parisc-linux.org
      Cc: takata@linux-m32r.org
      Cc: benh@kernel.crashing.org
      Cc: rth@twiddle.net
      Cc: ink@jurassic.park.msu.ru
      Cc: heiko.carstens@de.ibm.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Christoph Lameter <cl@linux.com>
      LKML-Reference: <49D43CEA.3040609@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ae9e6bc9
  2. 07 Apr, 2009 38 commits