Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5859122imm; Tue, 12 Jun 2018 14:46:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKWOvhLSxzCAm64F104JpSW0CgzLcUnDwulOq2MkqRMitbBiPFMn5HQFfHhyuax3m/BOmm/ X-Received: by 2002:a63:89c2:: with SMTP id v185-v6mr1760501pgd.196.1528839984011; Tue, 12 Jun 2018 14:46:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528839983; cv=none; d=google.com; s=arc-20160816; b=W7iVGr3rWKS542ETwD4IuXOEJ+KCmZ1hyNrq5vKBIFizfpFX9LRi41+Wx6CrDPrjq7 x9roFwGJvhoaFx4YYM8sWSiU9yYsNboQkwub2PCNSRuHKcsouBrrdx+AUN7acgnDrDb+ VxCU2YYqbaE6GosfPPnNIQQ1NGxwbxRoiUeaVgQXbJRYku6rBkkZFjQvVfZz7b2jnp5C xPhjhEfvYZDEnkKZF6F0ZdcxP6wJ0Ix/Un6FjvRLiu9j3WM7yThhuH4r8MdC17nUR9An W5oT4KP1RfWPX9rCF3KxgpEXb9jQUmgaERk7Q1KYwSV6D7VIxJUPkPdOzYlz2xEjOhRE KFFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=snkJ+2z4jfxD8f73+zM+G809MNofqXyptkQiq4+DuIU=; b=orh7rlN03+k36JvaCEJNZbh5NCG6OMJ1WNZcPH0bEZbO7vAzV6z0aVRJFbe5SX5RKA 1s0v0+gmifQHxpkq7vP1IN1SQjo68RZylDqbKbvYBSzLZnnTBOEjDrA8iYdyBUfUGqcl iUAX8rrO47MdGYj+xdhlY9LqAlp+TeBFpPjSM/tBLt6kbI9kvVoZIfhSKrTJmb2z7j2A Q/MwqEaYVsFRtUBgxagoPSfSDhadDPFZhkZxuHJ9rZeIr9LIA9xZiBQEIlPaRl/tUZIJ qMgsKRTNVlTbiojRidBR0d4PxfSeRFgEQrC/hTUSQ3QUoljeL/z03J13ALLNSD+a6NzE wtzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=knq6XNSB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3-v6si999815pld.87.2018.06.12.14.46.09; Tue, 12 Jun 2018 14:46:23 -0700 (PDT) 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=@oracle.com header.s=corp-2017-10-26 header.b=knq6XNSB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934506AbeFLVoj (ORCPT + 99 others); Tue, 12 Jun 2018 17:44:39 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:51484 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933240AbeFLVog (ORCPT ); Tue, 12 Jun 2018 17:44:36 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5CLfk6p175919; Tue, 12 Jun 2018 21:44:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : content-transfer-encoding : in-reply-to; s=corp-2017-10-26; bh=snkJ+2z4jfxD8f73+zM+G809MNofqXyptkQiq4+DuIU=; b=knq6XNSBL2BIAUrSQCPHxaQg0dEFFQx1URXL8xi+e+UpdjkMTwzaUlEv1UQYnteq4eOC yngqTIF5f9qWwqR4H+6TNwtUksuB0E1lGXhAmg11YykKbZA4qKNBAZ1mEh0qP3usBOzE XjMPwqy0Vsawm89ejqjFZj3tOqumrJ4VG4z7liyKpCyrEiwBFEOe2iumD4TKcn4vwMpi SNL8PE4jOuo5coijJN5vfEr1cfVjRCgbgC9FFumgH1ADMqTisXzmbVuICPetoe/iSAlE r4bA3RqJuEqLbSmroGFB2EXrNb9g02tc7UmD2DByN5jVW3kGfoi+iOcmI9Es23Vb5j8Z DQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2jjp6c80uy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Jun 2018 21:44:07 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5CLi4Vr007299 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Jun 2018 21:44:05 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5CLi24s003636; Tue, 12 Jun 2018 21:44:02 GMT Received: from ca-dmjordan1.us.oracle.com (/10.211.9.48) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 12 Jun 2018 14:44:02 -0700 Date: Tue, 12 Jun 2018 14:44:02 -0700 From: Daniel Jordan To: "Huang, Ying" Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "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: Re: [PATCH -mm -V3 03/21] mm, THP, swap: Support PMD swap mapping in swap_duplicate() Message-ID: <20180612214402.cpjmcyjkkwtkgjyu@ca-dmjordan1.us.oracle.com> References: <20180523082625.6897-1-ying.huang@intel.com> <20180523082625.6897-4-ying.huang@intel.com> <20180611204231.ojhlyrbmda6pouxb@ca-dmjordan1.us.oracle.com> <87o9ggpzlk.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87o9ggpzlk.fsf@yhuang-dev.intel.com> User-Agent: NeoMutt/20180323-268-5a959c X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8922 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806120240 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 12, 2018 at 09:23:19AM +0800, Huang, Ying wrote: > Daniel Jordan writes: > >> +#else > >> +static inline int __swap_duplicate_cluster(swp_entry_t *entry, > > > > This doesn't need inline. > > Why not? This is just a one line stub. Forgot to respond to this. The compiler will likely choose to optimize out calls to an empty function like this. Checking, this is indeed what it does in this case on my machine, with or without inline. By the way, when building without CONFIG_THP_SWAP, we get linux/mm/swapfile.c:933:13: warning: ‘__swap_free_cluster’ defined but not used [-Wunused-function] static void __swap_free_cluster(struct swap_info_struct *si, unsigned long idx) ^~~~~~~~~~~~~~~~~~~