From patchwork Wed May 9 08:38:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 10388637 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E055B60540 for ; Wed, 9 May 2018 08:39:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D40FB28E13 for ; Wed, 9 May 2018 08:39:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7B3E28E24; Wed, 9 May 2018 08:39:07 +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 2443E28E13 for ; Wed, 9 May 2018 08:39:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A4D2A6B03BD; Wed, 9 May 2018 04:39:05 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9FE066B0491; Wed, 9 May 2018 04:39:05 -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 8CA616B0492; Wed, 9 May 2018 04:39:05 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 49A136B03BD for ; Wed, 9 May 2018 04:39:05 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id g1so25945546pfh.19 for ; Wed, 09 May 2018 01:39:05 -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:in-reply-to:references; bh=cP6jwqrS3It1YjTpea+VpXEJjoar0LYrkQKmm3SVhn8=; b=iQT3LBdyjNRZ9SyJiYDQMzjVMUn4b99kZleLFqOKEbmbtgyubBz7NKigtomvTpT1jK wZNr3ip4J+1UtcNQvCRz06dZ/hCr1m3KgMDqYKWJ3yl8onRNflKebu9KGDagoEY9ATQD 7hERtg7cIQnIlCDNdhVIRtzHmkSEz9DUWQh7ijv0FGXtA5PHuxgaDXiNy3qJeG6Yf/Wg JLV3YVdZoQtdgeYILfPzmpPAY8fBlTqix0VtZsiHA7aUoqUmAjj2b3zYZq+CrTjnLLSX C5rXOO/Qw44VnmXDW0H7NH9KrkxFClTGazNDTwNbbh1hnj1wpjLwpMI+DE56oc76o8KY Q9ww== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ying.huang@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=ying.huang@intel.com X-Gm-Message-State: ALQs6tC5rgo4N7T66brJvA4Sd3OFn6js4/nhf0Rmo/eR1RyjToaLljb3 Svbfdcwb1vxsVqCgKySGqKWFZ9aU4h38Pg3YofsF7gHZn6cQWE17grLebVVBUolTPVbV7wGnZJQ GNavXdKRHi3aTmRTKXyB/AbUyijh9chvnjtMFUuO8l6DYHNYajZUf08wpxUXd2M09Ag== X-Received: by 10.98.25.15 with SMTP id 15mr41838638pfz.42.1525855144964; Wed, 09 May 2018 01:39:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpAwiFpK+qJ6+Dzbpf8CxK5yBVqzIUkmwYHzZa+WVQRn05IS+PPkyopLitb57CsLx0mUP6q X-Received: by 10.98.25.15 with SMTP id 15mr41838608pfz.42.1525855144133; Wed, 09 May 2018 01:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525855144; cv=none; d=google.com; s=arc-20160816; b=KsZLUrTw7il78La6fnKlbOeTgQARR80uH8ImujrdeHggQrfdkVoP6IPJcmzO8Si4pG 7qa4yy3JMiC3Wf6GyOx25gqrn0rHToGjsN17EZIjPTDODv0LBQCZ75Z62VPrkTXANVfp pSS1tD1d7CTCnG4/5EeLHNRimfxKZs1oGMIlYq8I8EhDg6Z2khEUl/5lxboKkioTagAQ gLrVOyUc0ePMMcT+dMhki1TIm8qoD/XYs0f+RCU53Z90r4yZq45F0EqESI72UuEepoH/ uXeoxf/md5SA+SdG/n36wb7Si2ceAopqxwL2bVbAwt45M7NNXjOnrD84q9rwPwHnnQJB HG7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=cP6jwqrS3It1YjTpea+VpXEJjoar0LYrkQKmm3SVhn8=; b=iW6FGirjzWmmJTWQetqJl8H6giE29B1hu3v1U34QqmpJAIXlO4G1LSsE1zGQnXknM+ fVzcGONEDHS0styiZfqO8qY3axFNvvI889CaXJOtrmhEy/SPzOUi0CuPWND4NWOYT9Cf Sm04mF63evkaTzChruTzTrdzAb7KX/XodnqxLqM/X9hRB3qUavK5iSgZvSJ7jOZ0qAwO sLFgk8gTRvmFhwGm9CKlOx9HQERIAnB5HJaZOSFFwa+B0UjQ93H1Ch4XOKgza2SSdN6w JeSFLb3JALa8GP50mPVQ8gH2Fdl4jrVl1f+1KKRcKz758RzRjJpuEBS4Q1+KHlGhBQtY hosw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ying.huang@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=ying.huang@intel.com Received: from mga18.intel.com (mga18.intel.com. [134.134.136.126]) by mx.google.com with ESMTPS id t144-v6si21177836pgb.94.2018.05.09.01.39.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 May 2018 01:39:04 -0700 (PDT) Received-SPF: pass (google.com: domain of ying.huang@intel.com designates 134.134.136.126 as permitted sender) client-ip=134.134.136.126; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ying.huang@intel.com designates 134.134.136.126 as permitted sender) smtp.mailfrom=ying.huang@intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 01:39:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="52769494" Received: from yhuang-gentoo.sh.intel.com ([10.239.193.148]) by fmsmga004.fm.intel.com with ESMTP; 09 May 2018 01:39:00 -0700 From: "Huang, Ying" To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , "Kirill A. Shutemov" , Andrea Arcangeli , Michal Hocko , Johannes Weiner , Shaohua Li , Hugh Dickins , Minchan Kim , Rik van Riel , Dave Hansen , Naoya Horiguchi , Zi Yan Subject: [PATCH -mm -V2 02/21] mm, THP, swap: Make CONFIG_THP_SWAP depends on CONFIG_SWAP Date: Wed, 9 May 2018 16:38:27 +0800 Message-Id: <20180509083846.14823-3-ying.huang@intel.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180509083846.14823-1-ying.huang@intel.com> References: <20180509083846.14823-1-ying.huang@intel.com> 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 From: Huang Ying It's unreasonable to optimize swapping for THP without basic swapping support. And this will cause build errors when THP_SWAP functions are defined in swapfile.c and called elsewhere. The comments are fixed too to reflect the latest progress. Signed-off-by: "Huang, Ying" Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Michal Hocko Cc: Johannes Weiner Cc: Shaohua Li Cc: Hugh Dickins Cc: Minchan Kim Cc: Rik van Riel Cc: Dave Hansen Cc: Naoya Horiguchi Cc: Zi Yan --- mm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index f27a60d982ff..1c44a75ac3ff 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -420,10 +420,9 @@ config ARCH_WANTS_THP_SWAP config THP_SWAP def_bool y - depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP + depends on TRANSPARENT_HUGEPAGE && ARCH_WANTS_THP_SWAP && SWAP help Swap transparent huge pages in one piece, without splitting. - XXX: For now this only does clustered swap space allocation. For selection by architectures with reasonable THP sizes.