linux/arch
Arun KS 3d6357de8a mm: reference totalram_pages and managed_pages once per function
Patch series "mm: convert totalram_pages, totalhigh_pages and managed
pages to atomic", v5.

This series converts totalram_pages, totalhigh_pages and
zone->managed_pages to atomic variables.

totalram_pages, zone->managed_pages and totalhigh_pages updates are
protected by managed_page_count_lock, but readers never care about it.
Convert these variables to atomic to avoid readers potentially seeing a
store tear.

Main motivation was that managed_page_count_lock handling was complicating
things.  It was discussed in length here,
https://lore.kernel.org/patchwork/patch/995739/#1181785 It seemes better
to remove the lock and convert variables to atomic.  With the change,
preventing poteintial store-to-read tearing comes as a bonus.

This patch (of 4):

This is in preparation to a later patch which converts totalram_pages and
zone->managed_pages to atomic variables.  Please note that re-reading the
value might lead to a different value and as such it could lead to
unexpected behavior.  There are no known bugs as a result of the current
code but it is better to prevent from them in principle.

Link: http://lkml.kernel.org/r/1542090790-21750-2-git-send-email-arunks@codeaurora.org
Signed-off-by: Arun KS <arunks@codeaurora.org>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-12-28 12:11:47 -08:00
..
alpha alpha: fix hang caused by the bootmem removal 2018-12-14 15:05:44 -08:00
arc Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-12-25 15:44:08 -08:00
arm Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-12-27 13:53:32 -08:00
arm64 kasan, arm64: select HAVE_ARCH_KASAN_SW_TAGS 2018-12-28 12:11:44 -08:00
c6x c6x changes for 4.20 2018-10-31 15:39:25 -07:00
csky csky: bugfix tlb_get_pgd error. 2018-12-03 10:49:11 +08:00
h8300 mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
hexagon mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
ia64 Change ia64 to make it easier to update system call tables 2018-12-26 10:21:11 -08:00
m68k m68k updates for v4.21 2018-12-26 10:16:55 -08:00
microblaze Microblaze patches for 5.0-rc1 2018-12-26 10:28:09 -08:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
nds32 nds32: function_graph: Simplify with function_graph_enter() 2018-11-27 20:30:43 -05:00
nios2 mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
openrisc mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
parisc parisc: generate uapi header and system call table files 2018-12-10 08:26:04 +01:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-12-27 13:04:52 -08:00
riscv RISC-V: Select GENERIC_SCHED_CLOCK for clocksource drivers 2018-12-21 08:17:19 -08:00
s390 kasan: rename kasan_zero_page to kasan_early_shadow_page 2018-12-28 12:11:43 -08:00
sh sh: lib: convert to SPDX identifiers 2018-12-28 12:11:45 -08:00
sparc Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2018-12-27 13:53:32 -08:00
um mm: reference totalram_pages and managed_pages once per function 2018-12-28 12:11:47 -08:00
unicore32 memblock: stop using implicit alignment to SMP_CACHE_BYTES 2018-10-31 08:54:16 -07:00
x86 mm: reference totalram_pages and managed_pages once per function 2018-12-28 12:11:47 -08:00
xtensa kasan: rename kasan_zero_page to kasan_early_shadow_page 2018-12-28 12:11:43 -08:00
.gitignore
Kconfig New gcc plugin: stackleak 2018-11-01 11:46:27 -07:00