]> git.baikalelectronics.ru Git - kernel.git/commit
z3fold: use per-page spinlock
authorVitaly Wool <vitalywool@gmail.com>
Fri, 24 Feb 2017 22:57:23 +0000 (14:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2017 01:46:54 +0000 (17:46 -0800)
commit087fd83d5ba0dc6081f66610321c211b1ccee9ce
treed7e421b9780b1106c9bc29db1d5f451ad4f0b9a3
parentb29d2a82aa653a4fc78f6174d4c12b879737cf99
z3fold: use per-page spinlock

Most of z3fold operations are in-page, such as modifying z3fold page
header or moving z3fold objects within a page.  Taking per-pool spinlock
to protect per-page objects is therefore suboptimal, and the idea of
having a per-page spinlock (or rwlock) has been around for some time.

This patch implements spinlock-based per-page locking mechanism which is
lightweight enough to normally fit ok into the z3fold header.

Link: http://lkml.kernel.org/r/20170131214438.433e0a5fda908337b63206d3@gmail.com
Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Reviewed-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/z3fold.c