From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49535C4360C for ; Fri, 4 Oct 2019 12:18:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1519B2070B for ; Fri, 4 Oct 2019 12:18:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1519B2070B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A7C296B0003; Fri, 4 Oct 2019 08:18:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A2D346B0005; Fri, 4 Oct 2019 08:18:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 91B806B0007; Fri, 4 Oct 2019 08:18:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0158.hostedemail.com [216.40.44.158]) by kanga.kvack.org (Postfix) with ESMTP id 6F00A6B0003 for ; Fri, 4 Oct 2019 08:18:27 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 0A9429079 for ; Fri, 4 Oct 2019 12:18:27 +0000 (UTC) X-FDA: 76006005054.28.trade09_49bab87d98210 X-HE-Tag: trade09_49bab87d98210 X-Filterd-Recvd-Size: 3847 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Oct 2019 12:18:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2A22EAD7B; Fri, 4 Oct 2019 12:18:25 +0000 (UTC) Date: Fri, 4 Oct 2019 14:18:24 +0200 From: Michal Hocko To: Vlastimil Babka Cc: David Rientjes , Linus Torvalds , Andrea Arcangeli , Andrew Morton , Mel Gorman , "Kirill A. Shutemov" , Linux Kernel Mailing List , Linux-MM Subject: Re: [patch for-5.3 0/4] revert immediate fallback to remote hugepages Message-ID: <20191004121824.GH9578@dhcp22.suse.cz> References: <20190927074803.GB26848@dhcp22.suse.cz> <20190930112817.GC15942@dhcp22.suse.cz> <20191001054343.GA15624@dhcp22.suse.cz> <20191002103422.GJ15624@dhcp22.suse.cz> <788d3e5b-40e6-916a-9e3f-7f03fa9d618d@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <788d3e5b-40e6-916a-9e3f-7f03fa9d618d@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) 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: On Thu 03-10-19 10:00:08, Vlastimil Babka wrote: > On 10/3/19 12:32 AM, David Rientjes wrote: > > On Wed, 2 Oct 2019, Michal Hocko wrote: > > > >>>> If > >>>> hugetlb wants to stress this to the fullest extent possible, it already > >>>> appropriately uses __GFP_RETRY_MAYFAIL. > >>> > >>> Which doesn't work anymore right now, and should again after this patch. > >> > >> I didn't get to fully digest the patch Vlastimil is proposing. (Ab)using > >> __GFP_NORETRY is quite subtle but it is already in place with some > >> explanation and a reference to THPs. So while I am not really happy it > >> is at least something you can reason about. > >> > > > > It's a no-op: > > > > /* Do not loop if specifically requested */ > > if (gfp_mask & __GFP_NORETRY) > > goto nopage; > > > > /* > > * Do not retry costly high order allocations unless they are > > * __GFP_RETRY_MAYFAIL > > */ > > if (costly_order && !(gfp_mask & __GFP_RETRY_MAYFAIL)) > > goto nopage; > > > > So I'm not sure we should spend too much time discussing a hunk of a patch > > that doesn't do anything. > > I believe Michal was talking about my (ab)use of __GFP_NORETRY, where it > controls the earlier 'goto nopage' condition. That is correct. From a maintainability point of view it would be better to have only a single bailout of an optimistic compaction attempt. If we go with [1] then we have two different criterion to bail out and that is really messy and error prone. While sticking __GFP_RETRY_MAYFAIL as suggest in [1] fixes up the immediate regression in the simplest way this all really begs for a proper analysis and a _real_ fix. Can we move that direction finally, please? I would really love to conduct further testing but I haven't really heard anything to results presented so far. I have no idea whether that is even remotely resembling anything David needs for his claimed regression. [1] http://lkml.kernel.org/r/alpine.DEB.2.21.1910021556270.187014@chino.kir.corp.google.com -- Michal Hocko SUSE Labs