On 2018-11-06 14:07, Konstantin Khlebnikov wrote:Could you point what exactly are you fixing with this set?
On 06.11.2018 11:30, Arun KS wrote:
On 2018-11-06 13:47, Konstantin Khlebnikov wrote:
On 06.11.2018 8:38, Arun KS wrote:
Any comments?
Looks good.
Except unclear motivation behind this change.
This should be in comment of one of patch.
totalram_pages, zone->managed_pages and totalhigh_pages are sometimes modified outside managed_page_count_lock. Hence convert these variable to atomic to avoid readers potentially seeing a store tear.
So, this is just theoretical issue or splat from sanitizer.
After boot memory online\offline are strictly serialized by rw-semaphore.
Few instances which can race with hot add. Please see below,
https://patchwork.kernel.org/patch/10627521/
Regards,
Arun
Will update the comment.
Regards,
Arun
Reviewed-by: Konstantin Khlebnikov <khlebnikov@xxxxxxxxxxxxxx>
Regards,
Arun
On 2018-10-26 16:30, Arun KS wrote:
This series convert totalram_pages, totalhigh_pages and
zone->managed_pages to atomic variables.
The patch was comiple tested on x86(x86_64_defconfig & i386_defconfig)
on tip of linux-mmotm. And memory hotplug tested on arm64, but on an
older version of kernel.
Arun KS (4):
 mm: Fix multiple evaluvations of totalram_pages and managed_pages
 mm: Convert zone->managed_pages to atomic variable
 mm: convert totalram_pages and totalhigh_pages variables to atomic
 mm: Remove managed_page_count spinlock
Âarch/csky/mm/init.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âarch/powerpc/platforms/pseries/cmm.cÂÂÂÂÂÂÂÂÂ | 10 ++--
Âarch/s390/mm/init.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âarch/um/kernel/mem.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 3 +-
Âarch/x86/kernel/cpu/microcode/core.cÂÂÂÂÂÂÂÂÂ |Â 5 +-
Âdrivers/char/agp/backend.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âdrivers/gpu/drm/amd/amdkfd/kfd_crat.cÂÂÂÂÂÂÂÂ |Â 2 +-
Âdrivers/gpu/drm/i915/i915_gem.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âdrivers/gpu/drm/i915/selftests/i915_gem_gtt.c |Â 4 +-
Âdrivers/hv/hv_balloon.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ | 19 +++----
Âdrivers/md/dm-bufio.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âdrivers/md/dm-crypt.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âdrivers/md/dm-integrity.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âdrivers/md/dm-stats.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âdrivers/media/platform/mtk-vpu/mtk_vpu.cÂÂÂÂÂ |Â 2 +-
Âdrivers/misc/vmw_balloon.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âdrivers/parisc/ccio-dma.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âdrivers/parisc/sba_iommu.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âdrivers/staging/android/ion/ion_system_heap.c |Â 2 +-
Âdrivers/xen/xen-selfballoon.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 6 +--
Âfs/ceph/super.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âfs/file_table.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 7 +--
Âfs/fuse/inode.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âfs/nfs/write.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âfs/nfsd/nfscache.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âfs/ntfs/malloc.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âfs/proc/base.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âinclude/linux/highmem.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ | 28 ++++++++++-
Âinclude/linux/mm.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ | 27 +++++++++-
Âinclude/linux/mmzone.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ | 15 +++---
Âinclude/linux/swap.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 1 -
Âkernel/fork.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 5 +-
Âkernel/kexec_core.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 5 +-
Âkernel/power/snapshot.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âlib/show_mem.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/highmem.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âmm/huge_memory.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/kasan/quarantine.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/memblock.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 6 +--
Âmm/memory_hotplug.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âmm/mm_init.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/oom_kill.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/page_alloc.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ | 71 +++++++++++++--------------
Âmm/shmem.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 7 +--
Âmm/slab.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/swap.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/util.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/vmalloc.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âmm/vmstat.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Âmm/workingset.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Âmm/zswap.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 4 +-
Ânet/dccp/proto.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 7 +--
Ânet/decnet/dn_route.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Ânet/ipv4/tcp_metrics.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Ânet/netfilter/nf_conntrack_core.cÂÂÂÂÂÂÂÂÂÂÂÂ |Â 7 +--
Ânet/netfilter/xt_hashlimit.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 5 +-
Ânet/sctp/protocol.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ |Â 7 +--
Âsecurity/integrity/ima/ima_kexec.cÂÂÂÂÂÂÂÂÂÂÂ |Â 2 +-
Â58 files changed, 195 insertions(+), 144 deletions(-)