Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp805837ybp; Fri, 4 Oct 2019 05:21:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxIwo2vXnNsZ/kekzlrzx6DDPc398jO45O/sIJ1A+zqWCwTZIExgE/Lbb76wqMZx0mFGqF X-Received: by 2002:a17:906:80d9:: with SMTP id a25mr12052993ejx.222.1570191660116; Fri, 04 Oct 2019 05:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570191660; cv=none; d=google.com; s=arc-20160816; b=n3ToedHncSfhm2Rrunn38MXkZQa0bT17P2MA9CQNczGKMTMlGluJpa+stWrKjp5Oyo tQ+ricXyht/o0MJWX/iOn5GbH2uNgNG4g9bQIJ80Wzldt5MKxOCk2QTIXgJSHqMh12qz QFsA7OLCKjhHZj2ploVfabyb8Ne6x31+LGXIkVtu9eiKEyKI6cDeSaIN8MZpNg4jdbXW zd9uKR1h1JKkmSFUIt79+w2DNSlcAEe+wxTa4wW1j+IzXs5/0HXfQt6ahcVWrNAKnLlg 77MLifS1vMiQZtROMUAEH1BP2qB3C13qp8jXC4adhkhbtCDN8g2x0QUS6USD+W8TlA8+ pq+g== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OxUqnAP7O9E90W8xHcFOTzknaXMOU7iC6lAjdg4Wsog=; b=DC5WOp2zV7FmWx3JUsWsv+/xwp6yCpXH7hkYgd6w1i8wQ7SFuRrzlRwnJImpctDMwG Uk8OiVARXXhPpZhe1K70+8s49s/sJzjYVOmJCSAO4SMzrOo4rsmZXS7W49grOwtdaTTN BeB8tXEqqPkNniF5PKnw0FIthF2zCxNLM4fABQskG6UILtMfeCKGc19a7oVH8JWLIScl d5UoImTmm6hEz/ZAx7/0hbeesO9vUWCY2pv2fwD/teDOaa0gDv1Eg0gD5sa+QFx3fKGs mAYX7dPlaWYFXakcQb07dL/Lho/40LzR3YxwHpX5yb44tGLiFHArldwHNTgs6RDZ4xJN Zv1g== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id br24si2895081ejb.101.2019.10.04.05.20.35; Fri, 04 Oct 2019 05:21:00 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730386AbfJDMS1 (ORCPT + 99 others); Fri, 4 Oct 2019 08:18:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:44864 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725826AbfJDMS0 (ORCPT ); Fri, 4 Oct 2019 08:18:26 -0400 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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