Files
android_kernel_xiaomi_sm8450/include/linux
Tim Chen 36005bae20 mm/swap: allocate swap slots in batches
Currently, the swap slots are allocated one page at a time, causing
contention to the swap_info lock protecting the swap partition on every
page being swapped.

This patch adds new functions get_swap_pages and scan_swap_map_slots to
request multiple swap slots at once.  This will reduces the lock
contention on the swap_info lock.  Also scan_swap_map_slots can operate
more efficiently as swap slots often occurs in clusters close to each
other on a swap device and it is quicker to allocate them together.

Link: http://lkml.kernel.org/r/9fec2845544371f62c3763d43510045e33d286a6.1484082593.git.tim.c.chen@linux.intel.com
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Aaron Lu <aaron.lu@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jonathan Corbet <corbet@lwn.net> escreveu:
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Shaohua Li <shli@kernel.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-22 16:41:30 -08:00
..
2017-01-30 14:39:20 +01:00
2016-11-17 23:19:00 +01:00
2017-02-06 18:20:16 +02:00
2016-12-22 22:58:37 -05:00
2016-10-19 14:34:36 -04:00
2017-02-10 15:52:24 -05:00
2017-01-25 13:17:47 -05:00
2016-12-08 13:31:11 -05:00
2016-08-11 09:41:35 -06:00
2016-10-25 11:08:28 +08:00
2016-12-08 16:37:33 -08:00
2017-02-04 00:47:59 +01:00
2016-10-07 18:46:30 -07:00
2016-12-05 19:01:16 -05:00
2016-10-28 08:48:16 -06:00
2016-11-25 10:15:13 -08:00
2016-12-05 19:01:16 -05:00
2016-12-25 17:21:22 +01:00
2017-02-10 11:15:08 +01:00
2017-02-11 20:59:41 -05:00
2016-11-30 14:36:01 +11:00
2016-09-14 09:18:09 -06:00
2017-02-01 09:13:45 +01:00
2016-08-10 11:23:44 -04:00
2016-12-12 18:55:06 -08:00
2016-12-25 17:21:23 +01:00
2016-09-27 12:33:47 +02:00
2016-12-06 11:05:46 +01:00
2017-01-12 16:48:26 -05:00
2016-07-29 12:17:52 -07:00
2016-08-28 23:32:41 -04:00
2016-11-16 18:32:02 -05:00
2016-12-19 17:29:44 -05:00
2016-12-12 18:55:07 -08:00
2017-02-22 16:41:29 -08:00
2016-12-06 10:17:03 +02:00
2017-02-20 10:15:11 -05:00
2016-10-31 16:18:30 -04:00
2016-10-14 11:36:59 -07:00
2016-09-27 21:52:00 -04:00
2016-11-15 16:34:27 -08:00
2017-02-17 12:28:35 -05:00
2016-10-31 15:45:18 -07:00
2017-01-09 16:07:38 -05:00
2016-10-05 18:23:36 -04:00
2017-02-22 16:41:30 -08:00
2017-02-03 11:19:34 -05:00
2016-12-25 17:21:22 +01:00
2017-02-10 11:15:08 +01:00
2017-01-10 18:31:55 -08:00
2017-02-03 10:17:02 +01:00
2016-12-09 22:12:21 -05:00
2017-02-10 16:34:17 +00:00
2016-12-12 18:55:08 -08:00
2017-01-11 09:21:41 +01:00
2016-12-25 17:21:22 +01:00