From patchwork Fri Oct 26 11:00:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun KS X-Patchwork-Id: 10657219 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 637B713A9 for ; Fri, 26 Oct 2018 11:01:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 514FF2C3DD for ; Fri, 26 Oct 2018 11:01:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 434C12C3EC; Fri, 26 Oct 2018 11:01:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAEC72C3DD for ; Fri, 26 Oct 2018 11:01:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A28826B02F8; Fri, 26 Oct 2018 07:01:29 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9D7C76B02FA; Fri, 26 Oct 2018 07:01:29 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C9D66B02FB; Fri, 26 Oct 2018 07:01:29 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by kanga.kvack.org (Postfix) with ESMTP id 4A6986B02F8 for ; Fri, 26 Oct 2018 07:01:29 -0400 (EDT) Received: by mail-pf1-f197.google.com with SMTP id q18-v6so454624pfk.3 for ; Fri, 26 Oct 2018 04:01:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=niM3q2/lCNFJlNl+yAoFKbZUFmPVHPI6DncswhvStYg=; b=QTmHi2RzNrfcCi6hISG7+1vbnFH5TZYxRQ56nZ2/DmcamnN2WO7CO136q4hvCCjEeC nDznX+sa+n8FECoCK8al17OQ2b87E9AHdCoEuZfHr1RgtqfowmSeegCC7O7j9kxITczV AgMQw9YEv4kti5egpD4J/YCfYJ394xtRBF1A9q3QUH/K6RpY/QjzG1jmknF/Ji4DIf9v AcBspfNw93GHs8tGYo7ZnSFXKPCVc5oxfwfDqx1c8xinOCEVkQiaCxNXPNnepMDhDnaY yzoMm8OBovIxs7ySqs4qBb3MiyLHXDIH7sDeVYNaCCaDAItLEIlv44nffyeFU5mgcARh dUGA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) smtp.mailfrom=arunks@qualcomm.com X-Gm-Message-State: AGRZ1gKMhpc8A/UDpcs5dhyupld3LjooLbUMFyELDP8NHc5UJj59qMZX NjBN7eblyEERckyLFJtyu84WjjgAM2D+6s5tP7M4qTwBU4ja9dxeWCSWk4et6xLZH5sLtWnR6eP S3/IvJc07vEHA/bP2FNzR8GegUnLWKiBloY/IpcXhc2VNdT0skfjLLZ/p5Jpo3Ts= X-Received: by 2002:a62:cc4:: with SMTP id 65-v6mr3173216pfm.127.1540551688982; Fri, 26 Oct 2018 04:01:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5eqABgYUEbRH38dqc6Iiq589mSpBS2hu9iJTguskKY+tUNWEq+2zWJAGqjw7Tdr7dvI5BB5 X-Received: by 2002:a62:cc4:: with SMTP id 65-v6mr3173164pfm.127.1540551688207; Fri, 26 Oct 2018 04:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540551688; cv=none; d=google.com; s=arc-20160816; b=YyIT9GNvyFtMNS2lQ4lilxDh9pA/QpKMDeeIev8MbOYYQgXKo+DtK1N/n549Cc8uwG Omb90ZU86zshhFuExFErAp6kJ1UH1FtJar/dmcngKRPfqijGzjV5VZAub5aEcOCTW3pi 6HkfthfMWsgkBfw9nwpfFwNHKueVTXtoMp+gIyzuZ2D+uI2Cc94KvA/oD41kxPcxCZLx uJIYByBhciK3igeuJxEJoTJxxFNqbB3VJBrtJ3a8eijdcVTnZPWg67WlW8ISnmkvhjm0 RNVb7klgqfjdiC/H9IYj/X4MK4Vs4DSgckKzvO8F0GrNcI/n1E2+fleuhapG8Ccm6wGs w+cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=niM3q2/lCNFJlNl+yAoFKbZUFmPVHPI6DncswhvStYg=; b=GoPKvU0RsGnZXhstjeUa12IDncvOevHZaPGsmjWR0N/5McO21kOL15mvvQbNpYv1Mi ypfw9FNDDKdb/2LZUe2qthphzVfMr+c5PPZhwbaSr6NuiLgmCvWPFKRclLx9iwvuXLXk OIwiViBaLsxpsfvpuX4BkOKnQ1zacKmt5Ix/G+fMbvhUiTbU9k86KIXAtBBSDOYwvVw4 qBnJN2eIgSYnXhVDyTubvgEZDY404fz7jlz1v09GSmdcb/mxDtdNCIav6ZhbfNkW17ar ENy9lxLAvi01F4yd7WmOabGcqg/OPM9LPuqqT2FL6RUO0Gb2OcqcCxgElQ8AtmQQPIMy ZYuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) smtp.mailfrom=arunks@qualcomm.com Received: from alexa-out-blr-01.qualcomm.com (alexa-out-blr-01.qualcomm.com. [103.229.18.197]) by mx.google.com with ESMTPS id g9-v6si7269096pgp.488.2018.10.26.04.01.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 04:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) client-ip=103.229.18.197; Authentication-Results: mx.google.com; spf=pass (google.com: domain of arunks@qualcomm.com designates 103.229.18.197 as permitted sender) smtp.mailfrom=arunks@qualcomm.com X-IronPort-AV: E=Sophos;i="5.54,427,1534789800"; d="scan'208";a="262395" Received: from ironmsg03-blr.qualcomm.com ([10.86.208.132]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 26 Oct 2018 16:30:35 +0530 X-IronPort-AV: E=McAfee;i="5900,7806,9057"; a="1798186" Received: from blr-ubuntu-104.ap.qualcomm.com (HELO blr-ubuntu-104.qualcomm.com) ([10.79.40.64]) by ironmsg03-blr.qualcomm.com with ESMTP; 26 Oct 2018 16:30:35 +0530 Received: by blr-ubuntu-104.qualcomm.com (Postfix, from userid 346745) id D7CDC2F13; Fri, 26 Oct 2018 16:30:33 +0530 (IST) From: Arun KS To: Cc: keescook@chromium.org, minchan@kernel.org, getarunks@gmail.com, gregkh@linuxfoundation.org, akpm@linux-foundation.org, mhocko@kernel.org, vbabka@suse.cz, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Arun KS Subject: [PATCH v1 0/4]mm: convert totalram_pages, totalhigh_pages and managed pages to atomic Date: Fri, 26 Oct 2018 16:30:27 +0530 Message-Id: <1540551631-24208-1-git-send-email-arunks@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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(-)