Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp59391imm; Tue, 12 Jun 2018 18:27:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKX2FEVeWWd6YDMM5BZgh/tfOmNDM4IICkNFRpm3iMPG+zPPiFLbZ+c//f4OqsoFDCLtV0/ X-Received: by 2002:a65:6252:: with SMTP id q18-v6mr2353498pgv.106.1528853257695; Tue, 12 Jun 2018 18:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528853257; cv=none; d=google.com; s=arc-20160816; b=yfS0ZpmXA0XnwM7okC3bkeTfMBxKvYr9sib87mJx2DsVsytiFgJobYb20TS7qu8tKc oezWL4klUZKuT3sUNzfJHiWDYZ8nxD9jUIu75y4gSpHV875vd3HdOSUKQydCc6U3Xt8l T6QsjvJocPSaICXsxGBeqi14SNWsVr2vQGlkSfYVEvG2FFXLhYwnOtTCTRODQPR7M9f9 RGrt1OwxKaYsZC6IdlPZ+oxst0JYDTjENOiROd7VH5GnBetZiqIwlxMbMAcu46/OR7rW MbM6eRp8ly8KAJh8IFU6LPa1wkPNz09/k12M3NG4486mydt+Vz9vS3aBvBnFrpxtmho7 BoyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:arc-authentication-results; bh=FKtAbBQwf+mLPzpc8CcDkTBSYYDBquaALMVQ/O+QI7Q=; b=DkCkFAeR68MsHs4FaENkpcgrnPzVgV1QW1NAMyppi+Eodj5eK6Aebn8jOLdy06E6kp JttOwvvBBjq2tQzSRbnj8b2fcDv351p1vSSkFoNDgjbJjapZ2ptG9U19cIpjE1pjzs6I hcYn/sNUJVb6ekLaHGkIGF4DxcDJnbzDRMe6ax+ZltTNmjJ4TGYGnjJtS/5Dakdaym77 tI4eaFSK/WOCfPuDGGPuWM2gX3A4cRgB0pXBPtJ2rIZ7zZ/yUlIUqY8AulDLMvImPDaT 309rEkNylZCuRJknjVzGP8M1LdxWwiLh9e6DOoTaZ3tKxy7zdSL2teSp4+XvJM9IpGi+ C34Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v73-v6si1430496pfi.22.2018.06.12.18.27.23; Tue, 12 Jun 2018 18:27:37 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935043AbeFMB06 (ORCPT + 99 others); Tue, 12 Jun 2018 21:26:58 -0400 Received: from mga14.intel.com ([192.55.52.115]:1172 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754407AbeFMB05 (ORCPT ); Tue, 12 Jun 2018 21:26:57 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2018 18:26:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,217,1526367600"; d="scan'208";a="63589137" Received: from yhuang-dev.sh.intel.com (HELO yhuang-dev) ([10.239.13.118]) by fmsmga001.fm.intel.com with ESMTP; 12 Jun 2018 18:26:54 -0700 From: "Huang\, Ying" To: Daniel Jordan Cc: Andrew Morton , , , "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() 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> <20180612214402.cpjmcyjkkwtkgjyu@ca-dmjordan1.us.oracle.com> Date: Wed, 13 Jun 2018 09:26:54 +0800 In-Reply-To: <20180612214402.cpjmcyjkkwtkgjyu@ca-dmjordan1.us.oracle.com> (Daniel Jordan's message of "Tue, 12 Jun 2018 14:44:02 -0700") Message-ID: <87vaano4rl.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Daniel Jordan writes: > 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. Yes. I believe a decent compiler will inline the function in any way. And it does no harm to keep "inline" too, Yes? > 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) > ^~~~~~~~~~~~~~~~~~~ Thanks! I will fix this. Don't know why 0-Day didn't catch this. Best Regards, Huang, Ying