1
0
Fork 0
alistair23-linux/include
Huang Ying 5d5e8f1954 mm, swap, get_swap_pages: use entry_size instead of cluster in parameter
As suggested by Matthew Wilcox, it is better to use "int entry_size"
instead of "bool cluster" as parameter to specify whether to operate for
huge or normal swap entries.  Because this improve the flexibility to
support other swap entry size.  And Dave Hansen thinks that this
improves code readability too.

So in this patch, the "bool cluster" parameter of get_swap_pages() is
replaced by "int entry_size".

And nr_swap_entries() trick is used to reduce the binary size when
!CONFIG_TRANSPARENT_HUGE_PAGE.

       text	   data	    bss	    dec	    hex	filename
base  24215	   2028	    340	  26583	   67d7	mm/swapfile.o
head  24123	   2004	    340	  26467	   6763	mm/swapfile.o

Link: http://lkml.kernel.org/r/20180720071845.17920-7-ying.huang@intel.com
Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
Suggested-by: Matthew Wilcox <willy@infradead.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shaohua Li <shli@kernel.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-08-22 10:52:44 -07:00
..
acpi Merge branches 'acpi-x86', 'acpi-bus', 'acpi-ec' and 'acpi-apei' 2018-08-14 10:06:45 +02:00
asm-generic Driver core patches for 4.19-rc1 2018-08-18 11:44:53 -07:00
clocksource
crypto crypto: scatterwalk - remove scatterwalk_samebuf() 2018-08-03 18:06:04 +08:00
drm drm pull for 4.19-rc1 2018-08-15 17:39:07 -07:00
dt-bindings Staging/IIO patches for 4.19-rc1 2018-08-18 11:00:00 -07:00
keys
kvm
linux mm, swap, get_swap_pages: use entry_size instead of cluster in parameter 2018-08-22 10:52:44 -07:00
math-emu
media - New Drivers 2018-08-20 15:38:44 -07:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-08-19 11:51:45 -07:00
pcmcia pcmcia: remove long deprecated pcmcia_request_exclusive_irq() function 2018-08-18 12:30:42 -07:00
ras
rdma Revert "net/smc: Replace ib_query_gid with rdma_get_gid_attr" 2018-08-16 14:03:34 -06:00
scsi SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
soc drivers: qcom: rpmh: add support for batch RPMH request 2018-07-21 13:33:36 -05:00
sound ASoC: Updates for v4.19 2018-08-13 12:12:31 +02:00
target scsi: target: add session removal function 2018-08-02 15:29:31 -04:00
trace Updates for v4.19: 2018-08-20 18:32:00 -07:00
uapi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2018-08-20 15:59:01 -07:00
video drm: Add support for pps and compression mode command packet 2018-07-25 07:51:05 -04:00
xen Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2018-08-18 16:48:07 -07:00