summaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorChristoph Lameter2007-05-06 23:49:40 +0200
committerLinus Torvalds2007-05-07 21:12:53 +0200
commit6d7779538f765963ced45a3fa4bed7ba8d2c277d (patch)
tree07d47e6ff1ab30309004e2ba0674dcabd83945c1 /mm/slab.c
parentMake page->private usable in compound pages (diff)
downloadkernel-qcow2-linux-6d7779538f765963ced45a3fa4bed7ba8d2c277d.tar.gz
kernel-qcow2-linux-6d7779538f765963ced45a3fa4bed7ba8d2c277d.tar.xz
kernel-qcow2-linux-6d7779538f765963ced45a3fa4bed7ba8d2c277d.zip
mm: optimize compound_head() by avoiding a shared page flag
The patch adds PageTail(page) and PageHead(page) to check if a page is the head or the tail of a compound page. This is done by masking the two bits describing the state of a compound page and then comparing them. So one comparision and a branch instead of two bit checks and two branches. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.c')
0 files changed, 0 insertions, 0 deletions