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=-9.9 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL 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 6A679C4360C for ; Wed, 2 Oct 2019 22:32:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F3EAD20842 for ; Wed, 2 Oct 2019 22:32:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="V3R9DrEK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3EAD20842 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4C34F6B0003; Wed, 2 Oct 2019 18:32:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 474F36B0006; Wed, 2 Oct 2019 18:32:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33BFA6B0007; Wed, 2 Oct 2019 18:32:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0128.hostedemail.com [216.40.44.128]) by kanga.kvack.org (Postfix) with ESMTP id 12D246B0003 for ; Wed, 2 Oct 2019 18:32:24 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 9DFDF824CA28 for ; Wed, 2 Oct 2019 22:32:23 +0000 (UTC) X-FDA: 76000294566.05.sense64_4f0aa16953004 X-HE-Tag: sense64_4f0aa16953004 X-Filterd-Recvd-Size: 5824 Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Oct 2019 22:32:23 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id b128so432203pfa.1 for ; Wed, 02 Oct 2019 15:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=buTOR+XuYU0MIPghMQDv8KGs3GslQzTxyG//kOyO5yE=; b=V3R9DrEKTJiR+lD35Y+rqV+QFb9EnkXNafeQ/JsMTj53qD88WbKVhjlr19oqi1kguz CFHg5WLfrNgP9BviO23742wbWke64BAuKg6P/N43mhHMWx97oTuu0GnChsYqRVrfYIpK +yAkxIMs7bX3M6/9X3xIxMBjY3kKdwOBvDKOc6aRG6gEnfBDHj33Fnf69js2MqrGmrXI 1SC8VPTq5gqRN3O4YI6aLoSHRy+/e766UipxxutuWfOH9rGwOnl7Kc3Czj4dk1bZXqBC XEuOHMKReEOGGCLGECHNChlzTurPZubY4TuSqAjZgjh2K/QgA6R1aQKNw8uidxi5K5KP kDxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=buTOR+XuYU0MIPghMQDv8KGs3GslQzTxyG//kOyO5yE=; b=MPbqtsxjqv0SDK1R32757fpnahyY3VIbDacMw4G/uNhC2Q4a59l+rgCDBkDXSbOKUA 8Ih2yBmjIYtVlYzWMD0KCIzV4PYgDqzyww9KXyUSe6drFJovEZFTTR4eIT42rwrpK1sD tIprHXOU1xkJ+9q7QgiD7J5MRzaQbJpldy6gBNpk7lLGp4ZEoxJU7FSmdhbETPWB0b2j BIGeURC24brwiJghi8cQ3+DFNQrueYB8qeQxhjOm7uRqZ9qTctWheanzDHRYd4owDu/m UFA5u8mB768YjfXdTdtZ9hNsZHyoqbHXDGYsEHGQYJQ6/2tn+L6OhUZkZiO6TDDbqqAC G5uw== X-Gm-Message-State: APjAAAVEBHFhtk8nakpOpxe3aq/UwwhkMpQSLVCc2g+mdpduRoueeka0 nIEgatUfEX3o/t+z/k+8lwN2cQ== X-Google-Smtp-Source: APXvYqxx0jbEdMhHvJEauSMn7JFmLYEUfpe0GzCgMisdINsQjK1KW6yyPBnZmZtb3hMMgZP2KUZ0+Q== X-Received: by 2002:aa7:928b:: with SMTP id j11mr7457819pfa.237.1570055541573; Wed, 02 Oct 2019 15:32:21 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id u3sm443014pfn.134.2019.10.02.15.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2019 15:32:20 -0700 (PDT) Date: Wed, 2 Oct 2019 15:32:20 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Vlastimil Babka , 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 In-Reply-To: <20191002103422.GJ15624@dhcp22.suse.cz> Message-ID: References: <20190909193020.GD2063@dhcp22.suse.cz> <20190925070817.GH23050@dhcp22.suse.cz> <20190927074803.GB26848@dhcp22.suse.cz> <20190930112817.GC15942@dhcp22.suse.cz> <20191001054343.GA15624@dhcp22.suse.cz> <20191002103422.GJ15624@dhcp22.suse.cz> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 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. > b39d0ee2632d ("mm, page_alloc: avoid expensive reclaim when compaction > may not succeed") on the other hand has added a much more wider change > which has clearly broken hugetlb and any __GFP_RETRY_MAYFAIL user of > pageblock_order sized allocations. And that is much worse and something > I was pointing at during the review and those concerns were never really > addressed before merging. > > In any case this is something to be fixed ASAP. Do you have any better > proposa? I do not assume you would be proposing yet another revert. I thought Mike Kravetz said[*] that hugetlb was not negatively affected by this? We could certainly disregard this logic for __GFP_RETRY_MAYFAIL if anybody is relying on excessive reclaim ("swap storms") that does not allow compaction to make forward progress for some reason. [*] https://marc.info/?l=linux-kernel&m=156771690024533 If not, for the purposes of this conversation we can disregard __GFP_NORETRY per the above because thp does not use __GFP_RETRY_MAYFAIL.