1
0
Fork 0
remarkable-linux/include
Hugh Dickins 9d5e6a9f22 mm: update_lru_size do the __mod_zone_page_state
Konstantin Khlebnikov pointed out (nearly four years ago, when lumpy
reclaim was removed) that lru_size can be updated by -nr_taken once per
call to isolate_lru_pages(), instead of page by page.

Update it inside isolate_lru_pages(), or at its two callsites? I chose
to update it at the callsites, rearranging and grouping the updates by
nr_taken and nr_scanned together in both.

With one exception, mem_cgroup_update_lru_size(,lru,) is then used where
__mod_zone_page_state(,NR_LRU_BASE+lru,) is used; and we shall be adding
some more calls in a future commit.  Make the code a little smaller and
simpler by incorporating stat update in lru_size update.

The exception was move_active_pages_to_lru(), which aggregated the
pgmoved stat update separately from the individual lru_size updates; but
I still think this a simplification worth making.

However, the __mod_zone_page_state is not peculiar to mem_cgroups: so
better use the name update_lru_size, calls mem_cgroup_update_lru_size
when CONFIG_MEMCG.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andres Lagar-Cavilla <andreslc@google.com>
Cc: Yang Shi <yang.shi@linaro.org>
Cc: Ning Qu <quning@gmail.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-19 19:12:14 -07:00
..
acpi Merge branches 'acpi-pci', 'acpi-misc' and 'acpi-tools' 2016-05-16 16:45:48 +02:00
asm-generic Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-05-16 15:15:17 -07:00
clocksource
crypto crypto: doc - document correct return value for request allocation 2016-04-15 22:35:44 +08:00
drm drm: Loongson-3 doesn't fully support wc memory 2016-04-22 10:24:11 +10:00
dt-bindings ARM: SoC driver updates for v4.7 2016-05-18 13:14:02 -07:00
keys
kvm
linux mm: update_lru_size do the __mod_zone_page_state 2016-05-19 19:12:14 -07:00
math-emu
media [media] media: rc: reduce size of struct ir_raw_event 2016-05-07 10:34:17 -03:00
memory
misc
net switchdev: pass pointer to fib_info instead of copy 2016-05-17 13:58:49 -04:00
pcmcia
ras
rdma IB/security: Restrict use of the write() interface 2016-04-28 12:03:16 -04:00
rxrpc rxrpc: Static arrays of strings should be const char *const[] 2016-04-11 15:34:40 -04:00
scsi lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c 2016-04-15 16:53:14 -04:00
soc ARM: SoC driver updates for v4.7 2016-05-18 13:14:02 -07:00
sound ALSA: hda - Update BCLK also at hotplug for i915 HSW/BDW 2016-04-26 10:11:11 +02:00
target target: add a new add_wwn_groups fabrics method 2016-03-30 20:06:44 -07:00
trace SCSI misc on 20160517 2016-05-18 16:38:59 -07:00
uapi media updates for v4.7-rc1 2016-05-18 17:03:51 -07:00
video gpu: ipu-v3: ipu-dmfc: Rename ipu_dmfc_init_channel to ipu_dmfc_config_wait4eot 2016-03-31 11:24:33 +02:00
xen xen: Fix page <-> pfn conversion on 32 bit systems 2016-04-06 11:18:17 +01:00
Kbuild