Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp171355imu; Wed, 7 Nov 2018 23:24:21 -0800 (PST) X-Google-Smtp-Source: AJdET5fwYDa1eqn5JBGespqX2+BmF05fwLJNfOMXkfiJHY5hi4hGsfXKWcQxbgkSvmMqlozQHHC1 X-Received: by 2002:a17:902:704c:: with SMTP id h12-v6mr3515370plt.315.1541661861643; Wed, 07 Nov 2018 23:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541661861; cv=none; d=google.com; s=arc-20160816; b=SdWfENIPVw3nZLnq8PAU89Tv39qAnslawFvvquXy4lcymXqccaT3AlIVBNsDj1JfJG NNBwq4RNleeKf4h3g7kQ7nFv68L98z0vOL1WZ1I2FHI7X2LDguW55dSX+QinH+3idEEv J+DdT4PyrAyoLvWdw1qgECxhhOs1ctACr2/SPVPIwxVrElqD5tTrCTZcKSdlvqrtvKlH yte705iw5khZOofzwWCtbEb5qWpuXpWgSOK3vXRLSY1MkKtGq+ZXBVoKd6kWsbHentx+ KFNuzWtmhQ1tcloALTAuIZaDWq0cOt/Pc4wr7x9k6Sm7kmFw8KakVezIAgOmpgZA4BCq kW/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=AIr44GEeODQbMACJT2OZDiQy7VFWmskUbSzlReBfzTc=; b=alFc7OaDqjjx3iCGLjsmPtrnJ9b3US+MN+0XHEQ/ZUAlm6pmtIGp6lw1+aB4RLR6kR /Bv6x598IeMv4Iej+3LoPBiWjrRVd9bakd0zmi2oiFfEcSXWI8vZsZ8ty3zauPBJ0Ukl fDHjN2Mq+M/nWWH41TJZXk5X7s2MNvsqypAbk4NDIqDI0qS07/r74eLFpYs45VC8C1v3 FFI2Mhm6d9q6RPg9ws0S1CNHPYYcCblFw+eeQPOYkv7gjXUdrUPDgOoJk3mw6MbL3zdq 21W54hp29hV1mh7RG1uKEh1oZtrWz2KMjD99U+arx7xOAvemLpgLHjm810gWO78+CqJY rQbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=K3i2Oayh; dkim=pass header.i=@codeaurora.org header.s=default header.b=AnxX7Fx4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8-v6si3498583pls.428.2018.11.07.23.24.05; Wed, 07 Nov 2018 23:24:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=K3i2Oayh; dkim=pass header.i=@codeaurora.org header.s=default header.b=AnxX7Fx4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbeKHQ5n (ORCPT + 99 others); Thu, 8 Nov 2018 11:57:43 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:47108 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726814AbeKHQ5n (ORCPT ); Thu, 8 Nov 2018 11:57:43 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2D87360AD8; Thu, 8 Nov 2018 07:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1541661815; bh=tU7zIMPAGIs0RFODrreQRQFlajuUePBThjAa9iv5R4c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=K3i2Oayh25W2ejwN6lICrHogVCewQF51B4FMvCOhaRKN0Dq6BfK/lRSWG9YUzbPpF HFksuKcuZxUjRgRPRBx+HMaAc74sIKS6nZyQwD5bJqa673HyIJn5dJugqQWuaNPkEL CzX6lfgt6hbkTIbxFM/b/k4LXrJcDqC7xxOriK1U= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 6AB5660791; Thu, 8 Nov 2018 07:23:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1541661813; bh=tU7zIMPAGIs0RFODrreQRQFlajuUePBThjAa9iv5R4c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AnxX7Fx4qRASUDf0yW0P7L/BVTpsVV60ZBYoML25XRtX2GvX6SrGZHmuD3M17Jx7w 0WitnpSh4cLMbStTig/quPV4tdNRh7lItTE8bavXpfCmJpzrth5fihI9+oXFIY7PiS E0vUx81gVzP/cXFT223fJI7HCAWCkMO7lZDJsGgA= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 08 Nov 2018 12:53:33 +0530 From: Arun KS To: Vlastimil Babka Cc: akpm@linux-foundation.org, keescook@chromium.org, khlebnikov@yandex-team.ru, minchan@kernel.org, mhocko@kernel.org, osalvador@suse.de, linux-kernel@vger.kernel.org, linux-mm@kvack.org, getarunks@gmail.com Subject: Re: [PATCH v2 3/4] mm: convert totalram_pages and totalhigh_pages variables to atomic In-Reply-To: <5edc432c-b475-5d2e-6a87-700c32a8fad9@suse.cz> References: <1541521310-28739-1-git-send-email-arunks@codeaurora.org> <1541521310-28739-4-git-send-email-arunks@codeaurora.org> <5edc432c-b475-5d2e-6a87-700c32a8fad9@suse.cz> Message-ID: <7376dee0b5a62fe847c347e615abf868@codeaurora.org> X-Sender: arunks@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-11-07 14:34, Vlastimil Babka wrote: > On 11/6/18 5:21 PM, Arun KS wrote: >> totalram_pages and totalhigh_pages are made static inline function. >> >> Suggested-by: Michal Hocko >> Suggested-by: Vlastimil Babka >> Signed-off-by: Arun KS >> Reviewed-by: Konstantin Khlebnikov >> Acked-by: Michal Hocko > > Acked-by: Vlastimil Babka > > One bug (probably) below: > >> diff --git a/mm/highmem.c b/mm/highmem.c >> index 59db322..02a9a4b 100644 >> --- a/mm/highmem.c >> +++ b/mm/highmem.c >> @@ -105,9 +105,7 @@ static inline wait_queue_head_t >> *get_pkmap_wait_queue_head(unsigned int color) >> } >> #endif >> >> -unsigned long totalhigh_pages __read_mostly; >> -EXPORT_SYMBOL(totalhigh_pages); > > I think you still need to export _totalhigh_pages so that modules can > use the inline accessors. Thanks for pointing this. I missed that. Will do the same for _totalram_pages. Regards, Arun > >> - >> +atomic_long_t _totalhigh_pages __read_mostly; >> >> EXPORT_PER_CPU_SYMBOL(__kmap_atomic_idx); >>