From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Weiner Subject: Re: [PATCH -mm -v10 1/3] mm, THP, swap: Delay splitting THP during swap out Date: Mon, 1 May 2017 12:44:30 +0200 Message-ID: <20170501104430.GA16306@cmpxchg.org> References: <20170425125658.28684-1-ying.huang@intel.com> <20170425125658.28684-2-ying.huang@intel.com> <20170427053141.GA1925@bbox> <87mvb21fz1.fsf@yhuang-dev.intel.com> <20170428084044.GB19510@bbox> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cmpxchg.org ; s=x; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject: Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+Egf5RZfiX9Mrx9qmRiyEHW7X9sw9DV6IVHbx+6GND0=; b=msEJwgJXfKS+q9vYgwfrEn5+fp h9X4chkdMDBqg0EMs8r8no3Ym35hyFC2sBNDKn/gqUfq/azr14mI8J1asqb+EBmX63yudPCSpgBy3 XKFIeikUAcCtkOwoIiEkuqWD5XPdq6dDehaICD3bafr3a4A+/lkw15NlZesJtNmWMDbA=; Content-Disposition: inline In-Reply-To: <20170428084044.GB19510@bbox> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Minchan Kim Cc: "Huang, Ying" , Andrew Morton , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrea Arcangeli , Ebru Akagunduz , Michal Hocko , Tejun Heo , Hugh Dickins , Shaohua Li , Rik van Riel , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri, Apr 28, 2017 at 05:40:44PM +0900, Minchan Kim wrote: > However, get_swap_page is ugly now. The caller should take care of > failure and should retry after split. I hope get_swap_page includes > split and retry logic in itself without reling on the caller. I think this makes the interface terrible. It's an allocation function to which you pass a reference object for size - and if the allocation doesn't succeed it'll split your reference object to make it fit? That's a nasty side effect for this function to have.