Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754908AbdC3E2W (ORCPT ); Thu, 30 Mar 2017 00:28:22 -0400 Received: from mga09.intel.com ([134.134.136.24]:1707 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754554AbdC3E2V (ORCPT ); Thu, 30 Mar 2017 00:28:21 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,244,1486454400"; d="scan'208";a="1113514174" From: "Huang\, Ying" To: Johannes Weiner Cc: "Huang\, Ying" , Andrew Morton , , , Andrea Arcangeli , "Kirill A . Shutemov" , Hugh Dickins , Shaohua Li , Minchan Kim , Rik van Riel Subject: Re: [PATCH -mm -v7 4/9] mm, THP, swap: Add get_huge_swap_page() References: <20170328053209.25876-1-ying.huang@intel.com> <20170328053209.25876-5-ying.huang@intel.com> <20170329170800.GC31821@cmpxchg.org> Date: Thu, 30 Mar 2017 12:28:17 +0800 In-Reply-To: <20170329170800.GC31821@cmpxchg.org> (Johannes Weiner's message of "Wed, 29 Mar 2017 13:08:00 -0400") Message-ID: <87o9wjs80u.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1322 Lines: 41 Johannes Weiner writes: > On Tue, Mar 28, 2017 at 01:32:04PM +0800, Huang, Ying wrote: >> @@ -527,6 +527,23 @@ static inline swp_entry_t get_swap_page(void) >> >> #endif /* CONFIG_SWAP */ >> >> +#ifdef CONFIG_THP_SWAP_CLUSTER >> +static inline swp_entry_t get_huge_swap_page(void) >> +{ >> + swp_entry_t entry; >> + >> + if (get_swap_pages(1, &entry, true)) >> + return entry; >> + else >> + return (swp_entry_t) {0}; >> +} >> +#else >> +static inline swp_entry_t get_huge_swap_page(void) >> +{ >> + return (swp_entry_t) {0}; >> +} >> +#endif > > Your introducing a function without a user, making it very hard to > judge whether the API is well-designed for the callers or not. > > I pointed this out as a systemic problem with this patch series in v3, > along with other stuff, but with the way this series is structured I'm > having a hard time seeing whether you implemented my other feedback or > whether your counter arguments to them are justified. > > I cannot review and ack these patches this way. Sorry for inconvenience, I will send a new version to combine the function definition and usage into one patch at least for you to review. But I think we can continue our discussion in the comments your raised so far firstly, what do you think about that? Best Regards, Huang, Ying