]> git.baikalelectronics.ru Git - kernel.git/commit
mm: convert totalram_pages and totalhigh_pages variables to atomic
authorArun KS <arunks@codeaurora.org>
Fri, 28 Dec 2018 08:34:29 +0000 (00:34 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Dec 2018 20:11:47 +0000 (12:11 -0800)
commiteb366772d7bf3cb91470d74ac63df792c7bf4f6a
treea9198e85582744619903c85349583bb453fe36cb
parenta749c94b954e61ffb440f67116c1e44e71473acb
mm: convert totalram_pages and totalhigh_pages variables to atomic

totalram_pages and totalhigh_pages are made static inline function.

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 So it seemes
better to remove the lock and convert variables to atomic, with preventing
poteintial store-to-read tearing as a bonus.

[akpm@linux-foundation.org: coding style fixes]
Link: http://lkml.kernel.org/r/1542090790-21750-4-git-send-email-arunks@codeaurora.org
Signed-off-by: Arun KS <arunks@codeaurora.org>
Suggested-by: Michal Hocko <mhocko@suse.com>
Suggested-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Reviewed-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
53 files changed:
arch/csky/mm/init.c
arch/powerpc/platforms/pseries/cmm.c
arch/s390/mm/init.c
arch/um/kernel/mem.c
arch/x86/kernel/cpu/microcode/core.c
drivers/char/agp/backend.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
drivers/hv/hv_balloon.c
drivers/md/dm-bufio.c
drivers/md/dm-crypt.c
drivers/md/dm-integrity.c
drivers/md/dm-stats.c
drivers/media/platform/mtk-vpu/mtk_vpu.c
drivers/misc/vmw_balloon.c
drivers/parisc/ccio-dma.c
drivers/parisc/sba_iommu.c
drivers/staging/android/ion/ion_system_heap.c
drivers/xen/xen-selfballoon.c
fs/ceph/super.h
fs/file_table.c
fs/fuse/inode.c
fs/nfs/write.c
fs/nfsd/nfscache.c
fs/ntfs/malloc.h
fs/proc/base.c
include/linux/highmem.h
include/linux/mm.h
include/linux/swap.h
kernel/fork.c
kernel/kexec_core.c
kernel/power/snapshot.c
mm/highmem.c
mm/huge_memory.c
mm/kasan/quarantine.c
mm/memblock.c
mm/mm_init.c
mm/oom_kill.c
mm/page_alloc.c
mm/shmem.c
mm/slab.c
mm/swap.c
mm/util.c
mm/vmalloc.c
mm/workingset.c
mm/zswap.c
net/dccp/proto.c
net/decnet/dn_route.c
net/ipv4/tcp_metrics.c
net/netfilter/nf_conntrack_core.c
net/netfilter/xt_hashlimit.c
net/sctp/protocol.c
security/integrity/ima/ima_kexec.c