mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
locking/lockdep: Rework FS_RECLAIM annotation
A while ago someone, and I cannot find the email just now, asked if we could not implement the RECLAIM_FS inversion stuff with a 'fake' lock like we use for other things like workqueues etc. I think this should be possible which allows reducing the 'irq' states and will reduce the amount of __bfs() lookups we do. Removing the 1 IRQ state results in 4 less __bfs() walks per dependency, improving lockdep performance. And by moving this annotation out of the lockdep code it becomes easier for the mm people to extend. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Byungchul Park <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Nikolay Borisov <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
a9668cd6ee
commit
d92a8cfcb3
10 changed files with 75 additions and 120 deletions
|
|
@ -432,7 +432,8 @@ __do_kmalloc_node(size_t size, gfp_t gfp, int node, unsigned long caller)
|
|||
|
||||
gfp &= gfp_allowed_mask;
|
||||
|
||||
lockdep_trace_alloc(gfp);
|
||||
fs_reclaim_acquire(gfp);
|
||||
fs_reclaim_release(gfp);
|
||||
|
||||
if (size < PAGE_SIZE - align) {
|
||||
if (!size)
|
||||
|
|
@ -538,7 +539,8 @@ static void *slob_alloc_node(struct kmem_cache *c, gfp_t flags, int node)
|
|||
|
||||
flags &= gfp_allowed_mask;
|
||||
|
||||
lockdep_trace_alloc(flags);
|
||||
fs_reclaim_acquire(flags);
|
||||
fs_reclaim_release(flags);
|
||||
|
||||
if (c->size < PAGE_SIZE) {
|
||||
b = slob_alloc(c->size, flags, c->align, node);
|
||||
|
|
|
|||
Loading…
Reference in a new issue