From patchwork Fri Oct 26 11:00:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun KS X-Patchwork-Id: 10657217 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 5C7DB14BD for ; Fri, 26 Oct 2018 11:01:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 488432C3DD for ; Fri, 26 Oct 2018 11:01:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AE882C3EC; Fri, 26 Oct 2018 11:01:30 +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 BAAAE2C3DD for ; Fri, 26 Oct 2018 11:01:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B10D56B02F6; Fri, 26 Oct 2018 07:01:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AC20B6B02F8; Fri, 26 Oct 2018 07:01:28 -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 9D8566B02F9; Fri, 26 Oct 2018 07:01:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by kanga.kvack.org (Postfix) with ESMTP id 5BE5F6B02F6 for ; Fri, 26 Oct 2018 07:01:28 -0400 (EDT) Received: by mail-pg1-f197.google.com with SMTP id b24-v6so381701pgh.5 for ; Fri, 26 Oct 2018 04:01:28 -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=ZxtsH6ATcFjQY37eVhjnnAaat8Mrx2HvmmR6PzD9DbHrE+9Po1k5Q8EChdxpUDMWbb INpaucUqc0ns5N0MIYERyGoiqoUxtA2snUJyQ5QBcLZ8eJL8I3CI5Zl73fUlp4qkE0Vr COVdF7WlyGhS7rCGsuztzB9AWpdMqEjvzvNY2+97T/UFFe2IcXEddQ8JYl0ur7uGO7A0 ACqLrjuz+lOqO4YE6FoSggEUb4bYHz7GMfp+7dsm0Vsmf+VB3s1/XmDfA40bPcrkZqia Ts8yLqcypZnjyU7lzCCBs3JxIZ72CwrJ1EPHyLvohU2KpaxeHT2SwWc7Qqf3SHInrSQu AFxQ== 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: AGRZ1gKjWL1P5tPQ60f5SsfuGzxa9pzIcdW/W54zrB2MTuIBkszS68ST 7pnn7pznds+nqt+8uFbgOQBNxMsy5BbCoycMVbm+6QUrrh7+AKvHASGtbAx3ELeEeGaurZZYjiD irI2f7nnmauIrRyJq8WlvLS9lKipGz9jcbfbmp/k3hxFCI2vk3CTXDg7nQ0k3LJw= X-Received: by 2002:a63:f74f:: with SMTP id f15mr3058613pgk.190.1540551688053; Fri, 26 Oct 2018 04:01:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5dc1BXLEfXT7xq7JaL/A2NE0rVPRlpR7xRHaaXVmYRQIs4RHpSUME8VtjvlK+dhdffSBQry X-Received: by 2002:a63:f74f:: with SMTP id f15mr3058563pgk.190.1540551687183; Fri, 26 Oct 2018 04:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540551687; cv=none; d=google.com; s=arc-20160816; b=D+AkHodXonoJrt81VGSkaAGRYDHLivMmC9ZRd+62GZcPysbU2zQkObyJ9mvKzNt+mD T0ZducAwORJ4MsTAat3r6jrC1KjbZkets6tH13HX7bNpKSjssBdp7+TJ1yYTNKNFydb8 QQDjIPva5UzCe70xnyWP6F/Bt6ld779EaEmEulA48wwMfALgfIKQRChmyRUsTWm36UWe huQucMPHIz+y+fYu9y+u2dT/ixoDm875zbWuMCLQ4bOEdXOhfISSvFoyDEvQeLRtAW8L W8WJP/jgteSlaRAqa+OjpotnRyoccR97FI4/WhOnaO4XFmbvbzKODBBlclWTaKvBiObc qjAQ== 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=l5YhI59BEF5fhE8CMM1WGAvTDSNopztoJDS+D5lgP+a9xEKsui2dMww7rqbSNEtdMg vhWkZN1lic5ik0+1riMg7CqGzoRVFcNkKFgibqaLsWaWxv0pN88otnGhk1gn3DdEEq/H XEgnnEqPUZhoxaGnM9Lx1ViejcLueBcOkm6c3+NAPbcIUlCnCv8QTxnemVAsGeyBMmf0 Lt6zxkYYQfj7Gr6CAbkPDA1wfUJiZYCt9vFXLXt5tU62996JliC0WmwRmfZrOtZXwk3X wxTwaL+ZTokBnYjPDbLczftCtQM24VLv5xsHX/Ylj1uZtYacfzYTr8hnVsBKsv36vOlW Pz+A== 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.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 04:01:27 -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="262423" 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:31:25 +0530 X-IronPort-AV: E=McAfee;i="5900,7806,9057"; a="1798195" 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:31:25 +0530 Received: by blr-ubuntu-104.qualcomm.com (Postfix, from userid 346745) id 3F3A72F13; Fri, 26 Oct 2018 16:31:24 +0530 (IST) From: Arun KS To: Cc: keescook@chromium.org, khlebnikov@yandex-team.ru, 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:58 +0530 Message-Id: <1540551662-26458-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(-) Reviewed-by: Konstantin Khlebnikov