]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory-failure: do pgoff calculation before for_each_process()
authorXianting Tian <tian.xianting@h3c.com>
Tue, 13 Oct 2020 23:54:42 +0000 (16:54 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Oct 2020 01:38:32 +0000 (18:38 -0700)
commit387371c22d4f570929c200283f93a7a8939573d3
treefa6677e16c4c40e2564e6db9945a6d99b12302fb
parentb23c239d346944765f64b399a6ba46479985b774
mm/memory-failure: do pgoff calculation before for_each_process()

There is no need to calculate pgoff in each loop of for_each_process(), so
move it to the place before for_each_process(), which can save some CPU
cycles.

Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Link: http://lkml.kernel.org/r/20200818082647.34322-1-tian.xianting@h3c.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory-failure.c